Index: branches/5.1.x/themes/default2009/in-commerce/my_account/my_downloads_more.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/my_account/my_downloads_more.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/my_account/my_downloads_more.tpl	(revision 12131)
@@ -0,0 +1,97 @@
+<!--##
+<NAME>User Downloads - Complete List</NAME>
+<DESC>Complete List of User Downloads</DESC>
+<SECTION>My Account||Store</SECTION>
+##-->
+
+<inp2:m_RequireLogin login_template="platform/login/register"/> <!--## LOGIN REQUIRED ##-->
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" /> <!--## CHECK IF SSL REQUIRED ##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:p_Field name="Name" /> - <inp2:m_phrase name="lu_title_ProductFiles"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<!--## SIDE-BAR ELEMENT ##-->
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/categories.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/top_seller_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## SIDE-BAR ELEMENT ##-->
+
+<!--## MAIN CONTENT ##-->
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_MyAccount,lu_title_MyDownloads,__item__,lu_title_ProductFiles" templates="platform/my_account/my_account,in-commerce/my_account/my_downloads,__default__,in-commerce/my_account/my_downloads_more"/>
+		</div>
+		<div class="movable-element">
+			<!--## MORE DOWNLOADS ##-->
+			<inp2:m_RenderElement design="content_box">
+				<inp2:m_Capture to_var="header">
+					<inp2:p_Field name="Name" /> - <inp2:m_phrase name="lu_title_ProductFiles"/>
+				</inp2:m_Capture>
+
+				<table>
+					<tr>
+						<td style="text-align: center; padding-right: 10px;" valign="top">
+							<a href="<inp2:p_ImageSrc MaxWidth="fullsize" DefaultImage="platform/img/no_picture.gif"/>" target="_blank">
+								<inp2:p_Image render_as="image_element" Primary="1" MaxWidth="thumbnail" DefaultImage="platform/img/no_picture.gif"/><br />
+							</a>
+						</td>
+
+						<td>
+							<a href="<inp2:p_ProductLink template="__default__"/>" class="text-title"><inp2:p_field name="Name"/></a><br />
+
+							<inp2:m_if check="p_Field" name="ManufacturerId">
+								<inp2:m_Phrase label="lu_fld_Manufacturer"/>: <inp2:p_field name="ManufacturerId"/> (<inp2:m_Phrase label="lu_OtherProductsBy"/> <a href="<inp2:p_ManufacturerLink template="in-commerce/products/manufacturer_products" />"><inp2:p_Field name="ManufacturerId"/></a>) <br />
+							</inp2:m_if>
+							<br />
+
+							<inp2:m_Phrase label="lu_fld_Description"/>: <inp2:p_Field name="Description"/> <br /><br />
+
+							<inp2:m_if check="p_CustomField" name="Features">
+								<inp2:p_CustomFieldLabel field="Features"/>:
+								<inp2:p_CustomField name="Features"/>
+								<br />
+								<br />
+							</inp2:m_if>
+
+							<inp2:m_include template="in-commerce/elements/product_files.elm"/>
+
+							<inp2:m_RenderElement name="subsection" title="lu_section_Files"/>
+							<table>
+								<inp2:p_ListFiles render_as="product_file_element" per_page="-1"/>
+							</table>
+						</td>
+					</tr>
+				</table>
+			</inp2:m_RenderElement>
+			<!--## /MORE DOWNLOADS ##-->
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## MAIN CONTENT ##-->
+
+<!--## DESIGN TEMPLATE ##-->
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
+<!--## /DESIGN TEMPLATE ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/my_account/my_downloads_more.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.8
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/my_account/my_addresses.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/my_account/my_addresses.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/my_account/my_addresses.tpl	(revision 12131)
@@ -0,0 +1,88 @@
+<!--##
+<NAME>User Addresses</NAME>
+<DESC>List of User Addresses</DESC>
+<SECTION>My Account||Store</SECTION>
+##-->
+
+<inp2:m_RequireLogin login_template="platform/login/register"/> <!--## LOGIN REQUIRED ##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_Phrase label="lu_comm_MyAddresses"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<!--## SIDE-BAR ELEMENT ##-->
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/categories.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/top_seller_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /SIDE-BAR ELEMENT ##-->
+
+<!--## MAIN CONTENT ##-->
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_MyAccount,lu_title_MyAddresses" templates="platform/my_account/my_account,in-commerce/my_account/my_addresses"/>
+
+			<inp2:m_RenderElement design="content_box">
+				<inp2:addr_InitList list_name="my_addresses" types="myaddresses"/>
+
+				<inp2:m_Capture to_var="header">
+					<inp2:m_Phrase label="lu_comm_MyAddresses"/>
+				</inp2:m_Capture>
+
+				<inp2:m_include template="in-commerce/elements/addresses.elm"/>
+
+				<inp2:m_if check="ord_AllowAddAddress">
+					<a href="<inp2:m_Link template="in-commerce/my_account/new_address"/>"><inp2:m_Phrase label="lu_btn_NewAddress"/></a>
+					<br /><br />
+				</inp2:m_if>
+
+				<inp2:m_if check="addr_TotalRecords" list_name="my_addresses">
+					<table class="fullwidth">
+						<tr>
+							<td colspan="4">
+								<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="1" alt="" /></div>
+							</td>
+						</tr>
+						<tr class="sub-section-header">
+							<td><inp2:m_Phrase label="lu_Address"/></td>
+							<td><inp2:m_Phrase label="lu_ContactInfo"/></td>
+							<td><inp2:m_Phrase label="lu_AddressUsedAs"/></td>
+							<td>&nbsp;</td>
+						</tr>
+						<inp2:addr_PrintList list_name="my_addresses" render_as="my_address_element" direction="H"/>
+					</table>
+
+					<inp2:m_include template="platform/elements/pagination.elm" prefix="addr" list_name="my_addresses"/>
+				<inp2:m_else/>
+					<strong><inp2:m_Phrase label="lu_comm_DontHaveAddresses"/></strong>
+				</inp2:m_if>
+			</inp2:m_RenderElement>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /MAIN CONTENT ##-->
+
+<!--## DESIGN TEMPLATE ##-->
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
+<!--## /DESIGN TEMPLATE ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/my_account/my_addresses.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.8
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/my_account/my_orders.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/my_account/my_orders.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/my_account/my_orders.tpl	(revision 12131)
@@ -0,0 +1,80 @@
+<!--##
+<NAME>User Orders</NAME>
+<DESC>List of User Orders</DESC>
+<SECTION>My Account||Store</SECTION>
+##-->
+
+<inp2:m_RequireLogin login_template="platform/login/register"/> <!--## LOGIN REQUIRED ##-->
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" /> <!--## CHECK IF SSL REQUIRED ##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_phrase name="lu_title_MyOrders"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<!--## SIDE-BAR ELEMENT ##-->
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/top_seller_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /SIDE-BAR ELEMENT ##-->
+
+<!--## MAIN CONTENT ##-->
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_MyAccount,lu_title_MyOrders" templates="platform/my_account/my_account,in-commerce/my_account/my_orders"/>
+		</div>
+		<div class="movable-element">
+			<!--## my orders ##-->
+			<inp2:m_RenderElement design="content_box" block_no_data="no_orders">
+				<inp2:ord_InitList list_name="my_orders" types="myorders"/>
+
+				<inp2:m_Capture to_var="header">
+					<inp2:m_phrase name="lu_title_MyOrders"/> (<inp2:ord_TotalRecords list_name="my_orders"/>)
+				</inp2:m_Capture>
+
+				<inp2:m_include template="in-commerce/elements/orders.elm"/>
+
+				<table class="fullwidth">
+					<tr>
+						<td colspan="4">
+							<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="1" alt="" /></div>
+						</td>
+					</tr>
+					<tr  class="sub-section-header">
+						<td><inp2:m_Phrase label="lu_comm_OrderNumberText"/></td>
+						<td><inp2:m_Phrase label="lu_comm_Date"/></td>
+						<td><inp2:m_Phrase label="lu_comm_Amount"/></td>
+						<td><inp2:m_Phrase label="lu_comm_Status"/></td>
+					</tr>
+					<inp2:ord_PrintList list_name="my_orders" render_as="my_order_element"/>
+				</table>
+
+				<inp2:m_include template="platform/elements/pagination.elm" prefix="ord" list_name="my_orders"/>
+			</inp2:m_RenderElement>
+			<!--## // my orders ##-->
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /MAIN CONTENT ##-->
+
+<!--## DESIGN TEMPLATE ##-->
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
+<!--## /DESIGN TEMPLATE ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/my_account/my_orders.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.8
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/my_account/cancel_recurring.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/my_account/cancel_recurring.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/my_account/cancel_recurring.tpl	(revision 12131)
@@ -0,0 +1,78 @@
+<!--##
+<NAME>Cancel Reoccurring Order</NAME>
+<DESC>Cancel Reoccurring Order page</DESC>
+<SECTION>My Account||Store</SECTION>
+##-->
+
+<inp2:m_RequireLogin login_template="platform/login/register"/> <!--## LOGIN REQUIRED ##-->
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" /> <!--## CHECK IF SSL REQUIRED ##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_phrase name="lu_title_CancelRecurring"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<!--## SIDE-BAR ELEMENTS ##-->
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/categories.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/top_seller_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /SIDE-BAR ELEMENTS ##-->
+
+<!--## MAIN CONTENT ##-->
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_MyAccount,lu_title_MyOrders,lu_title_CancelRecurring" templates="platform/my_account/my_account,in-commerce/my_account/my_orders,in-commerce/my_account/cancel_recurring"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement design="content_box" block_no_data="no_orders">
+				<inp2:m_Capture to_var="header">
+					<inp2:m_phrase name="lu_title_CancelRecurring"/>
+				</inp2:m_Capture>
+
+				<table border="0" cellspacing="0" cellpadding="0">
+					<tr>
+				  		<td>
+							<strong><inp2:m_Phrase label="lu_CancelRecurring_confirm" /></strong>
+
+							<inp2:m_Phrase label="lu_CancelRecurring_confirm_prompt" />
+
+							<br />
+							<br />
+							<form method="POST" action="<inp2:m_FormAction />">
+								<input class="button" name="events[ord][OnCancelRecurring]" type="submit" value="<inp2:m_Phrase label="lu_Yes"/>" />&nbsp;
+								<input class="button" type="button" value="<inp2:m_Phrase label="lu_No"/>" onClick="window.location.href='<inp2:m_Link template="in-commerce/my_account/account"/>'" />&nbsp;
+								<input type="hidden" name="cancelrecurring_ok_template" value="in-commerce/my_account/cancel_recurring_ok"/>
+							</form>
+						</td>
+					</tr>
+					</table>
+			</inp2:m_RenderElement>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /MAIN CONTENT ##-->
+
+<!--## DESIGN TEMPLATE ##-->
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
+<!--## /DESIGN TEMPLATE ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/my_account/cancel_recurring.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.6
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/my_account/my_order_details.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/my_account/my_order_details.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/my_account/my_order_details.tpl	(revision 12131)
@@ -0,0 +1,73 @@
+<!--##
+<NAME>User Orders - Details</NAME>
+<DESC>User Order Details</DESC>
+<SECTION>My Account||Store</SECTION>
+##-->
+
+<inp2:m_RequireLogin login_template="platform/login/register"/> <!--## LOGIN REQUIRED ##-->
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" /> <!--## CHECK IF SSL REQUIRED ##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_phrase name="lu_title_OrderPreview"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<!--## SIDE-BAR ELEMENT ##-->
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/credit_cards.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/top_seller_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /SIDE-BAR ELEMENT ##-->
+
+<!--## MAIN CONTENT ##-->
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_MyAccount,lu_title_MyOrders,lu_title_OrderPreview" templates="platform/my_account/my_account,in-commerce/my_account/my_orders,in-commerce/my_account/my_order_details"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement design="content_box">
+
+				<inp2:m_Capture to_var="header">
+					<inp2:m_phrase name="lu_title_OrderPreview"/>
+				</inp2:m_Capture>
+
+				<form method="post" action="<inp2:m_FormAction/>">
+					<inp2:m_include template="in-commerce/elements/order_details.elm"/>
+				</form>
+
+			</inp2:m_RenderElement>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /MAIN CONTENT ##-->
+
+<!--## DESIGN TEMPLATE ##-->
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
+<!--## /DESIGN TEMPLATE ##-->
+
+
+
+
+
+
+

Property changes on: branches/5.1.x/themes/default2009/in-commerce/my_account/my_order_details.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.7
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_payment_type.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_payment_type.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_payment_type.tpl	(revision 12131)
@@ -0,0 +1,85 @@
+<!--##
+<NAME>Affiliate - Payment Type</NAME>
+<DESC>Affiliate Payment Type page</DESC>
+<SECTION>My Account||Store||Affiliates</SECTION>
+##-->
+
+<inp2:m_RequireLogin login_template="platform/login/register"/> <!--## LOGIN REQUIRED ##-->
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" /> <!--## CHECK IF SSL REQUIRED ##-->
+<inp2:m_RequireAffiliate registration_template="in-commerce/my_account/affiliate/affiliate" /> <!--## MUST BE AN AFFILIATE ##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_Phrase label="lu_title_AffiliatePaymentType"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<!--## SIDE-BAR ELEMENT ##-->
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_if check="u_IsAffiliate">
+				<inp2:m_RenderElement name="in-commerce/elements/side_boxes/affiliate_navigation.elm" design="blue_box"/>
+			</inp2:m_if>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/top_seller_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /SIDE-BAR ELEMENT ##-->
+
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_MyAccount,lu_title_Affiliate,lu_title_AffiliateStatistics,lu_title_AffiliatePaymentType" templates="platform/my_account/my_account,in-commerce/my_account/affiliate/affiliate,in-commerce/my_account/affiliate/affiliate_statistics,in-commerce/my_account/affiliate/affiliate_payment_type"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement design="content_box">
+
+				<inp2:m_Capture to_var="header">
+					<inp2:m_Phrase label="lu_title_AffiliatePaymentType"/>
+				</inp2:m_Capture>
+
+				<table class="form-data fullwidth">
+					<tr>
+						<td class="field-name" style="width:155px">
+							<strong><inp2:m_Phrase label="lu_CurrentAffiliatePaymentType" />:</strong>
+						</td>
+						<td class="field-name"><inp2:u_AffiliateField name="PaymentTypeId" /></td>
+					</tr>
+					<tr><td colspan="2" style="padding-left:15px"><inp2:m_Phrase label="lu_ChangeAffiliatePaymentTypeDescription"/><br /><br /></td></tr>
+				</table>
+
+				<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/grey_pix.gif" width="100%" height="1" align="absmiddle" alt="" /><br />
+				<br />
+				<inp2:m_include template="in-commerce/elements/forms.elm"/>
+				<form method="post" action="<inp2:m_FormAction/>">
+					<table border="0" class="form-data fullwidth">
+						<inp2:m_RenderElement name="inp_affiliate_payment_types" field="PaymentTypeId" title="lu_fld_AffiliatePaymentType" style="width:155px"/>
+						<inp2:m_RenderElement name="inp_affiliate_textarea" field="Comments" title="lu_fld_AffiliateComments" cols="35" rows="5" style="width:155px" is_last="1"/>
+
+						<inp2:m_RenderElement design="inp_edit_buttons">
+							<input type="hidden" name="next_template" value="in-commerce/my_account/affiliate/affiliate_payment_type_changed" />
+							<input type="submit" class="button" name="events[affil][OnChangePaymentType]" id="events[affil][OnChangePaymentType]" value="<inp2:m_Phrase label="lu_ChangePaymentType"/>" />
+						</inp2:m_RenderElement>
+					</table>
+				</form>
+			</inp2:m_RenderElement>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_payment_type.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.7
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate.tpl	(revision 12131)
@@ -0,0 +1,121 @@
+<!--##
+<NAME>Affiliate</NAME>
+<DESC>Affiliate page</DESC>
+<SECTION>My Account||Store||Affiliates</SECTION>
+##-->
+
+<inp2:m_RequireLogin login_template="platform/login/register"/> <!--## LOGIN REQUIRED ##-->
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" /> <!--## CHECK IF SSL REQUIRED ##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_Phrase label="lu_title_Affiliate"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<!--## SIDE-BAR ELEMENT ##-->
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_if check="u_IsAffiliate">
+				<inp2:m_RenderElement name="in-commerce/elements/side_boxes/affiliate_navigation.elm" design="blue_box"/>
+			</inp2:m_if>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/top_seller_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /SIDE-BAR ELEMENT ##-->
+
+<!--## MAIN CONTENT ##-->
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_MyAccount,lu_title_Affiliate" templates="platform/my_account/my_account,in-commerce/my_account/affiliate/affiliate"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement design="content_box">
+
+				<inp2:m_DefineElement name="affiliate_element">
+					<a href="<inp2:m_Link template="$template"/>">
+					<strong><inp2:m_Phrase label="$label"/></strong></a><br />
+					<inp2:m_Phrase label="$text"/><br /><br />
+				</inp2:m_DefineElement>
+
+				<inp2:m_if check="u_IsAffiliate">
+				<!-- Affiliate Section List -->
+					<inp2:m_Capture to_var="header">
+						<inp2:m_Phrase label="lu_title_Affiliate"/>
+					</inp2:m_Capture>
+
+					<inp2:m_if check="u_AffiliateIsNotActive">
+						<table class="warning-message fullwidth">
+							<tr>
+								<td width="30">
+									<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/warning_icon.gif" width="21" height="18" alt=""/>
+								</td>
+								<td><inp2:m_phrase name="lu_Warning"/></td>
+							</tr>
+						</table>
+						<br />
+						<inp2:m_Phrase label="lu_AffiliateIsPendingOrDisabled"/><br /><br />
+					</inp2:m_if>
+
+					<inp2:m_RenderElement name="affiliate_element" template="in-commerce/my_account/affiliate/affiliate_statistics" label="lu_comm_AffiliateStatistics" text="lu_AffiliateStatisticsText"/>
+					<inp2:m_RenderElement name="affiliate_element" template="in-commerce/my_account/affiliate/affiliate_payments" label="lu_AffiliatePayments" text="lu_AffiliatePaymentsText"/>
+					<inp2:m_RenderElement name="affiliate_element" template="in-commerce/my_account/affiliate/affiliate_materials" label="lu_AffiliateMaterials" text="lu_AffiliateMaterialsText"/>
+					<inp2:m_RenderElement name="affiliate_element" template="in-commerce/my_account/affiliate/affiliate_payment_type" label="lu_ChangePaymentType" text="lu_ChangePaymentTypeText"/>
+
+					<a href="<inp2:m_Link t='in-commerce/my_account/affiliate'/>" onclick="showAffiliateAgreement();return false;">
+					<strong><inp2:m_Phrase label="lu_TermsAndConditionsLink"/></strong></a><br />
+					<inp2:m_Phrase label="lu_TermsAndConditionsText"/><br /><br />
+				<!-- End Of Affiliate Section List -->
+				<inp2:m_else />
+				<!-- Affiliate Registration -->
+					<inp2:m_Capture to_var="header">
+						<inp2:m_Phrase label="lu_title_AffiliateRegistration"/>
+					</inp2:m_Capture>
+
+					<inp2:m_Phrase label="lu_BecomeAnAffiliateDescription"/><br /><br />
+
+					<inp2:m_if check="u_HasError" field="any">
+						<inp2:m_RenderElement name="error_message" />
+					</inp2:m_if>
+
+					<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/grey_pix.gif" width="100%" height="1" align="absmiddle" alt="" /><br />
+					<br />
+					<inp2:m_include template="in-commerce/elements/forms.elm"/>
+					<form method="post" action="<inp2:m_FormAction/>">
+						<table border="0" class="form-data fullwidth">
+							<inp2:m_RenderElement name="inp_affiliate_box" field="SSN" title="lu_fld_SSNField" style="width:155px" required="1"/>
+							<inp2:m_RenderElement name="inp_affiliate_payment_types" field="PaymentTypeId" title="lu_fld_AffiliatePaymentType" style="width:155px"/>
+							<inp2:m_RenderElement name="inp_affiliate_textarea" field="Comments" title="lu_fld_AffiliateComments" cols="35" rows="5" style="width:155px"/>
+							<inp2:m_RenderElement name="inp_affiliate_terms_checkbox"/>
+
+							<inp2:m_RenderElement design="inp_edit_buttons">
+								<input type="hidden" name="next_template" value="in-commerce/my_account/affiliate/affiliate_thankyou" />
+								<input type="submit" class="button" name="events[affil][OnBecomeAffiliate]" id="events[affil][OnBecomeAffiliate]" value="<inp2:m_Phrase label="lu_comm_BecomeAnAffiliate"/>" />
+							</inp2:m_RenderElement>
+						</table>
+					</form>
+				</inp2:m_if>
+			</inp2:m_RenderElement>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## //MAIN CONTENT ##-->
+
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.7
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_payments.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_payments.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_payments.tpl	(revision 12131)
@@ -0,0 +1,84 @@
+<!--##
+<NAME>Affiliate - Payments</NAME>
+<DESC>Affiliate Payments List page</DESC>
+<SECTION>My Account||Store||Affiliates</SECTION>
+##-->
+
+<inp2:m_RequireLogin login_template="platform/login/register"/> <!--## LOGIN REQUIRED ##-->
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" /> <!--## CHECK IF SSL REQUIRED ##-->
+<inp2:m_RequireAffiliate registration_template="in-commerce/my_account/affiliate/affiliate" /> <!--## MUST BE AN AFFILIATE ##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_Phrase label="lu_title_ComissionPayments"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_if check="u_IsAffiliate">
+				<inp2:m_RenderElement name="in-commerce/elements/side_boxes/affiliate_navigation.elm" design="blue_box"/>
+			</inp2:m_if>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/top_seller_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_MyAccount,lu_title_Affiliate,lu_title_AffiliateStatistics,lu_title_ComissionPayments" templates="platform/my_account/my_account,in-commerce/my_account/affiliate/affiliate,in-commerce/my_account/affiliate/affiliate_statistics,in-commerce/my_account/affiliate/affiliate_payments"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement design="content_box" block_no_data="no_payments">
+
+				<inp2:apayments_InitList list_name="my_payments_list" types="my_payments"/>
+
+				<inp2:m_Capture to_var="header">
+					<inp2:m_Phrase label="lu_title_ComissionPayments"/> (<inp2:apayments_TotalRecords list_name="my_payments_list" />)
+				</inp2:m_Capture>
+
+				<inp2:m_include template="in-commerce/elements/affiliates.elm"/>
+
+				<table class="fullwidth">
+					<inp2:m_RenderElement name="separator" colspan="4"/>
+					<tr class="sub-section-header">
+						<td><inp2:m_Phrase label="lu_Date"/></td>
+						<td><inp2:m_Phrase label="lu_PaymentReference"/></td>
+						<td><inp2:m_Phrase label="lu_PaymentAmount"/></td>
+					</tr>
+					<inp2:m_RenderElement name="separator" colspan="4"/>
+					<inp2:m_include template="in-commerce/elements/affiliates.elm"/>
+					<inp2:apayments_PrintList list_name="my_payments_list" render_as="payment_element"/>
+				</table>
+
+				<inp2:m_include template="platform/elements/pagination.elm" prefix="apayments" list_name="my_payments_list"/>
+
+			</inp2:m_RenderElement>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
+
+
+
+
+
+
+

Property changes on: branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_payments.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.8
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_materials.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_materials.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_materials.tpl	(revision 12131)
@@ -0,0 +1,86 @@
+<!--##
+<NAME>Affiliate - Materials</NAME>
+<DESC>Affiliate Materials page</DESC>
+<SECTION>My Account||Store||Affiliates</SECTION>
+##-->
+
+<inp2:m_RequireLogin login_template="platform/login/register"/> <!--## LOGIN REQUIRED ##-->
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" /> <!--## CHECK IF SSL REQUIRED ##-->
+<inp2:m_RequireAffiliate registration_template="in-commerce/my_account/affiliate/affiliate" /> <!--## MUST BE AN AFFILIATE ##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_Phrase label="lu_AffiliateMaterials"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_if check="u_IsAffiliate">
+				<inp2:m_RenderElement name="in-commerce/elements/side_boxes/affiliate_navigation.elm" design="blue_box"/>
+			</inp2:m_if>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/top_seller_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_MyAccount,lu_title_Affiliate,lu_title_AffiliateStatistics,lu_AffiliateMaterials" templates="platform/my_account/my_account,in-commerce/my_account/affiliate/affiliate,in-commerce/my_account/affiliate/affiliate_statistics,in-commerce/my_account/affiliate/affiliate_materials"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement design="content_box">
+
+				<inp2:m_Capture to_var="header">
+					<inp2:m_Phrase label="lu_AffiliateMaterials"/>
+				</inp2:m_Capture>
+
+				<inp2:m_if check="u_IsAffiliate">
+					<table>
+						<tr>
+							<td colspan="2"><inp2:m_Phrase label="lu_AffiliateMaterials"/></td>
+						</tr>
+						<tr>
+							<td>
+								<inp2:m_Phrase label="lu_comm_AffilliateMaterialsToRefer"/>:
+								<br /><br />
+								 <a href="<inp2:affil_GetUserAffiliateLink template="index"/>"><inp2:affil_GetUserAffiliateLink template="index"/></a>
+							</td>
+						</tr>
+						<tr>
+							<td>
+								<inp2:m_Phrase label="lu_comm_AffilliateMaterialsCode"/>:
+								<blockquote style="border: 1px dashed #cccccc; background-color: #f3f3f3; padding: 8px">
+								<small>
+								&lt;a href="<inp2:affil_GetUserAffiliateLink template="index"/>"&gt;
+									<inp2:conf_ConfigValue name="Site_Name"/>
+								&lt;/a&gt;
+								</small>
+								</blockquote>
+								<inp2:m_Phrase label="lu_comm_AffilliateMaterialsCopy"/>
+							</td>
+						</tr>
+					</table>
+				</inp2:m_if>
+			</inp2:m_RenderElement>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_materials.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.7
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_thankyou.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_thankyou.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_thankyou.tpl	(revision 12131)
@@ -0,0 +1,55 @@
+<!--##
+<NAME>Affiliate - Thank you</NAME>
+<DESC>Thank you for Becoming Affiliate</DESC>
+<SECTION>My Account||Store||Affiliates</SECTION>
+##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_phrase name="lu_title_AffiliateRegistration"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_if check="u_IsAffiliate">
+				<inp2:m_RenderElement name="in-commerce/elements/side_boxes/affiliate_navigation.elm" design="blue_box"/>
+			</inp2:m_if>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/top_seller_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_MyAccount,lu_title_Affiliate,lu_title_AffiliateRegistration" templates="platform/my_account/my_account,in-commerce/my_account/affiliate/affiliate,in-commerce/my_account/affiliate/affiliate_thankyou"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement design="content_box">
+				<inp2:m_Capture to_var="header">
+					<inp2:m_phrase name="lu_title_AffiliateRegistration"/>
+				</inp2:m_Capture>
+
+				<inp2:m_Phrase label="lu_ThankYouForBecomingAffiliate"/>
+			</inp2:m_RenderElement>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_thankyou.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.6
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_statistics_orders_list.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_statistics_orders_list.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_statistics_orders_list.tpl	(revision 12131)
@@ -0,0 +1,79 @@
+<!--##
+<NAME>Affiliate - Orders List</NAME>
+<DESC>Affiliate Orders List page</DESC>
+<SECTION>My Account||Store||Affiliates</SECTION>
+##-->
+
+<inp2:m_RequireLogin login_template="platform/login/register"/> <!--## LOGIN REQUIRED ##-->
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" /> <!--## CHECK IF SSL REQUIRED ##-->
+<inp2:m_RequireAffiliate registration_template="in-commerce/my_account/affiliate/affiliate" /> <!--## MUST BE AN AFFILIATE ##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_Phrase label="lu_title_AffiliateStatisticsOrders"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_if check="u_IsAffiliate">
+				<inp2:m_RenderElement name="in-commerce/elements/side_boxes/affiliate_navigation.elm" design="blue_box"/>
+			</inp2:m_if>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/top_seller_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_MyAccount,lu_title_Affiliate,lu_title_AffiliateStatistics,lu_title_AffiliateStatisticsOrders" templates="platform/my_account/my_account,in-commerce/my_account/affiliate/affiliate,in-commerce/my_account/affiliate/affiliate_statistics,in-commerce/my_account/affiliate/affiliate_statistics_orders_list"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement design="content_box" block_no_data="no_orders">
+
+				<inp2:visits_InitList list_name="visitors_orders_list" types="myvisitororders" grid="visitsincommerce"/>
+
+				<inp2:m_Capture to_var="header">
+					<inp2:m_Phrase label="lu_title_AffiliateStatisticsOrders"/>
+				</inp2:m_Capture>
+
+				<inp2:m_include template="in-commerce/elements/affiliate_date_filter.elm" prefix="visits.incommerce" field="VisitDate" grid_name="visitsincommerce"/>
+
+				<inp2:m_include template="in-commerce/elements/affiliates.elm"/>
+
+				<table class="fullwidth">
+					<inp2:m_RenderElement name="separator" colspan="4"/>
+					<tr class="sub-section-header">
+						<td><inp2:m_Phrase label="lu_col_Date"/></td>
+						<td><inp2:m_Phrase label="lu_col_OrderNumber"/></td>
+						<td><inp2:m_Phrase label="lu_col_OrderTotalAmount"/></td>
+						<td><inp2:m_Phrase label="lu_col_OrderCommissionEarned"/></td>
+					</tr>
+					<inp2:m_RenderElement name="separator" colspan="5"/>
+					<inp2:visits_PrintList list_name="visitors_orders_list" render_as="my_order_element"/>
+					<inp2:visits_AffiliateOrderInfo list_name="visitors_orders_list" types="myvisitors" render_as="affiliate_orders_info" currency="selected" />
+				</table>
+
+				<inp2:m_include template="platform/elements/pagination.elm" prefix="visits" list_name="visitors_orders_list"/>
+			</inp2:m_RenderElement>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_statistics_orders_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.8
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_statistics_visits_list.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_statistics_visits_list.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_statistics_visits_list.tpl	(revision 12131)
@@ -0,0 +1,81 @@
+<!--##
+<NAME>Affiliate - Visits List</NAME>
+<DESC>Affiliate Visits List page</DESC>
+<SECTION>My Account||Store||Affiliates</SECTION>
+##-->
+
+<inp2:m_RequireLogin login_template="platform/login/register"/> <!--## LOGIN REQUIRED ##-->
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" /> <!--## CHECK IF SSL REQUIRED ##-->
+<inp2:m_RequireAffiliate registration_template="in-commerce/my_account/affiliate/affiliate" /> <!--## MUST BE AN AFFILIATE ##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_Phrase label="lu_title_AffiliateStatisticsVisits"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_if check="u_IsAffiliate">
+				<inp2:m_RenderElement name="in-commerce/elements/side_boxes/affiliate_navigation.elm" design="blue_box"/>
+			</inp2:m_if>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/top_seller_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</di>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_MyAccount,lu_title_Affiliate,lu_title_AffiliateStatistics,lu_title_AffiliateStatisticsVisits" templates="platform/my_account/my_account,in-commerce/my_account/affiliate/affiliate,in-commerce/my_account/affiliate/affiliate_statistics,in-commerce/my_account/affiliate/affiliate_statistics_visits_list"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement design="content_box" block_no_data="no_visitors">
+				<inp2:visits_InitList list_name="visitors_list" types="myvisitors" grid="visitsincommerce"/>
+
+				<inp2:m_Capture to_var="header">
+					<inp2:m_Phrase label="lu_title_AffiliateStatisticsVisits"/> (<inp2:visits_TotalRecords list_name="visitors_list" />)
+				</inp2:m_Capture>
+
+				<inp2:m_include template="in-commerce/elements/affiliate_date_filter.elm" prefix="visits.incommerce" field="VisitDate" grid_name="visitsincommerce"/>
+
+				<inp2:m_include template="in-commerce/elements/affiliates.elm"/>
+
+				<table class="fullwidth">
+					<inp2:m_RenderElement name="separator" colspan="5"/>
+					<tr class="sub-section-header">
+						<td><inp2:m_Phrase label="lu_col_Date"/></td>
+						<td><inp2:m_Phrase label="lu_col_Referer"/></td>
+						<td><inp2:m_Phrase label="lu_col_OrderCount"/></td>
+						<td><inp2:m_Phrase label="lu_col_OrderTotalAmount"/></td>
+						<td><inp2:m_Phrase label="lu_col_OrderCommissionEarned"/></td>
+					</tr>
+					<inp2:m_RenderElement name="separator" colspan="5"/>
+					<inp2:visits_PrintList list_name="visitors_list" render_as="my_visitor_element"/>
+					<inp2:visits_AffiliateOrderInfo list_name="visitors_list" types="myvisitors" render_as="affiliate_visits_info" currency="selected" />
+				</table>
+
+				<inp2:m_include template="platform/elements/pagination.elm" prefix="visits" list_name="visitors_list"/>
+			</inp2:m_RenderElement>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
+
+

Property changes on: branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_statistics_visits_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.8
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_payment_type_changed.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_payment_type_changed.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_payment_type_changed.tpl	(revision 12131)
@@ -0,0 +1,57 @@
+<!--##
+<NAME>Affiliate - Payment Type Changed</NAME>
+<DESC>Affiliate Payment Type Changed page</DESC>
+<SECTION>My Account||Store||Affiliates</SECTION>
+##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_Phrase label="lu_title_AffiliatePaymentTypeChanged"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_if check="u_IsAffiliate">
+				<inp2:m_RenderElement name="in-commerce/elements/side_boxes/affiliate_navigation.elm" design="blue_box"/>
+			</inp2:m_if>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/top_seller_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_MyAccount,lu_title_Affiliate,lu_title_AffiliateStatistics,lu_title_AffiliatePaymentType,lu_title_AffiliatePaymentTypeChanged" templates="platform/my_account/my_account,in-commerce/my_account/affiliate/affiliate,in-commerce/my_account/affiliate/affiliate_payment_type,in-commerce/my_account/affiliate/affiliate_payment_type_changed"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement design="content_box">
+
+				<inp2:m_Capture to_var="header">
+					<inp2:m_Phrase label="lu_title_AffiliatePaymentTypeChanged"/>
+				</inp2:m_Capture>
+
+				<inp2:m_Phrase label="lu_AffiliatePaymentTypeChangedMessage"/>
+
+			</inp2:m_RenderElement>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_payment_type_changed.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.7
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_statistics.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_statistics.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_statistics.tpl	(revision 12131)
@@ -0,0 +1,65 @@
+<!--##
+<NAME>Affiliate - Statistics</NAME>
+<DESC>Affiliate Statistics page</DESC>
+<SECTION>My Account||Store||Affiliates</SECTION>
+##-->
+
+<inp2:m_RequireLogin login_template="platform/login/register"/> <!--## LOGIN REQUIRED ##-->
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" /> <!--## CHECK IF SSL REQUIRED ##-->
+<inp2:m_RequireAffiliate registration_template="in-commerce/my_account/affiliate/affiliate" /> <!--## MUST BE AN AFFILIATE ##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_Phrase label="lu_title_AffiliateStatistics"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_if check="u_IsAffiliate">
+				<inp2:m_RenderElement name="in-commerce/elements/side_boxes/affiliate_navigation.elm" design="blue_box"/>
+			</inp2:m_if>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/top_seller_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_MyAccount,lu_title_Affiliate,lu_title_AffiliateStatistics" templates="platform/my_account/my_account,in-commerce/my_account/affiliate/affiliate,in-commerce/my_account/affiliate/affiliate_statistics"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement design="content_box">
+				<inp2:visits_InitList list_name="visitors_list" types="myvisitors" grid="visitsincommerce" per_page="5"/>
+
+				<inp2:m_Capture to_var="header">
+					<inp2:m_Phrase label="lu_title_AffiliateStatistics"/>
+				</inp2:m_Capture>
+
+				<inp2:m_include template="in-commerce/elements/affiliate_date_filter.elm" prefix="visits.incommerce" field="VisitDate" grid_name="visitsincommerce"/>
+
+				<inp2:m_include template="in-commerce/elements/affiliates.elm"/>
+
+				<inp2:visits_AffiliateOrderInfo list_name="visitors_list" types="myvisitors" render_as="affiliate_info" currency="selected"/>
+			</inp2:m_RenderElement>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_statistics.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.8
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_agreement.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_agreement.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_agreement.tpl	(revision 12131)
@@ -0,0 +1,7 @@
+<!--##
+<NAME>Affiliate Agreement</NAME>
+<DESC>Affiliate Agreement page</DESC>
+<SECTION>My Account||Store||Affiliates</SECTION>
+##-->
+
+Affiliate Agreement!
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/my_account/affiliate/affiliate_agreement.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.2
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/my_account/edit_address.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/my_account/edit_address.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/my_account/edit_address.tpl	(revision 12131)
@@ -0,0 +1,94 @@
+<!--##
+<NAME>Edit Address</NAME>
+<DESC>Edit Address page</DESC>
+<SECTION>My Account||Store</SECTION>
+##-->
+
+<inp2:m_RequireLogin login_template="platform/login/register"/> <!--## LOGIN REQUIRED ##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_Phrase label="lu_title_EditAddress"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<!--## SIDE-BAR ELEMENT ##-->
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/categories.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/top_seller_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /SIDE-BAR ELEMENT ##-->
+
+<!--## MAIN CONTENT ##-->
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_MyAccount,lu_title_MyAddresses,lu_title_EditAddress" templates="platform/my_account/my_account,in-commerce/my_account/my_addresses,in-commerce/my_account/edit_address"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement design="content_box">
+				<inp2:m_Capture to_var="header">
+					<inp2:m_Phrase label="lu_title_EditAddress"/>
+				</inp2:m_Capture>
+
+				<form method="post" action="<inp2:m_FormAction />">
+					<span class="field-required">*</span> <inp2:m_phrase name="lu_IndicatesRequired"/><br /><br />
+
+					<inp2:m_if check="addr_HasError" field="any">
+						<inp2:m_RenderElement name="error_message" />
+					</inp2:m_if>
+
+					<inp2:m_if check="u.current_Field" name="cust_shipping_addr_block">
+						<strong><inp2:m_Phrase label="lu_AddressModificationBlocked"/></strong>
+					<inp2:m_else/>
+						<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/grey_pix.gif" width="100%" height="1" align="absmiddle" alt="" /><br /><br />
+
+						<table class="form-data fullwidth">
+							<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="To" title="lu_fld_FullName"/>
+							<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="Company" title="lu_fld_Company"/>
+							<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="Address1" title="lu_fld_AddressLine1"/>
+							<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="Address2" title="lu_fld_AddressLine2"/>
+							<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="City" title="lu_fld_City"/>
+							<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="State" title="lu_fld_State"/>
+							<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="Zip" title="lu_fld_ZipCode"/>
+							<inp2:m_RenderElement name="inp_edit_options" prefix="addr" field="Country" title="lu_fld_Country"/>
+							<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="Phone" title="lu_fld_Phone"/>
+							<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="Fax" title="lu_fld_Fax"/>
+							<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="Email" title="lu_fld_Email"/>
+							<inp2:m_RenderElement name="inp_edit_checkbox" prefix="addr" field="LastUsedAsShipping" title="lu_fld_LastUsedAsShipping"/>
+							<inp2:m_RenderElement name="inp_edit_checkbox" prefix="addr" field="LastUsedAsBilling" title="lu_fld_LastUsedAsBilling" is_last="1"/>
+
+							<inp2:m_RenderElement design="inp_edit_buttons">
+								<input class="button" type="submit" name="events[addr][OnUpdate]" value="<inp2:m_Phrase label="lu_btn_Update"/>"/>
+								<input type="hidden" name="next_template" value="in-commerce/my_account/my_addresses"/>
+							</inp2:m_RenderElement>
+						</table>
+					</inp2:m_if>
+				</form>
+			</inp2:m_RenderElement>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /MAIN CONTENT ##-->
+
+<!--## DESIGN TEMPLATE ##-->
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
+<!--## /DESIGN TEMPLATE ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/my_account/edit_address.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.6
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/my_account/cancel_recurring_ok.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/my_account/cancel_recurring_ok.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/my_account/cancel_recurring_ok.tpl	(revision 12131)
@@ -0,0 +1,72 @@
+<!--##
+<NAME>Cancel Reoccurring Order - Confirmation</NAME>
+<DESC>Cancel Reoccurring Order Confirmation page</DESC>
+<SECTION>My Account||Store</SECTION>
+##-->
+
+<inp2:m_RequireLogin login_template="platform/login/register"/> <!--## LOGIN REQUIRED ##-->
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" /> <!--## CHECK IF SSL REQUIRED ##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_phrase name="lu_title_CancelRecurring"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<!--## SIDE-BAR ELEMENTS ##-->
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/categories.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/top_seller_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /SIDE-BAR ELEMENTS ##-->
+
+<!--## MAIN CONTENT ##-->
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_MyAccount,lu_title_MyOrders,lu_title_CancelRecurring" templates="platform/my_account/my_account,in-commerce/my_account/my_orders,in-commerce/my_account/cancel_recurring_ok"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement design="content_box" block_no_data="no_orders">
+				<inp2:m_Capture to_var="header">
+					<inp2:m_phrase name="lu_title_CancelRecurring"/>
+				</inp2:m_Capture>
+
+				<table border="0" cellspacing="0" cellpadding="0">
+					<tr>
+				  		<td>
+							<br />
+							<strong><inp2:m_Phrase label="lu_CancelRecurring_confirmed" /></strong>
+							<br />
+							<br />
+							<inp2:m_Phrase label="lu_CancelRecurring_ok" />
+						</td>
+					</tr>
+					</table>
+			</inp2:m_RenderElement>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /MAIN CONTENT ##-->
+
+<!--## DESIGN TEMPLATE ##-->
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
+<!--## /DESIGN TEMPLATE ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/my_account/cancel_recurring_ok.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.6
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/my_account/new_address.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/my_account/new_address.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/my_account/new_address.tpl	(revision 12131)
@@ -0,0 +1,93 @@
+<!--##
+<NAME>Add New Address</NAME>
+<DESC>Add New Address Form</DESC>
+<SECTION>My Account||Store</SECTION>
+##-->
+
+<inp2:m_RequireLogin login_template="platform/login/register"/> <!--## LOGIN REQUIRED ##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_Phrase label="lu_title_AddAddress"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<!--## SIDE-BAR ELEMENT ##-->
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/top_seller_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /SIDE-BAR ELEMENT ##-->
+
+<!--## MAIN CONTENT ##-->
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_MyAccount,lu_title_MyAddresses,lu_title_AddAddress" templates="platform/my_account/my_account,in-commerce/my_account/my_addresses,in-commerce/my_account/new_address"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement design="content_box">
+				<inp2:addr_PresetFormFields/>
+
+				<inp2:m_Capture to_var="header">
+					<inp2:m_Phrase label="lu_title_AddAddress"/>
+				</inp2:m_Capture>
+
+				<form method="post" action="<inp2:m_FormAction />">
+					<span class="field-required">*</span> <inp2:m_phrase name="lu_IndicatesRequired"/><br /><br />
+
+					<inp2:m_if check="addr_HasError" field="any">
+						<inp2:m_RenderElement name="error_message" />
+					</inp2:m_if>
+
+					<inp2:m_if check="u.current_Field" name="cust_shipping_addr_block">
+						<strong><inp2:m_Phrase label="lu_AddressModificationBlocked"/></strong>
+					<inp2:m_else/>
+						<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/grey_pix.gif" width="100%" height="1" align="absmiddle" alt="" /><br /><br />
+
+						<table class="form-data fullwidth">
+							<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="To" title="lu_fld_FullName"/>
+							<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="Company" title="lu_fld_Company"/>
+							<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="Address1" title="lu_fld_AddressLine1"/>
+							<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="Address2" title="lu_fld_AddressLine2"/>
+							<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="City" title="lu_fld_City"/>
+							<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="State" title="lu_fld_State"/>
+							<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="Zip" title="lu_fld_ZipCode"/>
+							<inp2:m_RenderElement name="inp_edit_options" prefix="addr" field="Country" title="lu_fld_Country"/>
+							<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="Phone" title="lu_fld_Phone"/>
+							<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="Fax" title="lu_fld_Fax"/>
+							<inp2:m_RenderElement name="inp_edit_box" prefix="addr" field="Email" title="lu_fld_Email"/>
+							<inp2:m_RenderElement name="inp_edit_checkbox" prefix="addr" field="LastUsedAsShipping" title="lu_fld_LastUsedAsShipping"/>
+							<inp2:m_RenderElement name="inp_edit_checkbox" prefix="addr" field="LastUsedAsBilling" title="lu_fld_LastUsedAsBilling" is_last="1"/>
+
+							<inp2:m_RenderElement design="inp_edit_buttons">
+								<input class="button" type="submit" name="events[addr][OnCreate]" value="<inp2:m_Phrase label="lu_btn_Create"/>"/>
+								<input type="hidden" name="next_template" value="in-commerce/my_account/my_addresses"/>
+							</inp2:m_RenderElement>
+						</table>
+					</inp2:m_if>
+				</form>
+			</inp2:m_RenderElement>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /MAIN CONTENT ##-->
+
+<!--## DESIGN TEMPLATE ##-->
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
+<!--## /DESIGN TEMPLATE ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/my_account/new_address.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.6
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/my_account/my_downloads.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/my_account/my_downloads.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/my_account/my_downloads.tpl	(revision 12131)
@@ -0,0 +1,73 @@
+<!--##
+<NAME>User Downloads</NAME>
+<DESC>List of User Downloads</DESC>
+<SECTION>My Account||Store</SECTION>
+##-->
+
+<inp2:m_RequireLogin login_template="platform/login/register"/> <!--## LOGIN REQUIRED ##-->
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" /> <!--## CHECK IF SSL REQUIRED ##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_phrase name="lu_title_MyDownloads"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<!--## SIDE-BAR ELEMENT ##-->
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/categories.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/top_seller_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /SIDE-BAR ELEMENT ##-->
+
+<!--## MAIN CONTENT ##-->
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_MyAccount,lu_title_MyDownloads" templates="platform/my_account/my_account,in-commerce/my_account/my_downloads"/>
+		</div>
+		<div class="movable-element">
+			<!--## MY DOWNLOADS LIST ##-->
+			<inp2:m_RenderElement design="content_box" block_no_data="no_products">
+				<inp2:p_InitList list_name="my_downloads" types="my_downloads" parent_cat_id="any" recursive="1"/>
+				<inp2:m_Capture to_var="header">
+					<inp2:m_phrase name="lu_title_MyDownloads"/> (<inp2:p_TotalRecords list_name="my_downloads"/>)
+				</inp2:m_Capture>
+
+				<inp2:m_include template="in-commerce/elements/sorting.elm" list_name="my_downloads"/>
+
+				<inp2:m_include template="in-commerce/elements/products.elm"/>
+
+				<table class="fullwidth item-listing">
+					<inp2:p_ListProducts list_name="my_downloads" render_as="downloadable_product_element"/>
+				</table>
+
+				<inp2:m_include template="platform/elements/pagination.elm" prefix="p" list_name="my_downloads"/>
+			</inp2:m_RenderElement>
+			<!--## /MY DOWNLOADS LIST ##-->
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /MAIN CONTENT ##-->
+
+<!--## DESIGN TEMPLATE ##-->
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
+<!--## /DESIGN TEMPLATE ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/my_account/my_downloads.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.8
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/my_account/my_items.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/my_account/my_items.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/my_account/my_items.elm.tpl	(revision 12131)
@@ -0,0 +1,29 @@
+<!--## ITEMS IN MY AFFILIATES SECTION ##-->
+<inp2:m_if check="m_ParamEquals" name="section" value="1">
+	<inp2:m_if check="m_ParamEquals" name="place" value="sidebox">
+		<inp2:m_if check="u_IsAffiliateOrRegisterAsAffiliateAllowed">
+			<inp2:m_RenderElement name="box_element" template="in-commerce/my_account/affiliate/affiliate" title="lu_Affiliate"  icon_image="in-commerce/img/ic_myaffiliate46.gif"/>
+		</inp2:m_if>
+	<inp2:m_else/>
+		<inp2:m_if check="u_IsAffiliateOrRegisterAsAffiliateAllowed">
+			<inp2:m_RenderElement name="my_account_element" template="in-commerce/my_account/affiliate/affiliate" title="lu_Affiliate" description="lu_description_Affiliate" icon_image="in-commerce/img/ic_myaffiliate46.gif"/>
+		</inp2:m_if>
+	</inp2:m_if>
+</inp2:m_if>
+<!--## /ITEMS IN MY AFFILIATES SECTION ##-->
+
+<!--## ITEMS IN MY ORDERS, DOWNLOADS, ADDRESSES SECTION ##-->
+<inp2:m_if check="m_ParamEquals" name="section" value="2">
+	<inp2:m_if check="m_ParamEquals" name="place" value="sidebox">
+		<inp2:m_RenderElement name="box_element" template="in-commerce/my_account/my_orders" title="lu_MyOrders" />
+		<inp2:m_RenderElement name="box_element" template="in-commerce/my_account/my_downloads" title="lu_MyDownloads"/>
+		<inp2:m_RenderElement name="box_element" template="in-commerce/my_account/my_addresses" title="lu_MyAddresses"/>
+	</inp2:m_if>
+
+	<inp2:m_if check="m_ParamEquals" name="place" value="contentbox">
+		<inp2:m_RenderElement name="my_account_element" template="in-commerce/my_account/my_orders" title="lu_MyOrders" description="lu_description_MyOrders" icon_image="in-commerce/img/ic_myorders46.gif"/>
+		<inp2:m_RenderElement name="my_account_element" template="in-commerce/my_account/my_downloads" title="lu_MyDownloads" description="lu_description_MyDownloads" icon_image="in-commerce/img/ic_mydownloads46.gif"/>
+		<inp2:m_RenderElement name="my_account_element" template="in-commerce/my_account/my_addresses" title="lu_MyAddresses" description="lu_description_MyAddresses" icon_image="in-commerce/img/ic_myorders46.gif"/>
+	</inp2:m_if>
+</inp2:m_if>
+<!--## /ITEMS IN MY ORDERS, DOWNLOADS, ADDRESSES SECTION ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/my_account/my_items.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/products/featured_products.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/products/featured_products.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/products/featured_products.tpl	(revision 12131)
@@ -0,0 +1,69 @@
+<!--##
+<NAME>Featured Products</NAME>
+<DESC>List of Featured Products</DESC>
+<SECTION>Platform||Products</SECTION>
+##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_phrase name="lu_title_FeaturedProducts"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<!--## SIDE-BAR ELEMENT ##-->
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/categories.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/top_seller_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /SIDE-BAR ELEMENT ##-->
+
+<!--## MAIN CONTENT ##-->
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_Products,lu_title_FeaturedProducts" templates="in-commerce/store/category,in-commerce/products/featured_products"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement design="content_box" data_exists="1">
+				<inp2:p_InitList list_name="featured_products" types="featured" recursive="1"/>
+
+				<inp2:m_Capture to_var="header">
+					<inp2:m_phrase name="lu_title_FeaturedProducts"/> (<inp2:p_TotalRecords list_name="featured_products"/>)
+				</inp2:m_Capture>
+
+				<inp2:m_include template="in-commerce/elements/sorting.elm" list_name="featured_products"/>
+
+				<inp2:m_include template="in-commerce/elements/products.elm"/>
+
+				<table class="fullwidth item-listing-featured table-border">
+					<inp2:p_ListProducts list_name="featured_products" render_as="product_element"/>
+				</table>
+
+				<inp2:m_include template="platform/elements/pagination.elm" prefix="p" list_name="featured_products"/>
+			</inp2:m_RenderElement>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /MAIN CONTENT ##-->
+
+<!--## DESIGN TEMPLATE ##-->
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
+<!--## /DESIGN TEMPLATE ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/products/featured_products.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.8
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/products/recent_products.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/products/recent_products.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/products/recent_products.tpl	(revision 12131)
@@ -0,0 +1,59 @@
+<!--##
+<NAME>Recent Products</NAME>
+<DESC>List of Recently Viewed Products</DESC>
+<SECTION>Platform||Products</SECTION>
+##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_Phrase label="lu_title_RecentlyViewedProducts"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/categories.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/top_seller_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_RecentlyViewedProducts" templates="in-commerce/products/recent_products"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement design="content_box">
+				<inp2:p_InitList list_name="recent_products" types="recent" parent_cat_id="any" recursive="1" except="in_cart"/>
+
+				<inp2:m_Capture to_var="header">
+					<inp2:m_Phrase label="lu_title_RecentlyViewedProducts"/> (<inp2:p_TotalRecords list_name="recent_products"/>)
+				</inp2:m_Capture>
+				<inp2:m_include template="in-commerce/elements/sorting.elm" list_name="recent_products"/>
+
+				<inp2:m_include template="in-commerce/elements/products.elm"/>
+
+				<table class="fullwidth item-listing">
+					<inp2:p_ListProducts list_name="recent_products" render_as="product_element"/>
+				</table>
+
+				<inp2:m_include template="platform/elements/pagination.elm" prefix="p" list_name="recent_products"/>
+			</inp2:m_RenderElement>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>

Property changes on: branches/5.1.x/themes/default2009/in-commerce/products/recent_products.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.9
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/products/add_review_confirm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/products/add_review_confirm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/products/add_review_confirm.tpl	(revision 12131)
@@ -0,0 +1,50 @@
+<!--##
+<NAME>Product - Review Confirmation</NAME>
+<DESC>Product Review Confirmation page</DESC>
+<SECTION>Platform||Products</SECTION>
+##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_phrase name="lu_title_AddProductReviewConfirm"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<!--## SIDE-BAR ELEMENT ##-->
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/action_box.elm" item_actions="1" design="blue_box"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## //SIDE-BAR ELEMENT ##-->
+
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="__item__,lu_title_ReviewProduct,lu_title_AddProductReviewConfirm" templates="__default__,in-commerce/products/add_review,in-commerce/products/add_review_confirm" show_category="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement design="content_box">
+				<inp2:m_Capture to_var="header">
+					<inp2:m_phrase name="lu_title_AddProductReviewConfirm"/>
+				</inp2:m_Capture>
+
+				<inp2:m_phrase name="lu_text_AddProductReviewConfirm"/><br /><br />
+				<a href="<inp2:p_ProductLink template="__default__"/>"><inp2:p_Field name="Name"/></a>
+			</inp2:m_RenderElement>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/products/add_review_confirm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.7
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/products/search_results.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/products/search_results.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/products/search_results.tpl	(revision 12131)
@@ -0,0 +1,70 @@
+<!--##
+<NAME>Products - Search Results</NAME>
+<DESC>List of Products Search Results</DESC>
+<SECTION>Platform||Products</SECTION>
+##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_Phrase label="lu_title_ProductSearchResults"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<!--## SIDE-BAR ELEMENT ##-->
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/categories.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/top_seller_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## SIDE-BAR ELEMENT ##-->
+
+<!--## MAIN CONTENT ##-->
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_ProductSearchResults" templates="in-commerce/search/search_results"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement design="content_box">
+				<inp2:p_InitList list_name="product_search_results" types="search" parent_cat_id="any" recursive="1" except="in_cart"/>
+
+				<inp2:m_Capture to_var="header">
+					<inp2:m_Phrase label="lu_title_ProductSearchResults"/> (<inp2:p_TotalRecords list_name="product_search_results"/>)
+				</inp2:m_Capture>
+
+				<inp2:m_include template="in-commerce/elements/sorting.elm" list_name="product_search_results"/>
+
+				<inp2:m_include template="in-commerce/elements/products.elm"/>
+				<inp2:m_include template="platform/elements/search_results.elm"/>
+
+				<table class="fullwidth item-listing">
+					<inp2:p_ListProducts list_name="product_search_results" render_as="product_element" show_relevance="1"/>
+				</table>
+
+				<inp2:m_include template="platform/elements/pagination.elm" prefix="p" list_name="product_search_results"/>
+			</inp2:m_RenderElement>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /MAIN CONTENT ##-->
+
+<!--## DESIGN TEMPLATE ##-->
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
+<!--## /DESIGN TEMPLATE ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/products/search_results.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.10
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/products/add_review.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/products/add_review.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/products/add_review.tpl	(revision 12131)
@@ -0,0 +1,155 @@
+<!--##
+<NAME>Product - Add Review</NAME>
+<DESC>Add Product Review Form</DESC>
+<SECTION>Platform||Products</SECTION>
+##-->
+
+<inp2:m_RequireLogin login_template="platform/login/register" permissions="PRODUCT.REVIEW|PRODUCT.REVIEW.PENDING"/>
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:p_Field name="Name"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<!--## SIDE-BAR ELEMENT ##-->
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/action_box.elm" item_actions="1" design="blue_box"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## //SIDE-BAR ELEMENT ##-->
+
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="__item__,lu_title_ReviewProduct" templates="__default__,in-commerce/products/add_review" show_category="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement design="content_box">
+				<inp2:m_Capture to_var="header">
+					<inp2:m_phrase name="lu_title_ProductDetails"/>
+				</inp2:m_Capture>
+
+				<table class="fullwidth table-border">
+					<tr><td class="item-padding">
+
+				<img src="<inp2:m_TemplatesBase module="In-Commerce"/>img/shopping_cart_item.gif" alt=""/> <span class="text-title">
+				<a href="<inp2:p_ProductLink template="__default__"/>"><inp2:p_Field name="Name"/></a></span>
+
+				<inp2:m_if check="p_Field" name="IsHot"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_hot.gif" alt="<inp2:m_phrase name="lu_Hot"/>"/></inp2:m_if>
+				<inp2:m_if check="p_Field" name="IsNew"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_new.gif" alt="<inp2:m_phrase name="lu_New"/>"/></inp2:m_if>
+				<inp2:m_if check="p_Field" name="IsPop"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_popular.gif" alt="<inp2:m_phrase name="lu_Pop"/>"/></inp2:m_if>
+				<inp2:m_if check="p_IsEditorsPick"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_pick.gif" alt="<inp2:m_phrase name="lu_Pick"/>"/></inp2:m_if>
+				<inp2:m_if check="p_IsFavorite"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_favorite.gif" alt="<inp2:m_phrase name="lu_Favorite"/>"/></inp2:m_if>
+
+				<inp2:p_VotesIndicator render_as="rating_element"/>
+
+				<br />
+				<br />
+
+				<table>
+					<tr>
+						<td style="text-align: center; padding-right: 10px;" valign="top">
+							<!--## Check if image exists ##-->
+							<inp2:m_if check="p_ImageSrc" MaxWidth="fullsize">
+								<a href="<inp2:p_ImageSrc MaxWidth="fullsize" DefaultImage="platform/img/no_picture.gif"/>" class="thickbox" rel="product-images" target="_blank" title="<inp2:p_Field name='Name' html_escape='1'/>">
+								<inp2:p_Image render_as="image_element" Primary="1" MaxWidth="thumbnail" DefaultImage="platform/img/no_picture.gif"/><br />
+							</a>
+							<!--## Check if image exists ##-->
+							<inp2:m_else/>
+								<inp2:p_Image render_as="image_element" Primary="1" MaxWidth="thumbnail" DefaultImage="platform/img/no_picture.gif"/><br />
+							</inp2:m_if>
+							<br />
+						</td>
+						<td valign="top">
+							<strong><inp2:m_phrase label="lu_Added"/>:</strong> <inp2:p_field field="CreatedOn_date" format="_regional_DateFormat"/><br />
+							<strong><inp2:m_phrase label="lu_Hits"/>:</strong> <inp2:p_field field="Hits"/><br />
+							<strong><inp2:m_phrase label="lu_Reviews"/>:</strong> <inp2:p_field field="CachedReviewsQty"/>
+
+							<strong><inp2:m_phrase label="lu_Rating"/>:</strong> <inp2:p_field field="CachedRating"/> (<inp2:m_phrase label="lu_Votes"/>: <inp2:p_field field="CachedVotesQty"/>)
+
+							<br />
+
+							<inp2:m_if check="p_Field" name="ManufacturerId">
+								<strong><inp2:m_Phrase label="lu_fld_Manufacturer"/>:</strong> <inp2:p_field name="ManufacturerId"/> (<inp2:m_Phrase label="lu_comm_OtherProductsBy"/> <a href="<inp2:p_ManufacturerLink template="in-commerce/products/manufacturer_products" />"><inp2:p_Field name="ManufacturerId"/></a> <inp2:m_Phrase label="lu_comm_OtherProducts"/>) <br />
+							</inp2:m_if>
+
+							<inp2:m_if check="p_Field" name="MSRP">
+								<strong><inp2:m_Phrase label="lu_fld_MSRP"/>:</strong> <span class="product-price-msrp"><inp2:p_Field name="MSRP" currency="selected"/></span> <br />
+							</inp2:m_if>
+
+							<strong><inp2:m_Phrase label="lu_fld_OurPrice"/>: <span class="product-price"><inp2:p_Field name="Price" currency="selected"/></span></strong> <br />
+
+							<inp2:m_if check="p_Savings">
+								<strong><inp2:m_Phrase label="lu_fld_YouSave"/>: <span class="product-price"><inp2:p_Savings currency="selected" /> (<inp2:p_Savings type="percent"/>%)</span></strong><br/>
+							</inp2:m_if>
+							<br />
+
+							<inp2:m_if check="p_Field" name="DescriptionExcerpt">
+								<span class="listing-field-name"><inp2:m_Phrase label="lu_fld_Description"/>:</span> <inp2:p_Field name="DescriptionExcerpt" nl2br="1"/><br/>
+							</inp2:m_if>
+
+
+						</td>
+					</tr>
+					</table>
+				</td></tr></table>
+			</inp2:m_RenderElement>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement design="content_box">
+				<inp2:m_Capture to_var="header">
+					<inp2:m_phrase name="lu_title_ReviewThisProduct"/>
+				</inp2:m_Capture>
+
+				<inp2:m_if check="p_HasPermission" permissions="PRODUCT.REVIEW|PRODUCT.REVIEW.PENDING">
+					<inp2:m_if check="p-rev_AlreadyReviewed">
+						<inp2:m_Phrase label="lu_ErrorAlreadyReviewed"/><br/><br/>
+						<table>
+							<inp2:p-rev_PrintList render_as="review_element" type="current_user"/>
+						</table>
+						<inp2:m_include template="platform/elements/pagination.elm" prefix="p-rev"/>
+					<inp2:m_else/>
+						<inp2:p-rev_PresetFormFields/>
+						<span class="field-required">*</span> <inp2:m_phrase name="lu_IndicatesRequired"/><br /><br />
+
+						<inp2:m_if check="p-rev_HasError" field="any">
+							<inp2:m_RenderElement name="error_message" />
+						</inp2:m_if>
+
+						<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/grey_pix.gif" width="100%" height="1" align="absmiddle" alt="" /><br /><br />
+
+						<form method="post" action="<inp2:m_FormAction/>">
+							<table class="form-data fullwidth">
+								<inp2:m_RenderElement name="inp_edit_radio" prefix="p-rev" field="Rating" title="lu_fld_Rating"/>
+								<inp2:m_RenderElement name="inp_edit_textarea" prefix="p-rev" field="ReviewText" rows="8" cols="40" title="lu_fld_ReviewText" is_last="1"/>
+
+								<inp2:m_RenderElement design="inp_edit_buttons">
+									<input type="hidden" name="success_template" value="in-commerce/products/add_review_confirm" />
+										<input type="hidden" name="success_pending_template" value="in-commerce/products/add_review_pending_confirm" />
+										<input class="button" type="submit" name="events[p-rev][OnCreate]" value="<inp2:m_phrase label="lu_btn_Create"/>" />
+								</inp2:m_RenderElement>
+							</table>
+						</form>
+					</inp2:m_if>
+				<inp2:m_else/>
+					<inp2:m_phrase name="lu_text_NoProductReviewPermission"/>
+				</inp2:m_if>
+			</inp2:m_RenderElement>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/products/add_review.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.7
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/products/pick_products.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/products/pick_products.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/products/pick_products.tpl	(revision 12131)
@@ -0,0 +1,71 @@
+<!--##
+<NAME>Editor's Pick Products</NAME>
+<DESC>List of Editor's Pick Products</DESC>
+<SECTION>Platform||Products</SECTION>
+##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_phrase name="lu_title_PickProducts"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<!--## SIDE-BAR ELEMENT ##-->
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/categories.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/top_seller_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /SIDE-BAR ELEMENT ##-->
+
+<!--## MAIN CONTENT ##-->
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_PickProducts" templates="in-commerce/products/pick_products"/>
+		</div>
+		<div class="movable-element">
+			<!-- Editors Pick Products List -->
+			<inp2:m_RenderElement design="content_box" data_exists="1">
+				<inp2:p_InitList list_name="pick_products" types="pick" recursive="true"/>
+
+				<inp2:m_Capture to_var="header">
+					<inp2:m_phrase name="lu_title_PickProducts"/> (<inp2:p_TotalRecords list_name="pick_products"/>)
+				</inp2:m_Capture>
+
+				<inp2:m_include template="in-commerce/elements/sorting.elm" list_name="pick_products"/>
+
+				<inp2:m_include template="in-commerce/elements/products.elm"/>
+
+				<table class="fullwidth item-listing">
+					<inp2:p_ListProducts list_name="pick_products" render_as="product_element"/>
+				</table>
+
+				<inp2:m_include template="platform/elements/pagination.elm" prefix="p" list_name="pick_products"/>
+			</inp2:m_RenderElement>
+			<!-- //Editors Pick Products List -->
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /MAIN CONTENT ##-->
+
+<!--## DESIGN TEMPLATE ##-->
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
+<!--## /DESIGN TEMPLATE ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/products/pick_products.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.8
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/products/add_review_pending_confirm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/products/add_review_pending_confirm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/products/add_review_pending_confirm.tpl	(revision 12131)
@@ -0,0 +1,50 @@
+<!--##
+<NAME>Product - Pending Review Confirmation</NAME>
+<DESC>Product Pending Review Confirmation page</DESC>
+<SECTION>Platform||Products</SECTION>
+##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_phrase name="lu_title_AddProductReviewConfirm"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<!--## SIDE-BAR ELEMENT ##-->
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/action_box.elm" item_actions="1" design="blue_box"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## //SIDE-BAR ELEMENT ##-->
+
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="__item__,lu_title_ReviewPendingProduct,lu_title_AddProductReviewPendingConfirm" templates="__default__,in-commerce/products/add_review,in-commerce/products/add_review_pending_confirm" show_category="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement design="content_box">
+				<inp2:m_Capture to_var="header">
+					<inp2:m_phrase name="lu_title_AddProductReviewConfirm"/>
+				</inp2:m_Capture>
+
+				<inp2:m_phrase name="lu_text_AddProductReviewPendingConfirm"/><br /><br />
+				<a href="<inp2:p_ProductLink template="__default__"/>"><inp2:p_Field name="Name"/></a>
+			</inp2:m_RenderElement>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/products/add_review_pending_confirm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.7
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/products/top_seller_products.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/products/top_seller_products.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/products/top_seller_products.tpl	(revision 12131)
@@ -0,0 +1,66 @@
+<!--##
+<NAME>Top-Seller Products</NAME>
+<DESC>List of Top-Seller Products</DESC>
+<SECTION>Platform||Products</SECTION>
+##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_phrase name="lu_title_TopSellerProducts"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<!--## SIDE-BAR ELEMENT ##-->
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/categories.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /SIDE-BAR ELEMENT ##-->
+
+<!--## MAIN CONTENT ##-->
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_TopSellerProducts" templates="in-commerce/products/top_seller_products"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement design="content_box">
+				<inp2:p_InitList list_name="top_seller_products" types="hot" recursive="1"/>
+
+				<inp2:m_Capture to_var="header">
+					<inp2:m_phrase name="lu_title_TopSellerProducts"/> (<inp2:p_TotalRecords list_name="top_seller_products"/>)
+				</inp2:m_Capture>
+
+				<inp2:m_include template="in-commerce/elements/sorting.elm" list_name="top_seller_products"/>
+
+				<inp2:m_include template="in-commerce/elements/products.elm"/>
+
+				<table class="fullwidth item-listing">
+					<inp2:p_ListProducts list_name="top_seller_products" render_as="product_element"/>
+				</table>
+
+				<inp2:m_include template="platform/elements/pagination.elm" prefix="p" list_name="top_seller_products"/>
+			</inp2:m_RenderElement>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /MAIN CONTENT ##-->
+
+<!--## DESIGN TEMPLATE ##-->
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
+<!--## /DESIGN TEMPLATE ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/products/top_seller_products.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.8
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/products/new_products.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/products/new_products.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/products/new_products.tpl	(revision 12131)
@@ -0,0 +1,71 @@
+<!--##
+<NAME>New Products</NAME>
+<DESC>List of New Products</DESC>
+<SECTION>Platform||Products</SECTION>
+##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_phrase name="lu_title_NewProducts"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<!--## SIDE-BAR ELEMENT ##-->
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/categories.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/top_seller_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /SIDE-BAR ELEMENT ##-->
+
+<!--## MAIN CONTENT ##-->
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_NewProducts" templates="in-commerce/products/new_products"/>
+		</div>
+		<div class="movable-element">
+			<!-- New Products List -->
+			<inp2:m_RenderElement design="content_box" data_exists="1">
+				<inp2:p_InitList list_name="new_products" types="new" recursive="true"/>
+
+				<inp2:m_Capture to_var="header">
+					<inp2:m_phrase name="lu_title_NewProducts"/> (<inp2:p_TotalRecords list_name="new_products"/>)
+				</inp2:m_Capture>
+
+				<inp2:m_include template="in-commerce/elements/sorting.elm" list_name="new_products"/>
+
+				<inp2:m_include template="in-commerce/elements/products.elm"/>
+
+				<table class="fullwidth item-listing">
+					<inp2:p_ListProducts list_name="new_products" render_as="product_element"/>
+				</table>
+
+				<inp2:m_include template="platform/elements/pagination.elm" prefix="p" list_name="new_products"/>
+			</inp2:m_RenderElement>
+			<!-- //New Products List -->
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## MAIN CONTENT ##-->
+
+<!--## DESIGN TEMPLATE ##-->
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
+<!--## /DESIGN TEMPLATE ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/products/new_products.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.8
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/products/manufacturer_products.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/products/manufacturer_products.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/products/manufacturer_products.tpl	(revision 12131)
@@ -0,0 +1,69 @@
+<!--##
+<NAME>Manufacturer Products</NAME>
+<DESC>List of Manufacturer Products</DESC>
+<SECTION>Platform||Products</SECTION>
+##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_Phrase label="lu_title_ProductsByManufacturer"/> <inp2:manuf_Field name="Name" />
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<!--## SIDE-BAR ELEMENT ##-->
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/categories.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/top_seller_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /SIDE-BAR ELEMENT ##-->
+
+<!--## MAIN CONTENT ##-->
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_ProductsByManufacturer" templates="in-commerce/products/manufacturer_products"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement design="content_box" data_exists="1">
+				<inp2:p_InitList list_name="manufacturer_products" types="manufacturer" recursive="1" parent_cat_id="any" />
+
+				<inp2:m_Capture to_var="header">
+					<inp2:m_Phrase label="lu_title_ProductsByManufacturer"/> <inp2:manuf_Field name="Name" /> (<inp2:p_TotalRecords list_name="manufacturer_products"/>)
+				</inp2:m_Capture>
+
+				<inp2:m_include template="in-commerce/elements/sorting.elm" list_name="manufacturer_products"/>
+
+				<inp2:m_include template="in-commerce/elements/products.elm"/>
+
+				<table class="fullwidth item-listing">
+					<inp2:p_ListProducts list_name="manufacturer_products" render_as="product_element"/>
+				</table>
+
+				<inp2:m_include template="platform/elements/pagination.elm" prefix="p" list_name="manufacturer_products"/>
+			</inp2:m_RenderElement>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /MAIN CONTENT ##-->
+
+<!--## DESIGN TEMPLATE ##-->
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
+<!--## /DESIGN TEMPLATE ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/products/manufacturer_products.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.8
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/checkout/preview.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/checkout/preview.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/checkout/preview.tpl	(revision 12131)
@@ -0,0 +1,62 @@
+<!--##
+<NAME>Order Preview</NAME>
+<DESC>Order Preview oage</DESC>
+<SECTION>Platform||Checkout</SECTION>
+##-->
+
+<inp2:m_RequireLogin condition="Comm_RequireLoginBeforeCheckout" login_template="platform/login/register"/> <!--## CHECK IF LOGIN REQUIRED ##-->
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" /> <!--## CHECK IF SSL REQUIRED ##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_Phrase label="lu_comm_OrderPreview"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<!--## SIDE-BAR ELEMENT ##-->
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/checkout_steps.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /SIDE-BAR ELEMENT ##-->
+
+<!--## MAIN CONTENT ##-->
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_ShoppingCart" templates="in-commerce/checkout/shop_cart"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement design="content_box">
+				<inp2:m_Capture to_var="header">
+					<inp2:m_Phrase label="lu_comm_OrderPreview"/>
+				</inp2:m_Capture>
+
+				<table width="100%" border="0" cellspacing="0" cellpadding="0">
+				<tr>
+					<td class="main-column-center">
+						<inp2:m_include template="in-commerce/elements/order_preview.elm"/>
+					</td>
+				</tr>
+				</table>
+			</inp2:m_RenderElement>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /MAIN CONTENT ##-->
+
+<!--## DESIGN TEMPLATE ##-->
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
+<!--## /DESIGN TEMPLATE ##-->

Property changes on: branches/5.1.x/themes/default2009/in-commerce/checkout/preview.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.8
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/checkout/shipping.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/checkout/shipping.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/checkout/shipping.tpl	(revision 12131)
@@ -0,0 +1,72 @@
+<!--##
+<NAME>Shipping step</NAME>
+<DESC>Shipping step where user enters his shipping inforamtion</DESC>
+<SECTION>Platform||Checkout</SECTION>
+##-->
+
+<inp2:m_RequireLogin condition="Comm_RequireLoginBeforeCheckout" login_template="platform/login/register"/> <!--## CHECK IF LOGIN REQUIRED ##-->
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" /> <!--## CHECK IF SSL REQUIRED ##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_Phrase label="lu_comm_ShippingInfo"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<!--## SIDE-BAR ELEMENT ##-->
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/checkout_steps.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /SIDE-BAR ELEMENT ##-->
+
+<!--## MAIN CONTENT ##-->
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_ShoppingCart" templates="in-commerce/checkout/shop_cart"/>
+		</div>
+		<div class="movable-element">
+			<script type="text/javascript">
+				function catchFormEnter(e, id)
+				{
+					if (typeof(e) == 'undefined') e = window.event;
+					if (!e) return;
+
+				 	if (e.keyCode == 13) { //enter
+				 		if (typeof(document.all) == 'undefined') e.preventDefault();
+				 		e.cancelBubble = true;
+						e.returnValue = false;
+
+				 		document.getElementById(id).focus();
+				 		document.getElementById(id).click();
+						return false;
+				 	}
+				}
+			</script>
+
+			<form method="post" onkeypress="catchFormEnter(event, 'events[ord][OnUpdate]')" action="<inp2:m_FormAction />">
+				<inp2:m_include template="in-commerce/elements/content_boxes/checkout/shipping_address.elm"/>
+				<inp2:m_include template="in-commerce/elements/content_boxes/checkout/shipping_options.elm"/>
+				<!--<inp2:m_include template="in-commerce/elements/content_boxes/checkout/shipping_calendar.elm"/>-->
+			</form>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /MAIN CONTENT ##-->
+
+<!--## DESIGN TEMPLATE ##-->
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
+<!--## /DESIGN TEMPLATE ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/checkout/shipping.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.8
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/checkout/shop_cart.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/checkout/shop_cart.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/checkout/shop_cart.tpl	(revision 12131)
@@ -0,0 +1,325 @@
+<!--##
+<NAME>Shopping cart</NAME>
+<DESC>Shopping cart page</DESC>
+<SECTION>Platform||Checkout</SECTION>
+##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_Phrase label="lu_title_ShoppingCart"/><inp2:m_if check="orditems_TotalRecords"> (<inp2:orditems_TotalRecords/>)</inp2:m_if>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<!--## SIDE-BAR ELEMENT ##-->
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/checkout_steps.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /SIDE-BAR ELEMENT ##-->
+
+<!--## MAIN CONTENT ##-->
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_ShoppingCart" templates="in-commerce/checkout/shop_cart"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement design="content_box">
+				<inp2:m_Capture to_var="header">
+					<inp2:m_Phrase label="lu_title_ShoppingCart"/><inp2:m_if check="orditems_TotalRecords"> (<inp2:orditems_TotalRecords/>)</inp2:m_if>
+				</inp2:m_Capture>
+
+				<form method="post" action="<inp2:m_FormAction />">
+
+				<inp2:m_if check="ord_CartHasError">
+					<table class="warning-message fullwidth">
+						<tr>
+							<td width="30">
+								<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/warning_icon.gif" width="21" height="18" alt=""/>
+							</td>
+							<td>
+								<inp2:m_phrase name="lu_Warning"/>
+							</td>
+						</tr>
+					</table>
+					<br />
+					<inp2:ord_CheckoutError state_changed="lu_comm_msg_state_changed" qty_unavailable="lu_comm_msg_qty_unavailable" outofstock="lu_comm_msg_outofstock"
+											coupon_applied="lu_comm_CouponApplied"
+											gift_certificate_applied="lu_comm_GiftCertificateApplied"
+											invalid_code="lu_comm_invalid_code" code_expired="lu_comm_code_expired"
+											min_qty="lu_min_qty_error" code_removed="lu_comm_CouponRemoved"
+											gc_code_removed="lu_comm_GiftCertificateRemoved"
+											code_removed_automatically="lu_comm_CouponIsNotEffective"
+											gc_code_removed_automatically="lu_comm_GiftCertificateIsNotEffective"
+											changed_after_login="lu_comm_CartChangedAfterLogin" /><br /><br />
+				</inp2:m_if>
+
+				<table class="fullwidth">
+					<inp2:m_DefineElement name="shop_cart_header">
+						<tr>
+							<td colspan="5">
+								<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="1" alt="" /></div>
+							</td>
+						</tr>
+						<tr class="sub-section-header">
+							<td><inp2:m_Phrase label="lu_comm_ProductDescription"/></td>
+							<td width="60"><inp2:m_Phrase label="lu_comm_YourPrice"/></td>
+							<td width="50"><inp2:m_Phrase label="lu_comm_Qty"/>.</td>
+							<td width="50"><inp2:m_Phrase label="lu_comm_Total"/></td>
+							<td width="25">&nbsp;</td>
+						</tr>
+						<tr>
+							<td colspan="5">
+								<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="1" alt="" /></div>
+							</td>
+						</tr>
+					</inp2:m_DefineElement>
+
+					<inp2:m_include template="in-commerce/elements/options_blocks.elm"/>
+
+					<inp2:m_DefineElement name="shop_cart_item">
+						<tr>
+							<td class="shopping-cart-cell-item-padding">
+
+								<table>
+									<tr>
+										<td class="shopping-cart-icpn-padding-right">
+											<img src="<inp2:m_TemplatesBase module="In-Commerce"/>img/shopping_cart_item.gif" width="16" height="14" alt="" />
+										</td>
+										<td>
+											<inp2:m_if check="FieldEquals" field="Virtual" value="0">
+												<a href="<inp2:ProductLink template="__default__"/>"><inp2:Field name="Name" /></a>
+												<inp2:m_if check="ord_FreePromoShippingAvailable">&nbsp;<sup><inp2:m_phrase label="lu_cart_FreeShippingAvailable" /></sup>
+												</inp2:m_if>
+											<inp2:m_else/>
+												<inp2:Field name="Name" />
+											</inp2:m_if>
+
+											<inp2:m_if check="ord_BackorderFlag"> <span class="error"><inp2:m_phrase label="lu_cart_BackorderFlag" /></span></inp2:m_if>
+											<inp2:m_if check="HasOptions">
+												<br/>
+												<span style="font-size: 8pt">
+												<inp2:m_if check="DisplayOptionsPricing">
+													<inp2:PrintOptions render_as="option_element" currency="selected"/>
+												<inp2:m_else/>
+													<inp2:PrintOptions render_as="option_element_no_price" currency="selected"/>
+												</inp2:m_if>
+												<inp2:m_if check="FieldEquals" field="OptionsSelectionMode" value="0">
+													<a href="<inp2:m_link template="__default__" pass="m,p,orditems"/>"><inp2:m_Phrase label="lu_comm_edit_options"/></a>
+												</inp2:m_if>
+												</span>
+											</inp2:m_if>
+											<inp2:m_if check="p_CustomField" name="Availability">
+												<br />
+												<inp2:p_CustomField name="Availability"/>
+											</inp2:m_if>
+											<inp2:m_if check="HasDiscount">
+												<br />
+												<inp2:m_Phrase label="lu_comm_RegularPrice" />: <inp2:Field name="FlatPrice" currency="selected"/><br />
+												<inp2:m_Phrase label="lu_comm_Discount" />: <span class="price1"><inp2:Field name="ItemDiscount" currency="selected" negative="1" /></span>
+												<!--<a href="javascript:showDiscountInfo('<inp2:ord_DiscountHelpLink template="in-commerce/checkout/discount_info" />')">[?]</a>-->
+											</inp2:m_if>
+
+										</td>
+									</tr>
+								</table>
+
+
+							</td>
+							<td class="shopping-cart-cell-item-padding"><strong><inp2:Field name="Price" currency="selected"/></strong></td>
+							<td class="shopping-cart-cell-item-padding">
+								<inp2:m_if check="IsTangible">
+
+									<inp2:m_if check="m_ModuleEnabled" module="In-Auction">
+										<inp2:m_if check="ebay-sections_IseBayItem">
+											<inp2:Field field="Quantity"/>
+										<inp2:m_else />
+											<input value="<inp2:Field field="Quantity"/>" style="width:20px" class="input-text" name="<inp2:InputName field="Quantity"/>" />
+										</inp2:m_if>
+									<inp2:m_else />
+										<input value="<inp2:Field field="Quantity"/>" style="width:20px" class="input-text" name="<inp2:InputName field="Quantity"/>" />
+									</inp2:m_if>
+									<!--<inp2:m_if check="ProductsInStock">
+										<inp2:m_Phrase name="lu_of"/> <inp2:ProductsInStock/>
+									</inp2:m_if>-->
+								<inp2:m_else />
+									1
+								</inp2:m_if>
+							</td>
+							<td class="shopping-cart-cell-item-padding"><strong><inp2:Field name="ExtendedPrice" currency="selected"/></strong></td>
+							<td class="shopping-cart-cell-item-padding" align="center">
+								<inp2:m_if check="m_ModuleEnabled" module="In-Auction">
+									<inp2:m_if check="ebay-sections_IseBayItem">
+										&nbsp;
+									<inp2:m_else />
+										<a href="<inp2:LinkRemoveFromCart/>"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/delete.gif" title="Delete" alt="Delete" width="8" height="10" border="0" /></a>
+									</inp2:m_if>
+								<inp2:m_else />
+									<a href="<inp2:LinkRemoveFromCart/>"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/delete.gif" title="Delete" alt="Delete" width="8" height="10" border="0" /></a>
+								</inp2:m_if>
+							</td>
+						</tr>
+						<tr>
+							<td colspan="5">
+								<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="1" alt="" /></div>
+							</td>
+						</tr>
+					</inp2:m_DefineElement>
+
+
+					<inp2:m_DefineElement name="shop_cart_footer">
+					</table>
+
+					<table width="100%">
+						<tr >
+							<td class="cart-subtotal">
+								<table width="100%">
+								<inp2:m_if check="ord_HasDiscount">
+									<tr>
+										<td>
+											<strong><inp2:m_Phrase label="lu_comm_TotalSavings" />:</strong>&nbsp;
+										</td>
+										<td>
+											<span class="price1"><strong><inp2:ord_Field name="DiscountTotal" currency="selected" /></strong></span>
+										</td>
+									</tr>
+									<tr>
+										<td colspan="2">
+											<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="5" alt="" />
+										</td>
+									</tr>
+								</inp2:m_if>
+								<inp2:m_if check="ord_Field" name="CouponId">
+									<tr>
+										<td>
+											<inp2:m_Phrase label="lu_comm_CouponHasBeenApplied" />:&nbsp;
+										</td>
+										<td>
+											<inp2:ord_Field field="CouponName" />&nbsp;&nbsp;
+
+											<a href="<inp2:ord_RemoveCouponLink type="coupon"/>"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/delete.gif" title="<inp2:m_Phrase label="lu_comm_RemoveCoupon"/>" alt="<inp2:m_Phrase label="lu_comm_RemoveCoupon"/>" width="8" height="10" border="0" /></a>
+										</td>
+									</tr>
+								<inp2:m_else />
+									<tr>
+										<td><inp2:m_Phrase label="lu_comm_EnterCouponCode" />:&nbsp;</td>
+										<td><input size="15" class="input-text"  name="coupon_code" /></td>
+									</tr>
+								</inp2:m_if>
+								<tr>
+									<td colspan="2">
+										<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="3" alt="" />
+									</td>
+								</tr>
+								<inp2:m_if check="ord_Field" name="GiftCertificateId">
+									<tr>
+										<td><inp2:m_Phrase label="lu_comm_GiftCertificateHasBeenApplied" />:&nbsp;</td>
+										<td>
+											<inp2:ord_Field field="GiftCertificateDiscount" currency="selected" />&nbsp;&nbsp;
+											<a href="<inp2:ord_RemoveCouponLink type="gift_certificate"/>"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/delete.gif" title="<inp2:m_Phrase label="lu_comm_RemoveGiftCertificate"/>" alt="<inp2:m_Phrase label="lu_comm_RemoveGiftCertificate"/>" width="8" height="10" border="0" /></a>
+										</td>
+									</tr>
+								<inp2:m_else />
+									<tr>
+										<td><inp2:m_Phrase label="lu_comm_EnterGiftCertificateCode" />:&nbsp;</td>
+										<td><input size="15" class="input-text"  name="giftcert_code" /></td>
+									</tr>
+								</inp2:m_if>
+								</table>
+							</td>
+							<td class="cart-subtotal" align="right">
+								<span class="cart-subtotal-text"><inp2:m_Phrase label="lu_comm_Subtotal"/>: <inp2:ord_Field field="SubtotalWithDiscount" currency="selected"/></span>
+							</td>
+						</tr>
+						<tr>
+							<td colspan="2">
+								<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="2" alt="" /><br />
+								<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="1" alt="" /></div>
+							</td>
+						</tr>
+						<input type="hidden" name="next_step_template" value="<inp2:m_if check="ord_OrderHasTangibleItems">in-commerce/checkout/shipping<inp2:m_else/>in-commerce/checkout/billing</inp2:m_if>" />
+						<tr>
+							<td class="shopping-cart-button-padding">
+								<input class="button" type="submit" name="events[ord][OnUpdateCart]" value="<inp2:m_Phrase label="lu_comm_UpdateCart"/>" />
+								&nbsp;
+								<input class="button" type="submit" name="events[ord][OnCleanupCart]" onclick="return confirm('<inp2:m_Phrase label="lu_comm_ClearCartConfirmation" />')" value="<inp2:m_Phrase label="lu_comm_CleanupCart"/>" />
+							</td>
+							<td class="shopping-cart-button-padding" align="right">
+
+								<input type="hidden" name="continue_shopping_template" value="__default__"/>
+								<input class="button" type="submit" name="events[ord][OnContinueShopping]" value="<inp2:m_Phrase label="lu_comm_Continue_Shopping"/>">
+								&nbsp;
+								<input class="button" type="submit" name="events[ord][OnCheckout]" value="<inp2:m_Phrase label="lu_comm_ProceedCheckout"/>" />
+							</td>
+						</tr>
+					</inp2:m_DefineElement>
+
+					<inp2:m_DefineElement name="shop_cart_empty">
+						<tr>
+							<td>
+								<strong><inp2:m_Phrase label="lu_comm_YourCartIsEmpty"/></strong>
+							</td>
+						</tr>
+					</inp2:m_DefineElement>
+
+					<script language="JavaScript">
+					function showDiscountInfo(url)
+					{
+						window.open(url, null, 'scrollbars=no,menubar=no,toolbars=no,width=300,height=150');
+					}
+					</script>
+
+					<inp2:ord_PrintCart item_render_as="shop_cart_item" header_render_as="shop_cart_header" footer_render_as="shop_cart_footer" empty_cart_render_as="shop_cart_empty" per_page="-1"/>
+				</table>
+				</form>
+
+				<inp2:m_if check="ord_CartNotEmpty">
+					<inp2:m_if check="ord_HasPaymentGateway" name="Google Checkout">
+						<inp2:m_DefineElement name="google_checkout_button">
+							<form method="POST" target="_blank" action="<inp2:ord_GetFormAction payment_type_id="$payment_type_id"/>">
+								<inp2:ord_GetFormHiddenFields return_template="in-commerce/checkout/checkout_success"
+															  cancel_template="in-commerce/checkout/billing"
+															  payment_type_id="$payment_type_id"/>
+
+								<inp2:m_if check="m_Param" name="submit_url" equals_to="https://checkout.google.com/api/checkout/v2">
+									<input type="image" name="Google Checkout" alt="Fast checkout through Google"
+							        	src="https://checkout.google.com/buttons/checkout.gif?merchant_id=<inp2:m_Param name="merchant_id"/>
+							              &w=180&h=46&style=white&variant=text&loc=en_US" height="46" width="180">
+								<inp2:m_else/>
+									<input type="image" name="Google Checkout" alt="Fast checkout through Google"
+							        src="http://sandbox.google.com/checkout/buttons/checkout.gif?merchant_id=<inp2:m_Param name="merchant_id"/>
+							              &w=180&h=46&style=white&variant=text&loc=en_US" height="46" width="180">
+								</inp2:m_if>
+							</form>
+						</inp2:m_DefineElement>
+
+						<inp2:ord_DisplayPaymentGateway name="Google Checkout" render_as="google_checkout_button"/>
+					</inp2:m_if>
+				</inp2:m_if>
+			</inp2:m_RenderElement>
+		</div>
+
+		<div class="movable-element">
+			<inp2:m_if check="ord_CartIsEmpty">
+				<inp2:m_include template="in-commerce/elements/content_boxes/pick_products.elm"/>
+			</inp2:m_if>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /MAIN CONTENT ##-->
+
+<!--## DESIGN TEMPLATE ##-->
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
+<!--## /DESIGN TEMPLATE ##-->

Property changes on: branches/5.1.x/themes/default2009/in-commerce/checkout/shop_cart.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.8
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/checkout/cvv2help.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/checkout/cvv2help.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/checkout/cvv2help.tpl	(revision 12131)
@@ -0,0 +1,46 @@
+<!--##
+<NAME>CVV2 Help page</NAME>
+<DESC>Page that explains about CVV2 code</DESC>
+<SECTION>Platform||Checkout</SECTION>
+##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_Phrase label="lu_comm_CVV2HELP"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<!--## SIDE-BAR ELEMENT ##-->
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## SIDE-BAR ELEMENT ##-->
+
+<!--## MAIN CONTENT ##-->
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement design="content_box">
+				<inp2:m_Capture to_var="header">
+					<inp2:m_Phrase label="lu_comm_CVV2HELP"/>
+				</inp2:m_Capture>
+				CVV2HELP TPL
+			</inp2:m_RenderElement>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /MAIN CONTENT ##-->
+
+<!--## DESIGN TEMPLATE ##-->
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
+<!--## /DESIGN TEMPLATE ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/checkout/cvv2help.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.5
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/checkout/checkout_success.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/checkout/checkout_success.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/checkout/checkout_success.tpl	(revision 12131)
@@ -0,0 +1,57 @@
+<!--##
+<NAME>Checkout Success step</NAME>
+<DESC>After payment received and approved</DESC>
+<SECTION>Platform||Checkout</SECTION>
+##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_Phrase label="lu_comm_OrderCompleted"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<!--## SIDE-BAR ELEMENT ##-->
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /SIDE-BAR ELEMENT ##-->
+
+<!--## MAIN CONTENT ##-->
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_ShoppingCart" templates="in-commerce/checkout/shop_cart"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement design="content_box">
+				<inp2:m_Capture to_var="header">
+					<inp2:m_Phrase label="lu_comm_OrderCompleted"/>
+				</inp2:m_Capture>
+
+				<inp2:m_Phrase label="lu_comm_ThankYou"/>!
+				<br/>
+				<inp2:m_Phrase label="lu_comm_OrderSuccessfullyPlaced"/>
+			</inp2:m_RenderElement>
+
+			<inp2:m_if check="u_SuggestRegister">
+				<inp2:m_include template="in-commerce/elements/content_boxes/checkout/form_register.elm"/>
+			</inp2:m_if>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /MAIN CONTENT ##-->
+
+<!--## DESIGN TEMPLATE ##-->
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
+<!--## /DESIGN TEMPLATE ##-->
+

Property changes on: branches/5.1.x/themes/default2009/in-commerce/checkout/checkout_success.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.7
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/checkout/billing.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/checkout/billing.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/checkout/billing.tpl	(revision 12131)
@@ -0,0 +1,77 @@
+<!--##
+<NAME>Billing step</NAME>
+<DESC>Billing step where user enters the payment inforamtion</DESC>
+<SECTION>Platform||Checkout</SECTION>
+##-->
+
+<inp2:m_RequireLogin condition="Comm_RequireLoginBeforeCheckout" login_template="platform/login/register"/> <!--## CHECK IF LOGIN REQUIRED ##-->
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" /> <!--## CHECK IF SSL REQUIRED ##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_Phrase label="lu_comm_BillingInfo"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<!--## SIDE-BAR ELEMENT ##-->
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/checkout_steps.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/recent_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /SIDE-BAR ELEMENT ##-->
+
+<!--## MAIN CONTENT ##-->
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="lu_title_ShoppingCart" templates="in-commerce/checkout/shop_cart"/>
+		</div>
+		<div class="movable-element">
+			<table width="100%" border="0" cellspacing="0" cellpadding="0">
+				<tr>
+					<td class="main-column-center">
+						<script type="text/javascript">
+							function catchFormEnter(e, id)
+							{
+								if (typeof(e) == 'undefined')	e = window.event;
+								if (!e) return;
+
+							 	if (e.keyCode == 13) { //enter
+							 		if (typeof(document.all) == 'undefined') e.preventDefault();
+							 		e.cancelBubble = true;
+									e.returnValue = false;
+
+							 		document.getElementById(id).focus();
+							 		document.getElementById(id).click();
+									return false;
+							 	}
+							}
+						</script>
+
+						<form id="billing_info" method="post" onkeypress="catchFormEnter(event, 'events[ord][OnUpdate]')" action="<inp2:m_FormAction />">
+							<inp2:m_include template="in-commerce/elements/content_boxes/checkout/billing_address.elm"/>
+							<inp2:m_include template="in-commerce/elements/content_boxes/checkout/billing_options.elm"/>
+						</form>
+					</td>
+				</tr>
+			</table>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /MAIN CONTENT ##-->
+
+<!--## DESIGN TEMPLATE ##-->
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
+<!--## /DESIGN TEMPLATE ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/checkout/billing.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.8
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/designs/detail.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/designs/detail.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/designs/detail.tpl	(revision 12131)
@@ -0,0 +1,302 @@
+<!--##
+<NAME>Product - Detail Design</NAME>
+<DESC>Product - Detail Design</DESC>
+<SECTION>Platform||Products</SECTION>
+##-->
+<inp2:p_AddToRecent /> <!--## ADD CURRENT PRODUCT TO RECENTLY VIEWED PRODUCTS ##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:p_Field name="Name"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<!--## SIDE-BAR ELEMENT ##-->
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/categories.elm" data_exists="1" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/action_box.elm" item_actions="1" design="blue_box"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /SIDE-BAR ELEMENT ##-->
+
+<!--## MAIN CONTENT ##-->
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm" titles="__item__" templates="__default__" show_category="1"/>
+		</div>
+		<div class="movable-element">
+			<!-- Product Details -->
+			<inp2:m_RenderElement design="content_box">
+				<inp2:m_Capture to_var="header">
+					<inp2:m_phrase name="lu_title_ProductDetails"/>
+				</inp2:m_Capture>
+
+				<table class="fullwidth table-border">
+					<tr>
+						<td class="item-padding">
+							<img src="<inp2:m_TemplatesBase module="In-Commerce"/>img/shopping_cart_item.gif" alt=""/> <span class="text-title"><inp2:p_Field name="Name"/></span>
+
+							<inp2:m_if check="p_Field" name="IsHot"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_hot.gif" alt="<inp2:m_phrase name="lu_Hot"/>"/></inp2:m_if>
+							<inp2:m_if check="p_Field" name="IsNew"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_new.gif" alt="<inp2:m_phrase name="lu_New"/>"/></inp2:m_if>
+							<inp2:m_if check="p_Field" name="IsPop"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_popular.gif" alt="<inp2:m_phrase name="lu_Pop"/>"/></inp2:m_if>
+							<inp2:m_if check="p_IsEditorsPick"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_pick.gif" alt="<inp2:m_phrase name="lu_Pick"/>"/></inp2:m_if>
+							<inp2:m_if check="p_IsFavorite"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_favorite.gif" alt="<inp2:m_phrase name="lu_Favorite"/>"/></inp2:m_if>
+
+							<inp2:p_VotesIndicator render_as="rating_element"/>
+
+							<br />
+							<br />
+
+							<table>
+								<tr>
+									<td style="text-align: center; padding-right: 10px;" valign="top">
+										<!--## Check if image exists ##-->
+										<inp2:m_if check="p_ImageSrc" MaxWidth="fullsize">
+											<a href="<inp2:p_ImageSrc DefaultImage="platform/img/no_picture.gif" format="resize:450x450;wm:platform/img/logo_watermark.png|-1|-1"/>" class="thickbox" rel="product-images" title="<inp2:p_Field name='Name' html_escape='1'/>">
+												<inp2:p_Image render_as="image_element" Primary="1" MaxWidth="thumbnail" DefaultWidth="150" DefaultImage="platform/img/no_picture.gif" align="center"/><br />
+											</a>
+										<!--## Check if image exists ##-->
+										<inp2:m_else/>
+											<inp2:p_Image render_as="image_element" Primary="1" MaxWidth="thumbnail" DefaultWidth="150" DefaultImage="platform/img/no_picture.gif" align="center"/><br />
+										</inp2:m_if>
+										<br />
+
+										<inp2:m_if check="p_HasAdditionalImages">
+											<a href="<inp2:p_ProductLink template="__default__" />#images"><inp2:m_Phrase label="lu_btn_MoreImages"/></a>
+											<br /><br />
+										</inp2:m_if>
+
+										<span class="product-price-large"><inp2:p_Field name="Price" currency="selected"/></span><br /><br />
+
+										<inp2:m_if check="p_Available">
+											<inp2:m_if check="p_ShouldListOptions" required_only="1"><inp2:m_else/>
+												<input class="button" onclick=" window.location.href='<inp2:p_AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>' " type="button" value="<inp2:m_Phrase label="lu_comm_BuyNow"/>" />
+											</inp2:m_if>
+										<inp2:m_else />
+											<strong><inp2:m_phrase label="lu_comm_outofstock"/></strong>
+										</inp2:m_if>
+									</td>
+									<td valign="top">
+										<strong><inp2:m_phrase label="lu_Added"/>:</strong> <inp2:p_field field="CreatedOn_date" format="_regional_DateFormat"/><br />
+										<strong><inp2:m_phrase label="lu_Hits"/>:</strong> <inp2:p_field field="Hits"/><br />
+										<strong><inp2:m_phrase label="lu_Reviews"/>:</strong> <inp2:p_field field="CachedReviewsQty"/>
+
+										<a href="<inp2:p_ProductLink template="in-commerce/products/add_review"/>"><inp2:m_phrase name="lu_btn_AddReview"/></a><br />
+										<strong><inp2:m_phrase label="lu_Rating"/>:</strong> <inp2:p_field field="CachedRating"/> (<inp2:m_phrase label="lu_Votes"/>: <inp2:p_field field="CachedVotesQty"/>)
+
+										<a href="<inp2:p_ProductLink template="in-commerce/products/add_review"/>"><inp2:m_phrase name="lu_btn_RateThisProduct"/></a><br />
+
+										<br />
+
+										<inp2:m_if check="p_Field" name="SKU">
+											<strong><inp2:m_Phrase label="lu_fld_SKU"/>:</strong> <inp2:p_field name="SKU"/><br />
+										</inp2:m_if>
+
+										<inp2:m_if check="p_Field" name="ManufacturerId">
+											<strong><inp2:m_Phrase label="lu_fld_Manufacturer"/>:</strong> <inp2:p_field name="ManufacturerId"/> (<inp2:m_Phrase label="lu_comm_OtherProductsBy"/> <a href="<inp2:p_ManufacturerLink template="in-commerce/products/manufacturer_products" />"><inp2:p_Field name="ManufacturerId"/></a> <inp2:m_Phrase label="lu_comm_OtherProducts"/>) <br />
+										</inp2:m_if>
+
+										<inp2:m_if check="p_Field" name="MSRP">
+											<strong><inp2:m_Phrase label="lu_fld_MSRP"/>:</strong> <span class="product-price-msrp"><inp2:p_Field name="MSRP" currency="selected"/></span> <br />
+										</inp2:m_if>
+
+										<strong><inp2:m_Phrase label="lu_fld_OurPrice"/>: <span class="product-price"><inp2:p_Field name="Price" currency="selected"/></span></strong> <br />
+
+										<inp2:m_if check="p_Savings">
+											<strong><inp2:m_Phrase label="lu_fld_YouSave"/>: <span class="product-price"><inp2:p_Savings currency="selected" /> (<inp2:p_Savings type="percent"/>%)</span></strong><br/>
+										</inp2:m_if>
+										<br />
+
+										<inp2:m_if check="p_CustomField" name="Availability">
+											<strong><inp2:p_CustomFieldLabel field="Availability"/>:</strong>
+											<inp2:p_CustomField name="Availability"/>
+											<br />
+											<br />
+										</inp2:m_if>
+
+										<inp2:m_if check="p_HasQuantityPricing">
+											<inp2:m_if check="p_IsTangible">
+												<table>
+													<tr>
+														<td colspan="2" class="block-header">
+															<inp2:m_Phrase label="lu_comm_QuantityPricing"/>
+														</td>
+													</tr>
+													<tr class="cart-header">
+														<td>
+															<inp2:m_Phrase label="lu_comm_Quantity"/>
+														</td>
+														<td>
+															<inp2:m_Phrase label="lu_comm_Price"/>
+														</td>
+													</tr>
+													<inp2:m_DefineElement name="price_bracket">
+														<tr class="cart-item-small">
+															<td>
+																<inp2:Field name="MinQty"/> - <inp2:Field name="MaxQty"/>
+															</td>
+															<td>
+																<inp2:m_if check="Field" name="Negotiated">
+																	<a href="mailto:<inp2:conf_ConfigValue name="Comm_Contacts_Email"/>"><inp2:conf_ConfigValue name="Comm_Contacts_Email"/></a>
+																<inp2:m_else/>
+																	<inp2:Field name="Price" currency="selected"/>
+																</inp2:m_if>
+															</td>
+														</tr>
+													</inp2:m_DefineElement>
+													<inp2:p_ListPriceBrackets render_as="price_bracket"/>
+												</table>
+												<br />
+											</inp2:m_if>
+
+											<inp2:m_if check="p_IsSubscription">
+												<table>
+													<tr>
+														<td colspan="3" class="block-header">
+															<inp2:m_Phrase label="lu_comm_Pricing"/>
+														</td>
+													</tr>
+													<tr class="cart-header">
+														<td>
+															<inp2:m_Phrase label="lu_comm_AccessDuration"/>
+														</td>
+														<td>
+															<inp2:m_Phrase label="lu_comm_Price"/>
+														</td>
+														<td>&nbsp;
+
+														</td>
+													</tr>
+													<inp2:m_DefineElement name="access_price_bracket">
+														<tr class="cart-item-small">
+															<td>
+																<inp2:Field name="AccessDuration"/> <inp2:Field name="AccessUnit"/>
+																<br />
+																<small><inp2:Field name="Description"/></small>
+															</td>
+															<td>
+																<inp2:Field name="Price" currency="selected"/>
+															</td>
+															<td>
+																<a href="<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>"><img src="<inp2:m_TemplatesBase module="In-Commerce"/>img/buy2.gif" alt="<inp2:m_Phrase label="lu_comm_BuyNow"/>" width="15" height="17" border="0" /></a>
+															</td>
+														</tr>
+													</inp2:m_DefineElement>
+													<inp2:p_ListPriceBrackets render_as="access_price_bracket"/>
+												</table>
+												<br />
+											</inp2:m_if>
+										</inp2:m_if>
+
+										<inp2:m_include template="in-commerce/elements/form_options.elm"/>
+
+										<inp2:m_if check="p_Field" name="Description">
+											<strong><inp2:m_Phrase label="lu_fld_Description"/>:</strong> <inp2:p_Field name="Description"/> <br />
+										</inp2:m_if>
+
+										<br />
+										<inp2:m_if check="p_CustomField" name="Features">
+											<strong><inp2:p_CustomFieldLabel field="Features"/>:</strong>
+											<inp2:p_CustomField name="Features"/>
+											<br />
+											<br />
+										</inp2:m_if>
+
+										<inp2:m_if check="p_IsFavorite">
+											<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/ic_removefromfav.gif" width="11" height="10" alt="" /> <a class="item-action" href="<inp2:p_FavoriteToggleLink/>"><inp2:m_phrase name="lu_btn_RemoveFromWishList"/></a>
+										<inp2:m_else/>
+											<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/ic_addtofav.gif" width="11" height="10" alt="" /> <a class="item-action" href="<inp2:p_FavoriteToggleLink template="platform/my_account/my_favorites"/>"><inp2:m_phrase name="lu_btn_AddToWishList"/></a>
+										</inp2:m_if>
+									</td>
+								</tr>
+							</table>
+
+					        <br />
+							<inp2:m_if check="p_HasAdditionalImages">
+								<!--## ADDITIONAL IMAGE ELEMENT ##-->
+								<inp2:m_DefineElement name="additional_image_element">
+									<td>
+										<a href="<inp2:ImageSrc format="resize:450x450;wm:platform/img/logo_watermark.png|-1|-1"/>" class="thickbox" rel="product-images" title="<inp2:m_param name="alt"/>">
+											<img src="<inp2:m_param name="img_path"/>" title="<inp2:m_param name="alt"/>" alt="<inp2:m_param name="alt"/>" <inp2:m_param name="img_size"/> border="0" /><br />
+										</a>
+									</td>
+									<inp2:m_if check="m_Param" name="not_last">
+										<td>
+											<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="8" height="1" alt="" />
+										</td>
+									</inp2:m_if>
+								</inp2:m_DefineElement>
+								<!--## /ADDITIONAL IMAGE ELEMENT ##-->
+
+								<a name="images"></a>
+
+								<inp2:m_RenderElement name="subsection" title="lu_section_AdditionalImages"/>
+								<table>
+									<tr>
+										<inp2:p_ListImages render_as="additional_image_element" types="additional" per_page="-1" no_table="1" MaxWidth="thumbnail" DefaultWidth="150" DefaultImage="platform/img/no_picture.gif"/>
+									</tr>
+								</table>
+							</inp2:m_if>
+						</td>
+					</tr>
+				</table>
+			</inp2:m_RenderElement>
+			<!-- // Product Details -->
+		</div>
+
+		<div class="movable-element">
+			<!-- Product Reviews -->
+			<inp2:m_DefineElement name="no_reviews">
+				<inp2:m_phrase name="lu_NoReviews"/>
+			</inp2:m_DefineElement>
+
+			<inp2:m_RenderElement design="content_box" data_exists="1" block_no_data="no_reviews">
+				<inp2:m_Capture to_var="header">
+					<inp2:m_phrase name="lu_section_Reviews"/> (<inp2:p-rev_TotalRecords/>)
+				</inp2:m_Capture>
+
+				<table>
+					<inp2:p-rev_PrintList render_as="review_element"/>
+				</table>
+				<inp2:m_include template="platform/elements/pagination.elm" prefix="p-rev"/>
+			</inp2:m_RenderElement>
+			<!-- // Product Reviews -->
+		</div>
+
+		<div class="movable-element">
+			<a name="related"></a>
+			<inp2:m_include template="in-commerce/elements/content_boxes/related_products.elm"/>
+
+
+			<!--## RELATED TO PRODUCT ITEMS ##-->
+			<inp2:m_RenderElement design="content_box" related_to="Product" data_exists="1">
+				<inp2:m_Capture to_var="header">
+					<inp2:m_Phrase label="lu_title_RelatedItems"/>
+				</inp2:m_Capture>
+
+				<inp2:m_ModuleInclude template="elements/content_boxes/related_items.elm" related_to="$related_to" skip_prefixes="p" />
+			</inp2:m_RenderElement>
+			<!--## // RELATED TO PRODUCT ITEMS ##-->
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /MAIN CONTENT ##-->
+
+<!--## DESIGN TEMPLATE ##-->
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
+<!--## /DESIGN TEMPLATE ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/designs/detail.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/designs/section.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/designs/section.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/designs/section.tpl	(revision 12131)
@@ -0,0 +1,104 @@
+<!--##
+<NAME>Product - Section Design</NAME>
+<DESC>Product - Section Design</DESC>
+<SECTION>Platform||Products</SECTION>
+##-->
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+	<inp2:m_include template="platform/elements/title_bar.elm"/>
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<!--## SIDE-BAR ELEMENT ##-->
+<inp2:m_DefineElement name="sidebar">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/cart_indicator.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/categories.elm" design="blue_box" data_exists="1"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/login.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="platform/elements/side_boxes/search.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/credit_cards.elm" design="blue_box"/>
+		</div>
+		<div class="movable-element">
+			<inp2:m_RenderElement name="in-commerce/elements/side_boxes/pick_products.elm" design="blue_box" data_exists="1"/>
+		</div>
+	</div>
+</inp2:m_DefineElement>
+<!--## /SIDE-BAR ELEMENT ##-->
+
+<!--## MAIN CONTENT ##-->
+<inp2:m_DefineElement name="content">
+	<div class="movable-area">
+		<div class="movable-element">
+			<inp2:m_include template="platform/elements/navigation_bar.elm"/>
+		</div>
+		<!--## IF IN-COMMERCE HOME PAGE ##-->
+		<inp2:m_if check="p_IsModuleHome">
+			<div class="movable-element">
+				<inp2:m_include template="in-commerce/elements/content_boxes/featured_products.elm"/>
+			</div>
+			<div class="movable-element">
+				<inp2:m_include template="in-commerce/elements/content_boxes/new_products.elm"/>
+			</div>
+			<div class="movable-element">
+				<inp2:m_include template="in-commerce/elements/content_boxes/pick_products.elm"/>
+			</div>
+		<inp2:m_else/>
+		<!--## /IF IN-COMMERCE HOME PAGE ##-->
+
+			<div class="movable-element">
+				<inp2:m_include template="platform/elements/content_boxes/sub_categories.elm"/>
+			</div>
+
+			<div class="movable-element">
+				<!-- Category Products List -->
+				<inp2:m_RenderElement design="content_box" block_no_data="no_products">
+					<inp2:p_InitList list_name="products_in_category" />
+
+					<inp2:m_Capture to_var="header">
+						<inp2:m_phrase name="lu_title_Products"/> (<inp2:p_TotalRecords list_name="products_in_category"/>)
+					</inp2:m_Capture>
+
+					<inp2:m_include template="in-commerce/elements/sorting.elm" list_name="products_in_category"/>
+
+					<inp2:m_include template="in-commerce/elements/products.elm"/>
+
+					<table class="fullwidth table-border">
+						<inp2:p_ListProducts list_name="products_in_category" render_as="product_element"/>
+					</table>
+
+					<inp2:m_include template="platform/elements/pagination.elm" prefix="p" list_name="products_in_category"/>
+				</inp2:m_RenderElement>
+				<!-- // Category Products List -->
+			</div>
+
+			<!--## RELATED CATEGORIES ##-->
+			<!--##
+			<div class="movable-element">
+				<inp2:m_RenderElement design="content_box" related_to="Category" data_exists="1">
+					<inp2:m_Capture to_var="header">
+						<inp2:m_Phrase label="lu_title_RelatedCategories"/>
+					</inp2:m_Capture>
+
+					<inp2:m_include template="platform/elements/content_boxes/related_items.elm" related_to="$related_to" />
+				</inp2:m_RenderElement>
+			</div>
+			##-->
+			<!--## // RELATED CATEGORIES ##-->
+
+		</inp2:m_if>
+	</div>
+</inp2:m_DefineElement>
+<!--## /MAIN CONTENT ##-->
+
+<!--## DESIGN TEMPLATE ##-->
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
+<!--## /DESIGN TEMPLATE ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/designs/section.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/designs/.smsignore
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/designs/.smsignore	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/designs/.smsignore	(revision 12131)
@@ -0,0 +1 @@
+.*\.tpl
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/designs/.smsignore
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/menu_element.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/menu_element.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/menu_element.elm.tpl	(revision 12131)
@@ -0,0 +1,16 @@
+<inp2:m_RenderElement design="menu_element">
+	<inp2:m_Capture to_var="menu_href">
+		<inp2:m_Link template="in-commerce/checkout/shop_cart" m_cat_id="0" m_cat_page="1"/>
+	</inp2:m_Capture>
+
+	<inp2:m_Capture to_var="menu_icon">
+		<img src="<inp2:m_TemplatesBase module="In-Commerce"/>img/menu_shopping_cart.gif" alt="" />
+	</inp2:m_Capture>
+
+	<inp2:m_Capture to_var="menu_title">
+		<inp2:m_Phrase name="lu_title_ShoppingCart"/>
+		&nbsp;<inp2:m_if check="ord_ItemsInCart">(<inp2:ord_ItemsInCart/>)</inp2:m_if>
+	</inp2:m_Capture>
+
+	<inp2:m_IsActive template="in-commerce/checkout/shop_cart" result_to_var="current"/>
+</inp2:m_RenderElement>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/menu_element.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/checkout/shipping_options.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/checkout/shipping_options.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/checkout/shipping_options.elm.tpl	(revision 12131)
@@ -0,0 +1,236 @@
+<inp2:m_DefineElement name="order_shipping_type">
+	<option <inp2:m_param name="selected"/> value="<inp2:m_param name="ShippingId"/>"><inp2:m_param name="ShippingName"/> (<inp2:m_if check="m_param" name="ShippingFree" value="1"><inp2:m_Phrase label="lu_comm_FreeShipping" /><inp2:m_else/><inp2:m_param name="TotalCost"/></inp2:m_if>)</option>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="shippings_table_header">
+	<table width="100%">
+		<tr>
+			<td colspan="4">
+				<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="1" alt="" /></div>
+			</td>
+		</tr>
+		<tr class="sub-section-header">
+			<td><inp2:m_Phrase label="lu_ship_Shipment" /></td>
+			<td><inp2:m_Phrase label="lu_ship_ItemsNumber" /></td>
+			<td><inp2:m_Phrase label="lu_ship_ShippingWeight" /></td>
+			<td><inp2:m_Phrase label="lu_ship_ShippingType" /></td>
+		</tr>
+		<tr>
+			<td colspan="4">
+				<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="1" alt="" /></div>
+			</td>
+		</tr>
+
+		<inp2:m_if check="ord_CartHasBackorders">
+			<strong><inp2:m_Phrase label="lu_comm_Note"/>:</strong>
+			<inp2:m_Phrase label="lu_comm_YouHaveBackorderedItems"/>
+
+			<br />
+			<inp2:m_DefineElement name="order_option">
+				<input onclick="document.getElementById('events[ord][OnUpdate]').click();" type="radio"
+					<inp2:m_param name="checked"/>
+					name="<inp2:m_param name="field_name"/>"
+					id="<inp2:m_param name="field_name"/>_<inp2:m_param name="key"/>" value="<inp2:m_param name="key"/>">
+					<label for="<inp2:m_param name="field_name"/>_<inp2:m_param name="key"/>">
+						<inp2:m_phrase label="$option"/>
+					</label>&nbsp;<br />
+			</inp2:m_DefineElement>
+			<inp2:ord_PredefinedOptions field="ShippingOption" render_as="order_option" selected_param="checked" selected="checked=\"checked\""/>
+			<br />
+		</inp2:m_if>
+
+		<inp2:m_if check="m_GetEquals" var="shipping_limitations_apply" value="0"><inp2:m_else/>
+			<strong><inp2:m_Phrase label="lu_comm_Note"/>:</strong>
+			<inp2:m_if check="m_GetEquals" var="shipping_limitations_apply" value="1">
+				<inp2:m_Phrase label="lu_comm_ShippingTypesLimitationApply"/><br/>
+				<input type="hidden" name="<inp2:ord_InputName field="ShippingGroupOption"/>" id="<inp2:ord_InputName field="ShippingGroupOption"/>" value="<inp2:ord_Field name="ShippingGroupOption" db="1"/>" />
+				<input onclick="document.getElementById('<inp2:ord_InputName field="ShippingGroupOption"/>').value = this.checked ? 1:0; document.getElementById('events[ord][OnUpdate]').click();" type="checkbox"
+						<inp2:m_param name="checked"/>
+						name="cb_<inp2:ord_InputName field="ShippingGroupOption"/>"
+						id="cb_<inp2:ord_InputName field="ShippingGroupOption"/>" value="1" <inp2:ord_Field name="ShippingGroupOption" db="1" checked="checked"/> />
+						<label for="cb_<inp2:ord_InputName field="ShippingGroupOption"/>">
+							<inp2:m_phrase label="lu_AdjustShippingManually"/>
+						</label>&nbsp;<br />
+			<inp2:m_else/> <!-- Order canNOT be shipped with single shipping type -->
+				<inp2:m_Phrase label="lu_comm_ShippingTypesLimitationApply_CantSingleShip"/><br/>
+				<input type="hidden" name="<inp2:ord_InputName field="ShippingGroupOption"/>" value="1" />
+			</inp2:m_if>
+		</inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="shippings_table_footer">
+		<tr>
+			<td class="shopping-cart-cell-item-padding">
+				<input class="button" type="submit" name="events[ord][OnUpdate]" value="<inp2:m_Phrase label="lu_comm_UpdateShipping"/>"/><br/>
+			</td>
+			<td>&nbsp;</td>
+			<td class="shopping-cart-cell-item-padding" style="text-align: right">
+				<strong><inp2:m_Phrase label="lu_comm_ShippingTotal" />:</strong>
+			</td>
+			<td class="shopping-cart-cell-item-padding">
+				<inp2:ord_Field name="ShippingCost" currency="selected"/>
+			</td>
+		</tr>
+
+		<tr class="cart-subtotal">
+			<td>&nbsp;</td>
+			<td>&nbsp;</td>
+			<td style="text-align: right">
+				<strong><inp2:m_Phrase label="lu_comm_Insurance_Fee"/>:</strong>
+			</td>
+			<td class="shopping-cart-cell-item-padding">
+				<inp2:ord_Field name="InsuranceFee" currency="selected"/>
+			</td>
+		</tr>
+
+		<inp2:m_DefineElement name="products_total">
+			<tr class="cart-subtotal">
+				<td>&nbsp;</td>
+				<td>&nbsp;</td>
+				<td style="text-align: right">
+					<strong><inp2:m_Phrase label="lu_comm_ProductsTotal"/>:</strong>
+				</td>
+				<td>
+					<inp2:ord_Field name="SubTotal" currency="selected"/>
+				</td>
+			</tr>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="processing_total">
+			<tr class="cart-subtotal">
+				<td>&nbsp;</td>
+				<td>&nbsp;</td>
+				<td style="text-align: right">
+					<strong><inp2:m_Phrase label="lu_comm_ProcessingFee"/>:</strong>
+				</td>
+				<td>
+					<inp2:ord_Field name="ProcessingFee" currency="selected"/>
+				</td>
+			</tr>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="sub_total">
+			<tr>
+				<td>&nbsp;</td>
+				<td>&nbsp;</td>
+				<td align="right" class="shopping-cart-cell-item-padding">
+					<strong><inp2:m_Phrase label="lu_comm_SubTotal"/>:</strong>
+				</td>
+				<td class="shopping-cart-cell-item-padding">
+					<span class="price1"><inp2:ord_Field name="AmountWithoutVAT" currency="selected"/></span>
+				</td>
+			</tr>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="vat_total">
+			<tr>
+				<td>&nbsp;</td>
+				<td>&nbsp;</td>
+				<td class="shopping-cart-cell-item-padding" align="right">
+					<strong><inp2:m_Phrase label="lu_comm_VAT"/> <inp2:ord_Field name="VATPercent"/>%:</strong>
+				</td>
+				<td class="shopping-cart-cell-item-padding">
+					<span class="price1"><inp2:ord_Field name="VAT" currency="selected"/></span>
+				</td>
+			</tr>
+		</inp2:m_DefineElement>
+
+		<inp2:ord_PrintTotals
+			products_render_as="products_total"
+			processing_render_as="processing_total"
+			sub_total_render_as="sub_total"
+			vat_render_as="vat_total"/>
+
+		<inp2:m_if check="ord_Field" name="GiftCertificateId">
+			<tr>
+				<td>&nbsp;</td>
+				<td>&nbsp;</td>
+				<td class="shopping-cart-cell-item-padding" align="right">
+					<strong><inp2:m_Phrase label="lu_comm_Gift_Certificate"/>:</strong>
+				</td>
+				<td class="shopping-cart-cell-item-padding">
+					<span class="price1"><inp2:ord_Field name="GiftCertificateDiscount" currency="selected"/></span>
+				</td>
+			</tr>
+		</inp2:m_if>
+
+		<tr class="cart-subtotal order-grand-total">
+			<td>&nbsp;</td>
+			<td>&nbsp;</td>
+			<td class="shopping-cart-cell-item-padding" align="right">
+				<inp2:m_Phrase label="lu_comm_GrandTotal"/>:
+			</td>
+			<td class="shopping-cart-cell-item-padding">
+				<inp2:ord_Field name="TotalAmount" currency="selected"/>
+			</td>
+		</tr>
+
+		<tr>
+			<td>&nbsp;</td>
+			<td>&nbsp;</td>
+			<td>&nbsp;</td>
+			<td class="shopping-cart-cell-item-padding">
+				<input type="hidden" name="next_step_template" value="in-commerce/checkout/billing">
+				<input type="submit" name="events[ord][OnProceedToBilling]" value="<inp2:m_Phrase label="lu_comm_ProceedToBilling"/>" class="button">
+			</td>
+		</tr>
+
+	</table>
+</inp2:m_DefineElement>
+
+<inp2:m_include template="in-commerce/elements/options_blocks.elm"/>
+
+<inp2:m_DefineElement name="shipping_group_item">
+	<inp2:Field name="Name"/><inp2:m_if check="ord_BackorderFlag"> <span class="backordered-product"><inp2:m_phrase label="lu_cart_BackorderFlag" /></span></inp2:m_if><br />
+	<inp2:m_if check="HasOptions">
+		<br/>
+		<span style="font-size: 8pt">
+		<inp2:m_if check="DisplayOptionsPricing"> <!-- selectable options or overriding combination -->
+			<inp2:PrintOptions render_as="option_element" currency="selected"/>
+		<inp2:m_else/> <!-- listed combinations -->
+			<inp2:PrintOptions render_as="option_element_no_price"/>
+		</inp2:m_if>
+		<inp2:m_if check="FieldEquals" field="OptionsSelectionMode" value="0"> <!-- selectable options -->
+			<a href="<inp2:m_link template="__default__" pass="m,p,orditems"/>"><inp2:m_Phrase label="lu_comm_edit_options"/></a><br />
+		</inp2:m_if>
+		</span>
+	</inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="order_shipment">
+	<tr class="cart-item">
+		<td class="shopping-cart-cell-item-padding"><inp2:m_param name="shipment"/><br/>
+			<b><inp2:m_Phrase label="lu_Items"/>:</b><br />
+			<inp2:ord_PrintCart item_render_as="shipping_group_item" requery="1" package_num="$package_num" product_type="1" header_render_as="html:" footer_render_as="html:"/>
+		</td>
+		<td class="shopping-cart-cell-item-padding"><inp2:m_param name="items"/></td>
+		<td class="shopping-cart-cell-item-padding"><inp2:m_param name="weight"/></td>
+		<td class="shopping-cart-cell-item-padding">
+			<select class="input-select" name="<inp2:m_param name="field_name"/>">
+				<inp2:ord_PrintShippingTypes render_as="order_shipping_type" currency="selected" />
+			</select>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="4">
+			<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="1" alt="" /></div>
+		</td>
+	</tr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="no_shipments">
+	<div class="field-error"><inp2:m_Recall name="usps_errors"/></div>
+	<inp2:m_Phrase label="lu_comm_ErrorNoShippingTypes"/> (<a href="mailto:<inp2:conf_ConfigValue name="Comm_Contacts_Email"/>"><inp2:conf_ConfigValue name="Comm_Contacts_Email"/></a>).
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="invalid_address">
+	<inp2:m_Phrase label="lu_comm_ErrorInvalidShippingAddress"/>.
+</inp2:m_DefineElement>
+
+<inp2:m_RenderElement design="content_box">
+	<inp2:m_Capture to_var="header">
+		<inp2:m_Phrase label="lu_title_ShippingOptions"/>
+	</inp2:m_Capture>
+
+	<inp2:ord_PrintShippings render_as="order_shipment" currency="selected" no_shipments_render_as="no_shipments" invalid_address_render_as="invalid_address" table_header_render_as="shippings_table_header" table_footer_render_as="shippings_table_footer" />
+</inp2:m_RenderElement>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/checkout/shipping_options.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/checkout/billing_address.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/checkout/billing_address.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/checkout/billing_address.elm.tpl	(revision 12131)
@@ -0,0 +1,64 @@
+<inp2:m_RenderElement design="content_box">
+	<inp2:m_Capture to_var="header">
+		<inp2:m_Phrase label="lu_comm_BillingInfo"/>
+	</inp2:m_Capture>
+
+	<inp2:ord_ShowDefaultAddress type="billing"/>
+
+	<span class="field-required">*</span> <inp2:m_phrase name="lu_IndicatesRequired"/><br /><br />
+
+	<inp2:m_Phrase label="lu_EnterBillingAddress"/><br /><br />
+
+	<inp2:m_if check="ord_HasError" field="any">
+		<inp2:m_RenderElement name="error_message" />
+	</inp2:m_if>
+
+	<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/grey_pix.gif" width="100%" height="1" align="absmiddle" alt="" /><br />
+	<table class="form-data fullwidth">
+		<inp2:m_include template="in-commerce/elements/addresses.elm"/>
+
+		<inp2:m_if check="ord_OrderHasTangibleItems">
+			<inp2:m_if check="m_LoggedIn"><inp2:m_else/>
+				<tr>
+					<td class="field-name"><inp2:m_Phrase label="lu_SameAsShipping"/>:</td>
+					<td class="field-value">
+						<input type="checkbox" name="same_address" onclick="document.getElementById('events[ord][OnUpdate]').click();" value="1"<inp2:m_if check="m_GetEquals" name="same_address" value="1"> checked</inp2:m_if>" />
+					</td>
+				</tr>
+			</inp2:m_if>
+		</inp2:m_if>
+
+		<inp2:m_if check="m_LoggedIn">
+			<inp2:m_RenderElement name="inp_edit_select_address" type="billing" title="lu_fld_SelectAddress"/>
+		</inp2:m_if>
+
+		<inp2:m_if check="u.current_Field" name="cust_shipping_addr_block">
+			<inp2:m_RenderElement name="inp_edit_label" prefix="ord" field="BillingTo" title="lu_fld_FullName"/>
+			<inp2:m_RenderElement name="inp_edit_label" prefix="ord" field="BillingCompany" title="lu_fld_Company"/>
+			<inp2:m_RenderElement name="inp_edit_label" prefix="ord" field="BillingAddress1" title="lu_fld_AddressLine1"/>
+			<inp2:m_RenderElement name="inp_edit_label" prefix="ord" field="BillingAddress2" title="lu_fld_AddressLine2"/>
+			<inp2:m_RenderElement name="inp_edit_label" prefix="ord" field="BillingCity" title="lu_fld_City"/>
+			<inp2:m_RenderElement name="inp_edit_label" prefix="ord" field="BillingState" title="lu_fld_State"/>
+			<inp2:m_RenderElement name="inp_edit_label" prefix="ord" field="BillingZip" title="lu_fld_Zip"/>
+			<inp2:m_RenderElement name="inp_edit_label" prefix="ord" field="BillingCountry" title="lu_fld_Country"/>
+			<inp2:m_RenderElement name="inp_edit_label" prefix="ord" field="BillingPhone" title="lu_fld_Phone"/>
+			<inp2:m_RenderElement name="inp_edit_label" prefix="ord" field="BillingEmail" title="lu_fld_Email" is_last="1"/>
+		<inp2:m_else/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingTo" title="lu_fld_FullName" style="width: 300px;" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingCompany" title="lu_fld_Company" style="width: 300px;" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingAddress1" title="lu_fld_AddressLine1" style="width: 300px;" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingAddress2" title="lu_fld_AddressLine2" style="width: 300px;" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingCity" title="lu_fld_City" style="width: 200px;" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingState" title="lu_fld_State" style="width: 200px;" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingZip" title="lu_fld_Zip" style="width: 100px;" />
+			<inp2:m_RenderElement name="inp_edit_options" prefix="ord" field="BillingCountry" title="lu_fld_Country" style="width: 300px;" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingPhone" title="lu_fld_Phone" style="width: 150px;" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingEmail" title="lu_fld_Email" style="width: 150px;" is_last="1"/>
+		</inp2:m_if>
+
+		<inp2:m_RenderElement design="inp_edit_buttons" width="200">
+			<input type="hidden" name="check_billing_address" value="true"/>
+			<input class="button" type="submit" id="events[ord][OnUpdate]" name="events[ord][OnUpdate]" value="<inp2:m_Phrase label="lu_btn_UpdateAddress"/>"/>
+		</inp2:m_RenderElement>
+	</table>
+</inp2:m_RenderElement>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/checkout/billing_address.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/checkout/shipping_address.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/checkout/shipping_address.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/checkout/shipping_address.elm.tpl	(revision 12131)
@@ -0,0 +1,53 @@
+<inp2:m_RenderElement design="content_box">
+	<inp2:m_Capture to_var="header">
+		<inp2:m_Phrase label="lu_title_ShippingInformation"/>
+	</inp2:m_Capture>
+
+	<inp2:ord_ShowDefaultAddress type="shipping"/>
+
+	<span class="field-required">*</span> <inp2:m_phrase name="lu_IndicatesRequired"/><br /><br />
+
+	<inp2:m_Phrase label="lu_EnterShippingAddress"/><br /><br />
+
+	<inp2:m_if check="ord_HasError" field="any">
+		<inp2:m_RenderElement name="error_message" />
+	</inp2:m_if>
+
+	<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/grey_pix.gif" width="100%" height="1" align="absmiddle" alt="" /><br />
+	<table class="form-data fullwidth">
+		<inp2:m_include template="in-commerce/elements/addresses.elm"/>
+
+		<inp2:m_if check="m_LoggedIn">
+			<inp2:m_RenderElement name="inp_edit_select_address" type="shipping" title="lu_fld_SelectAddress"/>
+		</inp2:m_if>
+
+		<inp2:m_if check="u.current_Field" name="cust_shipping_addr_block">
+			<inp2:m_RenderElement name="inp_edit_label" prefix="ord" field="ShippingTo" title="lu_fld_FullName"/>
+			<inp2:m_RenderElement name="inp_edit_label" prefix="ord" field="ShippingCompany" title="lu_fld_Company"/>
+			<inp2:m_RenderElement name="inp_edit_label" prefix="ord" field="ShippingAddress1" title="lu_fld_AddressLine1"/>
+			<inp2:m_RenderElement name="inp_edit_label" prefix="ord" field="ShippingAddress2" title="lu_fld_AddressLine2"/>
+			<inp2:m_RenderElement name="inp_edit_label" prefix="ord" field="ShippingCity" title="lu_fld_City"/>
+			<inp2:m_RenderElement name="inp_edit_label" prefix="ord" field="ShippingState" title="lu_fld_State"/>
+			<inp2:m_RenderElement name="inp_edit_label" prefix="ord" field="ShippingZip" title="lu_fld_Zip"/>
+			<inp2:m_RenderElement name="inp_edit_label" prefix="ord" field="ShippingCountry" title="lu_fld_Country"/>
+			<inp2:m_RenderElement name="inp_edit_label" prefix="ord" field="ShippingPhone" title="lu_fld_Phone"/>
+			<inp2:m_RenderElement name="inp_edit_label" prefix="ord" field="ShippingEmail" title="lu_fld_Email" is_last="1"/>
+		<inp2:m_else/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingTo" title="lu_fld_FullName" style="width: 300px;" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingCompany" title="lu_fld_Company" style="width: 300px;" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingAddress1" title="lu_fld_AddressLine1" style="width: 300px;" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingAddress2" title="lu_fld_AddressLine2" style="width: 300px;" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingCity" title="lu_fld_City" style="width: 200px;" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingState" title="lu_fld_State" style="width: 200px;" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingZip" title="lu_fld_Zip" style="width: 100px;" />
+			<inp2:m_RenderElement name="inp_edit_options" prefix="ord" field="ShippingCountry" title="lu_fld_Country" style="width: 300px;" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingPhone" title="lu_fld_Phone" style="width: 150px;" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingEmail" title="lu_fld_Email" style="width: 150px;" is_last="1"/>
+		</inp2:m_if>
+
+		<inp2:m_RenderElement design="inp_edit_buttons" width="200">
+			<input type="hidden" name="check_shipping_address" value="true"/>
+			<input class="button" type="submit" id="events[ord][OnUpdate]" name="events[ord][OnUpdate]" value="<inp2:m_Phrase label="lu_btn_UpdateAddress"/>"/>
+		</inp2:m_RenderElement>
+	</table>
+</inp2:m_RenderElement>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/checkout/shipping_address.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/checkout/form_register.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/checkout/form_register.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/checkout/form_register.elm.tpl	(revision 12131)
@@ -0,0 +1,54 @@
+<inp2:m_RenderElement design="content_box">
+	<inp2:m_Capture to_var="header">
+		<inp2:m_Phrase label="lu_title_SuggestUserRegistration"/>
+	</inp2:m_Capture>
+
+	<span class="field-required">*</span> <inp2:m_phrase name="lu_IndicatesRequired"/><br /><br />
+
+	<inp2:ord_PrefillRegistrationFields type="billing"/>
+	<inp2:m_if check="u_HasError" field="any">
+		<inp2:m_RenderElement name="error_message" />
+	</inp2:m_if>
+
+	<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/grey_pix.gif" width="100%" height="1" align="absmiddle" alt="" /><br /><br />
+
+	<form method="post" action="<inp2:m_FormAction/>">
+		<table class="form-data fullwidth">
+			<inp2:m_if check="u_UseUsernames">
+				<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Login" title="lu_fld_Login" style="width:155px" />
+			</inp2:m_if>
+
+			<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Email" title="lu_fld_Email" style="width:155px" />
+
+			<inp2:m_if check="m_ConfigEquals" name="User_Password_Auto" value="0">
+				<inp2:m_RenderElement name="inp_edit_password" prefix="u" field="Password" title="lu_fld_Password" style="width:155px" />
+				<inp2:m_RenderElement name="inp_edit_password" prefix="u" field="VerifyPassword" title="lu_fld_VerifyPassword" style="width:155px" />
+			</inp2:m_if>
+
+			<inp2:m_RenderElement name="inp_edit_date" prefix="u" field="dob" title="lu_fld_BirthDate" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="FirstName" title="lu_fld_FirstName" style="width:155px" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="LastName" title="lu_fld_LastName" style="width:155px" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Company" title="lu_fld_Company" style="width:155px" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Street" title="lu_fld_AddressLine1" style="width:155px" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Street2" title="lu_fld_AddressLine2" style="width:155px" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="City" title="lu_fld_City" style="width:155px" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="State" title="lu_fld_State" style="width:155px" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Zip" title="lu_fld_Zip" style="width:55px" />
+			<inp2:m_RenderElement name="inp_edit_options" prefix="u" field="Country" title="lu_fld_Country" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Phone" title="lu_fld_Phone" style="width:155px" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Fax" title="lu_fld_Fax" style="width:155px" is_last="1"/>
+
+			<inp2:m_RenderElement design="inp_edit_buttons">
+				<input type="hidden" name="next_template" value="<inp2:m_get var="next_template"/>">
+				<input type="hidden" name="registration_confirm_template" value="platform/login/register_confirm">
+				<input type="hidden" name="registration_confirm_pending_template" value="platform/login/register_confirm_pending">
+
+				<input type="hidden" name="fields_prefilled" value="1" />
+
+				<input class="button" type="submit" id="events[u][OnCreate]" name="events[u][OnCreate]" value="<inp2:m_phrase label="lu_btn_Register"/>"/>
+				<input type="hidden" name="cancel_template" value="in-commerce/checkout/shop_cart" />
+				<input type="submit" class="button" name="events[ls][OnCancel]" value="<inp2:m_Phrase label="lu_btn_Cancel" />"/>
+			</inp2:m_RenderElement>
+		</table>
+	</form>
+</inp2:m_RenderElement>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/checkout/form_register.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/checkout/billing_options.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/checkout/billing_options.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/checkout/billing_options.elm.tpl	(revision 12131)
@@ -0,0 +1,194 @@
+<inp2:m_DefineElement name="order_payment_credit_card">
+	<table width="100%" class="block-no-border">
+		<tr class="cart-header">
+			<td>
+
+				<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="3" height="1" alt=""/><br /></div>
+				<div class="sub-section-header"><inp2:ord_PaymentTypeDescription/></div>
+				<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="3" height="1" alt=""/><br /></div>
+				<br />
+
+			</td>
+		</tr>
+		<tr class="block-data">
+			<td>
+				<inp2:m_if check="ord_HasGatewayError">
+					<inp2:m_RenderElement name="error_message" />
+					<strong><inp2:ord_ShowGatewayError/></strong>
+				</inp2:m_if>
+				<br />
+				<strong><inp2:ord_PaymentTypeInstructions/></strong>
+				<br /><br />
+
+			</td>
+		</tr>
+	</table>
+
+	<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/grey_pix.gif" width="100%" height="1" align="absmiddle" alt="" /><br />
+	<table class="form-data fullwidth">
+		<inp2:m_RenderElement name="inp_edit_options" prefix="ord" field="PaymentCardType" title="lu_billing_CardType"/>
+		<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="PaymentAccount" title="lu_billing_CreditCardNumber" style="width: 200px;"/>
+		<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="PaymentNameOnCard" title="lu_billing_NameOnCard" style="width: 260px;"/>
+
+		<!-- credit card expiration -->
+		<tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+			<inp2:m_RenderElement name="inp_edit_field_caption" prefix="ord" field="PaymentCCExpDate" title="lu_billing_CardExpiration"/>
+			<td class="field-value">
+				<inp2:m_if check="ord_HasError" field="PaymentCCExpDate">
+					<span class="field-error"><inp2:ord_Error field="PaymentCCExpDate"/></span><br />
+				</inp2:m_if>
+				<select class="input-select" name="<inp2:ord_InputName field="PaymentCCExpMonth"/>">
+					<inp2:ord_PredefinedOptions field="PaymentCCExpMonth" render_as="inp_option_item" selected="selected"/>
+				</select>
+				/
+				<select class="input-select" name="<inp2:ord_InputName field="PaymentCCExpYear"/>">
+					<option value=''></option>
+					<inp2:ord_PrintYearOptions field="PaymentCCExpYear" render_as="inp_option_item" selected="selected"/>
+				</select>
+			</td>
+		</tr>
+		<inp2:m_RenderElement name="inp_edit_field_separator" is_last="0"/>
+		<!-- // credit card expiration -->
+
+		<!-- credit card CVV2 -->
+		<tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+			<inp2:m_RenderElement name="inp_edit_field_caption" prefix="ord" field="PaymentCVV2" title="lu_billing_CVV2"/>
+			<td class="field-value">
+				<inp2:m_if check="ord_HasError" field="PaymentCVV2">
+					<span class="field-error"><inp2:ord_Error field="PaymentCVV2"/></span><br />
+				</inp2:m_if>
+				<input type="text" class="input-text" name="<inp2:ord_InputName field="PaymentCVV2"/>" value="<inp2:ord_Field field="PaymentCVV2"/>" tabindex="<inp2:m_get param="tab_index"/>" style="width: 50px;">
+				&nbsp;&nbsp;<a href="javascript:showCVV2Help()"><inp2:m_Phrase label="lu_WhatIsThis" /></a>
+			</td>
+		</tr>
+		<!-- // credit card CVV2 -->
+
+		<inp2:m_RenderElement design="inp_edit_buttons">
+			<input type="hidden" name="check_credit_card" value="true"/>
+			<input type="hidden" name="preview_template" value="in-commerce/checkout/preview">
+
+			<input class="button" type="submit" name="events[ord][OnProceedToPreview]" value="<inp2:m_phrase label="lu_btn_ProceedToPreview"/>">
+		</inp2:m_RenderElement>
+	</table>
+	<br />
+
+	<script language="JavaScript">
+	function showCVV2Help(){
+		window.open('<inp2:m_Link template="in-commerce/checkout/cvv2help" />', null, 'scrollbars=no,menubar=no,toolbars=no,width=300,height=150');
+	}
+	</script>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="order_payment_type_default">
+	<table>
+		<tr class="cart-header">
+			<td>
+				<inp2:ord_PaymentTypeDescription/>
+			</td>
+		</tr>
+		<tr class="form-data">
+			<td>
+				<inp2:m_if check="ord_HasGatewayError">
+					<table class="warning">
+						<tr>
+							<td valign="top" align="left" class="block-data">
+								<img src="img/message.gif" alt="" width="19" height="19" />
+								<span class="warning-text"><inp2:m_Phrase label="lu_Warning"/></span><br />
+								<inp2:ord_ShowGatewayError/>
+							</td>
+						</tr>
+					</table>
+				</inp2:m_if>
+				<br/>
+				<inp2:ord_PaymentTypeInstructions/>
+			</td>
+		</tr>
+	</table>
+	<br/>
+	<input type="hidden" name="preview_template" value="in-commerce/checkout/preview">
+
+	<input class="button" type="submit" name="events[ord][OnProceedToPreview]" value="<inp2:m_phrase label="lu_btn_ProceedToPreview"/>">
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="products_total">
+		<tr>
+			<td><strong><inp2:m_Phrase label="lu_comm_ProductsTotal"/>:</strong></td>
+			<td><inp2:ord_Field name="SubTotal" currency="selected"/></td>
+		</tr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="shipping_total">
+		<tr>
+			<td><strong><inp2:m_Phrase label="lu_comm_ShippingCost"/> (<inp2:ord_ShippingType />):</strong></td>
+			<td><inp2:ord_Field name="ShippingCost" currency="selected"/></td>
+		</tr>
+		<tr>
+			<td><strong><inp2:m_Phrase label="lu_comm_Insurance_Fee"/>:</strong></td>
+			<td><inp2:ord_Field name="InsuranceFee" currency="selected"/></td>
+		</tr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="processing_total">
+		<tr>
+			<td><strong><inp2:m_Phrase label="lu_comm_ProcessingFee"/>: </strong></td>
+			<td><inp2:ord_Field name="ProcessingFee" currency="selected"/></td>
+		</tr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="sub_total">
+	<tr>
+		<td><strong><inp2:m_Phrase label="lu_comm_SubTotal"/>: </strong></td>
+		<td><inp2:ord_Field name="AmountWithoutVAT" currency="selected"/></td>
+	</tr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="vat_total">
+		<tr>
+			<td><strong><inp2:m_Phrase label="lu_comm_VAT"/> <inp2:ord_Field name="VATPercent"/>%: </strong></td>
+			<td><inp2:ord_Field name="VAT" currency="selected"/></td>
+		</tr>
+</inp2:m_DefineElement>
+
+<inp2:m_RenderElement design="content_box">
+	<inp2:m_Capture to_var="header">
+		<inp2:m_Phrase label="lu_comm_BillingOptions"/>
+	</inp2:m_Capture>
+
+	<inp2:m_RenderElement name="subsection" title="lu_section_CostSummary"/>
+
+	<table class="order-totals">
+		<inp2:ord_PrintTotals
+			products_render_as="products_total"
+			shipping_render_as="shipping_total"
+			processing_render_as="processing_total"
+			sub_total_render_as="sub_total"
+			vat_render_as="vat_total"/>
+
+			<inp2:m_if check="ord_Field" name="GiftCertificateId">
+			<tr>
+				<td><strong><inp2:m_Phrase label="lu_comm_Gift_Certificate"/>: </strong></td>
+				<td><inp2:ord_Field name="GiftCertificateDiscount" currency="selected"/></td>
+			</tr>
+			</inp2:m_if>
+
+		<tr class="order-grand-total">
+		  <td><inp2:m_Phrase label="lu_comm_GrandTotal"/>:</td>
+			<td><span class="price1"><inp2:ord_Field name="TotalAmount" currency="selected"/></span></td>
+		</tr>
+	</table>
+
+	<br />
+	<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/grey_pix.gif" width="100%" height="1"  alt="" /><br /><br />
+	<br />
+
+
+	<br />
+	<strong><inp2:m_Phrase label="lu_comm_PaymentType"/>:</strong>
+	<select class="input-select" name="<inp2:ord_InputName field="PaymentType"/>" onchange="document.getElementById('events[ord][OnUpdate]').click();">
+		<inp2:ord_PredefinedOptions render_as="inp_option_item" field="PaymentType" selected="selected"/>
+	</select>
+	&nbsp;<input class="button" type="submit" value="<inp2:m_Phrase label="lu_btn_Select"/>" name="events[ord][OnUpdate]" id="events[ord][OnUpdate]">
+	<br/><br/>
+
+	<inp2:ord_PaymentTypeForm cc_render_as="order_payment_credit_card" default_render_as="order_payment_type_default"/>
+</inp2:m_RenderElement>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/checkout/billing_options.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/home_page_items.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/home_page_items.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/home_page_items.elm.tpl	(revision 12131)
@@ -0,0 +1,21 @@
+<!-- FEATURED PRODUCTS DISPLAIED ON HOME PAGE-->
+<inp2:m_RenderElement design="content_box" data_exists="1">
+	<inp2:p_InitList list_name="featured_products" types="featured" recursive="1" per_page="2" sort_by="random" m_cat_id="0"/>
+
+	<inp2:m_Capture to_var="header">
+		<inp2:m_phrase name="lu_title_FeaturedProducts"/>
+	</inp2:m_Capture>
+
+	<inp2:m_include template="in-commerce/elements/products.elm"/>
+
+	<table class="fullwidth item-listing-featured table-border">
+		<inp2:p_ListProducts list_name="featured_products" render_as="featured_product_element_short" columns="2" direction="H"/>
+	</table>	
+
+	<inp2:m_DefineElement name="more_link">
+		<a href="<inp2:m_Link template="in-commerce/products/featured_products" />"><inp2:m_Phrase label="lu_More"/>...</a><br />
+	</inp2:m_DefineElement>
+	
+	<inp2:p_MoreLink list_name="featured_products" render_as="more_link"/>
+</inp2:m_RenderElement>
+<!-- /FEATURED PRODUCTS DISPLAIED ON HOME PAGE -->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/home_page_items.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/search_results.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/search_results.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/search_results.elm.tpl	(revision 12131)
@@ -0,0 +1,26 @@
+<inp2:m_RenderElement design="content_box" data_exists="1">
+	<inp2:p_InitList list_name="product_search_results" types="search" parent_cat_id="any" recursive="1" per_page="short_list"/>
+
+	<inp2:m_Capture to_var="header">
+		<inp2:m_phrase name="lu_title_ProductSearchResults"/> (<inp2:p_TotalRecords list_name="product_search_results" />)
+	</inp2:m_Capture>
+
+	<inp2:m_include template="in-commerce/elements/products.elm"/>
+	<inp2:m_include template="platform/elements/search_results.elm"/>
+
+	<table class="fullwidth item-listing">
+		<inp2:p_ListProducts list_name="product_search_results" render_as="product_short_element" show_relevance="1"/>
+	</table>
+
+	<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="1" alt="" /><br /></div>
+
+	<inp2:m_if check="p_TotalRecords" list_name="product_search_results">
+		<inp2:m_Set items_found="1"/>
+	</inp2:m_if>
+
+	<inp2:m_DefineElement name="more_link">
+		<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="5" alt="" /><br />
+		<a href="<inp2:m_Link template="in-commerce/products/search_results" />"><inp2:m_Phrase label="lu_More"/>...</a>
+	</inp2:m_DefineElement>
+	<inp2:p_MoreLink list_name="product_search_results" render_as="more_link" />
+</inp2:m_RenderElement>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/search_results.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/my_favorites.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/my_favorites.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/my_favorites.elm.tpl	(revision 12131)
@@ -0,0 +1,21 @@
+<!-- products in wishlist -->
+<inp2:m_RenderElement design="content_box" data_exists="1">
+	<inp2:p_InitList list_name="wishlist_products" types="wish_list" parent_cat_id="0" recursive="1"/>
+
+	<inp2:m_Capture to_var="header">
+		<inp2:m_phrase name="lu_title_WishList"/> (<inp2:p_TotalRecords list_name="wishlist_products"/>)
+	</inp2:m_Capture>
+
+	<inp2:m_include template="in-commerce/elements/products.elm"/>
+
+	<table class="fullwidth item-listing table-border">
+		<inp2:p_ListProducts list_name="wishlist_products" render_as="product_element" direction="H"/>
+	</table>
+
+	<inp2:m_if check="p_TotalRecords" list_name="wishlist_products">
+		<inp2:m_Set favorites_found="1"/>
+	</inp2:m_if>
+
+	<inp2:m_include template="platform/elements/pagination.elm" prefix="p" list_name="wishlist_products"/>
+</inp2:m_RenderElement>
+<!-- // products in wishlist -->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/my_favorites.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/pick_products.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/pick_products.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/pick_products.elm.tpl	(revision 12131)
@@ -0,0 +1,22 @@
+<!-- editors pick -->
+<inp2:m_RenderElement design="content_box" data_exists="1">
+	<inp2:p_InitList list_name="pick_products" types="pick" recursive="true" per_page="short_list" />
+
+	<inp2:m_Capture to_var="header">
+		<inp2:m_phrase name="lu_title_PickProducts"/>
+	</inp2:m_Capture>
+
+	<inp2:m_include template="in-commerce/elements/products.elm"/>
+
+	<table class="fullwidth item-listing table-border">
+		<inp2:p_ListProducts list_name="pick_products" render_as="product_element"/>
+	</table>
+
+	<inp2:m_DefineElement name="more_link">
+	<div style="text-align: right;">
+		<a href="<inp2:m_Link template="in-commerce/products/pick_products"/>"><inp2:m_Phrase label="lu_More"/>...</a>
+	</div>
+	</inp2:m_DefineElement>
+	<inp2:p_MoreLink list_name="pick_products" render_as="more_link"/>
+</inp2:m_RenderElement>
+<!-- //editors pick	-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/pick_products.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/new_products.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/new_products.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/new_products.elm.tpl	(revision 12131)
@@ -0,0 +1,23 @@
+<!-- editors pick -->
+<inp2:m_RenderElement design="content_box" data_exists="1">
+	<inp2:p_InitList list_name="new_products" types="new" recursive="true" per_page="short_list" />
+
+	<inp2:m_Capture to_var="header">
+		<inp2:m_phrase name="lu_title_NewProducts"/>
+	</inp2:m_Capture>
+
+	<inp2:m_include template="in-commerce/elements/products.elm"/>
+
+	<table class="fullwidth item-listing table-border">
+		<inp2:p_ListProducts list_name="new_products" render_as="product_element"/>
+	</table>
+
+	<inp2:m_DefineElement name="more_link">
+	<div style="text-align: right;">
+		<a href="<inp2:m_Link template="in-commerce/products/new_products" />"><inp2:m_Phrase label="lu_More"/>...</a>
+	</div>
+	</inp2:m_DefineElement>
+	
+	<inp2:p_MoreLink list_name="new_products" render_as="more_link"/>
+</inp2:m_RenderElement>
+<!-- //editors pick	-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/new_products.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/related_items.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/related_items.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/related_items.elm.tpl	(revision 12131)
@@ -0,0 +1,6 @@
+<!--## RELATED PRODUCTS ##-->
+	<inp2:m_include template="in-commerce/elements/products.elm"/>	
+	<table>
+		<inp2:p_PrintList2 render_as="related_product_element" types="related" related_to="$related_to" parent_cat_id="any" no_table="1"/>
+	</table>
+<!--## // RELATED PRODUCTS ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/related_items.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/featured_products.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/featured_products.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/featured_products.elm.tpl	(revision 12131)
@@ -0,0 +1,23 @@
+<!-- FEATURED PRODUCTS -->
+<inp2:m_RenderElement design="content_box" data_exists="1">
+	<inp2:p_InitList list_name="featured_products" types="featured" recursive="1" per_page="1" sort_by="random"/>
+
+	<inp2:m_Capture to_var="header">
+		<inp2:m_phrase name="lu_title_FeaturedProducts"/>
+	</inp2:m_Capture>
+
+	<inp2:m_include template="in-commerce/elements/products.elm"/>
+
+	<table class="fullwidth item-listing-featured table-border">
+		<inp2:p_ListProducts list_name="featured_products" render_as="featured_product_element"/>
+	</table>	
+
+	<inp2:m_DefineElement name="more_link">
+	<div style="text-align: right;">
+		<a href="<inp2:m_Link template="in-commerce/products/featured_products" />"><inp2:m_Phrase label="lu_More"/>...</a><br />
+	</div>
+	</inp2:m_DefineElement>
+	
+	<inp2:p_MoreLink list_name="featured_products" render_as="more_link"/>
+</inp2:m_RenderElement>
+<!-- /FEATURED PRODUCTS -->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/featured_products.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/related_products.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/related_products.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/related_products.elm.tpl	(revision 12131)
@@ -0,0 +1,19 @@
+<!-- related products -->
+<inp2:m_RenderElement design="content_box" data_exists="1">
+	<inp2:p_InitList list_name="related_products" types="related" recursive="1" parent_cat_id="any" />
+
+	<inp2:m_Capture to_var="header">
+		<inp2:m_Phrase label="lu_title_RelatedProducts"/> (<inp2:p_TotalRecords list_name="related_products"/>)
+	</inp2:m_Capture>
+
+	<inp2:m_include template="in-commerce/elements/sorting.elm" list_name="related_products"/>
+
+	<inp2:m_include template="in-commerce/elements/products.elm"/>
+
+	<table class="fullwidth item-listing">
+		<inp2:p_ListProducts list_name="related_products" render_as="product_element"/>
+	</table>
+
+	<inp2:m_include template="platform/elements/pagination.elm" prefix="p" list_name="related_products"/>
+</inp2:m_RenderElement>
+<!-- // related products -->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/content_boxes/related_products.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/.smsignore
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/.smsignore	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/.smsignore	(revision 12131)
@@ -0,0 +1 @@
+.*\.xml\.tpl
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/.smsignore
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/download.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/download.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/download.elm.tpl	(revision 12131)
@@ -0,0 +1,3 @@
+<!--## FILE DOWNLOAD TAG ONLY (DO NOT REMOVE!) ##-->
+<inp2:p_FileDownload />
+<!--## /FILE DOWNLOAD TAG ONLY (DO NOT REMOVE!) ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/download.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/form_options.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/form_options.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/form_options.elm.tpl	(revision 12131)
@@ -0,0 +1,156 @@
+<!--## PRODUCT OPTIONS FORM ##-->
+
+<inp2:m_if check="p_ShouldListOptions">
+		<form name="add_to_cart" method="post" id="add_to_cart" action="<inp2:m_link pass="all,p"/>">
+		<input type="hidden" name="events[ord]" id="events[ord]" value="OnAddToCart">
+		<input type="hidden" name="m_t" value="in-commerce/checkout/shop_cart">
+		<input type="hidden" name="p_id" value="<inp2:p_Field name="ProductId"/>">
+		<input type="hidden" name="product_details_template" value="<inp2:m_Get var="t"/>">
+		<input type="hidden" name="shop_cart_template" value="in-commerce/checkout/shop_cart">
+
+	<inp2:m_if check="p_OptionsHaveError">
+			<table class="warning-message fullwidth">
+					<tr>
+						<td width="30">
+							<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/warning_icon.gif" width="21" height="18" alt=""/>
+						</td>
+						<td><span class="warning"><inp2:m_Phrase label="lu_Warning"/></span></td>
+					</tr>
+					<tr>
+						<td colspan="2">
+						<inp2:p_OptionsError required="lu_comm_OptionsRequired" not_available="lu_comm_OptionsNotAvailable"/>
+						</td>
+					</tr>
+				</table>
+	</inp2:m_if>
+
+	<inp2:m_if check="p_FieldEquals" field="OptionsSelectionMode" value="1"> <!-- Listable options (combinations) -->
+		<script type="text/javascript">
+			function BuyCombination(comb_id)
+			{
+				document.getElementById('qty[<inp2:p_Field name="ProductId"/>]['+comb_id+']').value = 1;
+				document.getElementById('add_to_cart').submit();
+			}
+		</script>
+
+		<inp2:m_DefineElement name="combination_option_element">
+			<strong><inp2:m_Param name="option_name" />: </strong>
+			<inp2:m_Param name="option_value" /><inp2:m_if check="m_ParamEquals" param="is_last" value="1"><inp2:m_else/>, </inp2:m_if>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="combination_element">
+			<tr class="cart-item-small">
+				<td>
+					<input type="hidden" id="qty[<inp2:p_Field name="ProductId"/>][<inp2:Field name="CombinationId"/>]" name="qty[<inp2:p_Field name="ProductId"/>][<inp2:Field name="CombinationId"/>]" value="0">
+					<inp2:ShowCombination render_as="combination_option_element"/>
+				</td>
+				<td><inp2:Field name="FinalPrice" currency="selected"/>&nbsp;&nbsp;</td>
+				<td>
+					<a href="javascript:BuyCombination(<inp2:Field name="CombinationId"/>)"><inp2:m_Phrase label="lu_comm_BuyNow"/></a>
+				</td>
+			</tr>
+		</inp2:m_DefineElement>
+		<table style="wdith: 100%; margin: 0px;">
+			<tr class="cart-header">
+				<td><strong><inp2:m_Phrase label="lu_comm_OptionsCombination"/></strong></td>
+				<td><strong><inp2:m_Phrase label="lu_comm_Price"/></strong></td>
+				<td>&nbsp;</td>
+			</tr>
+
+			<inp2:poc_PrintList2 per_page="-1" render_as="combination_element" row_start_render_as="html:" row_end_render_as="html:"/>
+		</table>
+		<br/>
+	<inp2:m_else/> <!-- Selectable options -->
+		<script type="text/javascript">
+			function AddToCart()
+			{
+				document.getElementById('add_to_cart').submit();
+			}
+
+			function UpdateOptions()
+			{
+				document.getElementById('events[ord]').value = 'OnUpdateItemOptions';
+				document.getElementById('add_to_cart').submit();
+			}
+
+		</script>
+
+		<strong><inp2:m_Phrase label="lu_comm_SelectOptions"/>:</strong><br/>
+		<img src="<inp2:m_TemplatesBase module="In-Commerce"/>img/s.gif" width="1" height="8" alt="" /><br />
+
+
+
+
+		<inp2:m_DefineElement name="option_select_element">
+				<option value="<inp2:m_param name="id"/>" <inp2:m_param name="selected"/>><inp2:m_param name="value"/><inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/>: (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if></option>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="option_cb_element">
+				<input type="checkbox" <inp2:m_param name="selected"/>
+							name="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>][]"
+							id="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]_<inp2:m_param name="id"/>"
+							value="<inp2:m_param name="id"/>" />
+					<label for="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]_<inp2:m_param name="id"/>">
+						<inp2:m_param name="value"/><inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/>: (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if>&nbsp;&nbsp;
+					</label>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="option_radio_element">
+				<input type="radio" <inp2:m_param name="selected"/>
+							name="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]"
+							id="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]_<inp2:m_param name="id"/>"
+							value="<inp2:m_param name="id"/>" />
+					<label for="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]_<inp2:m_param name="id"/>">
+						<inp2:m_param name="value"/><inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/>: (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if>&nbsp;&nbsp;
+					</label>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="option_element">
+			<tr>
+				<td style="padding-right: 10px">
+					<inp2:Field name="Name"/><inp2:m_if check="FieldEquals" field="Required" value="1"><span class="field-required">*</span></inp2:m_if> :
+				</td>
+				<td>
+					<inp2:m_if check="FieldEquals" field="OptionType" value="1"> <!-- drop-down -->
+						<select class="input-select" name="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]">
+							<option value=""></option>
+							<inp2:ShowOptions render_as="option_select_element" currency="selected"/>
+						</select>
+					</inp2:m_if>
+
+					<inp2:m_if check="FieldEquals" field="OptionType" value="5"> <!-- editbox -->
+						<input type="text" class="input-text" name="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]" value="<inp2:OptionData/>"/>
+					</inp2:m_if>
+
+					<inp2:m_if check="FieldEquals" field="OptionType" value="4"> <!-- textarea -->
+						<textarea cols="50" rows="5" class="input-textarea" name="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]"><inp2:OptionData/></textarea>
+					</inp2:m_if>
+
+					<inp2:m_if check="FieldEquals" field="OptionType" value="6"> <!-- checkboxeS -->
+						<inp2:ShowOptions render_as="option_cb_element" currency="selected"/>
+					</inp2:m_if>
+
+					<inp2:m_if check="FieldEquals" field="OptionType" value="3"> <!-- radio buttons -->
+						<inp2:ShowOptions render_as="option_radio_element" currency="selected"/>
+					</inp2:m_if>
+				</td>
+			</tr>
+		</inp2:m_DefineElement>
+
+		<table class="form-data" style="margin: 0px;" >
+			<inp2:p_ListOptions per_page="-1" render_as="option_element" row_start_render_as="html:" row_end_render_as="html:"/>
+		</table>
+		<br />
+		<inp2:m_if check="p_OptionsUpdateMode">
+			<input type="button" class="button" onclick="javascript:UpdateOptions()" value="<inp2:m_Phrase label="lu_comm_UpdateCartItem"/>"  />
+			<!--<a href="javascript:UpdateOptions()" class="price2"><inp2:m_Phrase label="lu_comm_UpdateCartItem"/></a><br/>-->
+		<inp2:m_else/>
+			<input type="button" class="button" onclick="javascript:AddToCart()" value="<inp2:m_Phrase label="lu_comm_BuyNow"/>"  />
+			<!--<a href="javascript:AddToCart()" class="price2"><inp2:m_Phrase label="lu_comm_BuyNow"/></a><br/>-->
+		</inp2:m_if>
+		<br/><br />
+	</inp2:m_if>
+	</form>
+</inp2:m_if>
+
+<!--## /PRODUCT OPTIONS FORM ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/form_options.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/product_files.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/product_files.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/product_files.elm.tpl	(revision 12131)
@@ -0,0 +1,44 @@
+<!--## PRODUCTS FILE ELEMENT ##-->
+<inp2:m_DefineElement name="product_file_element">
+	<inp2:m_if check="p_UniqueFileName">
+		<tr>
+			<td><inp2:m_Phrase label="lu_fld_Name"/>:</td>
+			<td><inp2:Field name="Name"/></td>
+		</tr>
+	</inp2:m_if>
+
+	<tr>
+		<td><inp2:m_Phrase label="lu_fld_FileName"/>:</td>
+		<td><a href="<inp2:p_ProductFileLink template="in-commerce/elements/download.elm"/>"><inp2:Field name="FilePath"/></a></td>
+	</tr>
+
+	<inp2:m_if check="Field" name="Version">
+		<tr>
+			<td><inp2:m_Phrase label="lu_fld_Version"/>:</td>
+			<td><inp2:Field name="Version"/></td>
+		</tr>
+	</inp2:m_if>
+
+	<tr>
+		<td><inp2:m_Phrase label="lu_fld_Size"/>:</td>
+		<td><inp2:Field name="Size" /></td>
+	</tr>
+
+	<tr>
+		<td><inp2:m_Phrase label="lu_fld_AddedOn"/>:</td>
+		<td><inp2:Field name="AddedOn" format="_regional_DateFormat"/></td>
+	</tr>
+
+	<tr>
+		<td><inp2:m_Phrase label="lu_fld_DownloadLink"/>:</td>
+		<td><a href="<inp2:p_ProductFileLink template="in-commerce/elements/download.elm"/>"><inp2:m_Phrase label="lu_btn_DownloadNow" /></a></td>
+	</tr>
+
+	<tr>
+		<td colspan="2">
+			<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="4" alt="" /><br />
+			<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="1" alt="" /><br /></div>
+		</td>
+	</tr>
+</inp2:m_DefineElement>
+<!--## /PRODUCTS FILE ELEMENT ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/product_files.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/products.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/products.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/products.elm.tpl	(revision 12131)
@@ -0,0 +1,386 @@
+<!--## PRODUCT ELEMENT ##-->
+<inp2:m_DefineElement name="product_element">
+	<td>
+		<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="1" alt="" /><br /></div>
+		<table>
+			<tr>
+				<td class="picture-padding">
+					<inp2:m_if check="m_Param" name="show_relevance">
+						<inp2:RelevanceIndicator on_color="Red" off_color="White" relevance_normal_render_as="search_relevance_normal" relevance_full_render_as="search_relevance_full" /><br/>
+					</inp2:m_if>
+
+					<table>
+					<tr><td align="center">
+					<a href="<inp2:ProductLink template="__default__"/>" title="<inp2:Field name="Name" html_escape="1"/>"><inp2:Image render_as="image_element" primary="1" thumbnail="1" DefaultImage="platform/img/no_picture.gif" MaxWidth="thumbnail" DefaultWidth="150"/></a><br />
+					</td></tr>
+					<tr><td align="center">
+					<inp2:m_if check="Available">
+						<br/>
+						<input class="button" onclick=" window.location.href='<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>' " type="button" value="<inp2:m_Phrase label="lu_btn_BuyNow"/>" />
+					<inp2:m_else />
+						<inp2:m_phrase label="lu_comm_outofstock"/>
+					</inp2:m_if>
+					</td></tr>
+					</table>
+				</td>
+				<td class="text-padding" valign="top" >
+					<a href="<inp2:ProductLink template="__default__"/>" class="text-title"><inp2:Field name="Name"/></a>
+
+					<inp2:m_if check="Field" name="IsHot"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_hot.gif" alt="<inp2:m_phrase name="lu_Hot"/>"/></inp2:m_if>
+					<inp2:m_if check="Field" name="IsNew"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_new.gif" alt="<inp2:m_phrase name="lu_New"/>"/></inp2:m_if>
+					<inp2:m_if check="Field" name="IsPop"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_popular.gif" alt="<inp2:m_phrase name="lu_Pop"/>"/></inp2:m_if>
+					<inp2:m_if check="IsEditorsPick"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_pick.gif" alt="<inp2:m_phrase name="lu_Pick"/>"/></inp2:m_if>
+					<inp2:m_if check="IsFavorite"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_favorite.gif" alt="<inp2:m_phrase name="lu_Favorite"/>"/></inp2:m_if>
+					<inp2:VotesIndicator render_as="rating_element"/>
+
+					<inp2:m_if check="Available">
+						<a href="<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>"><img src="<inp2:m_TemplatesBase module="In-Commerce"/>img/buy2.gif" alt="<inp2:m_phrase name=""/>"/></a>
+					</inp2:m_if>
+
+					<br />
+
+					<span class="item-statistics">
+						<inp2:m_phrase name="lu_Reviews"/>: <inp2:Field name="CachedReviewsQty"/>,
+						<inp2:m_phrase name="lu_Rating"/>: <inp2:Field name="CachedRating"/>,
+						<inp2:m_phrase name="lu_Votes"/>: <inp2:Field name="CachedVotesQty"/>
+					</span>
+
+					<br />
+
+					<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="4" alt="" /><br />
+
+					<br />
+					<inp2:m_if check="Field" name="MSRP">
+						<span class="listing-field-name"><inp2:m_Phrase label="lu_fld_MSRP"/>:</span> <span class="product-price-msrp"><inp2:Field name="MSRP" currency="selected"/></span><br />
+					</inp2:m_if>
+
+					<span class="listing-field-name"><inp2:m_Phrase label="lu_fld_OurPrice"/>:</span> <span class="product-price"><inp2:Field name="Price" currency="selected"/>
+					</span> <br />
+
+					<inp2:m_if check="Savings">
+						<span class="listing-field-name">
+						<inp2:m_Phrase label="lu_fld_YouSave"/>: <inp2:Savings currency="selected" />  (<inp2:Savings type="percent"/>%)
+						</span><br/>
+					</inp2:m_if>
+
+					<inp2:m_if check="Field" name="DescriptionExcerpt">
+						<span class="listing-field-name"><inp2:m_Phrase label="lu_fld_Description"/>:</span> <inp2:Field name="DescriptionExcerpt" nl2br="1"/><br/>
+					</inp2:m_if>
+					<br/>
+
+					<inp2:m_if check="IsFavorite">
+						<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/ic_removefromfav.gif" width="11" height="10" alt="" /> <a class="item-action" href="<inp2:FavoriteToggleLink/>"><inp2:m_phrase name="lu_btn_RemoveFromWishList"/></a>
+					<inp2:m_else/>
+						<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/ic_addtofav.gif" width="11" height="10" alt="" /> <a class="item-action" href="<inp2:FavoriteToggleLink template="platform/my_account/my_favorites"/>"><inp2:m_phrase name="lu_btn_AddToWishList"/></a>
+					</inp2:m_if>
+					 &nbsp;|&nbsp;
+
+					<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/reviews.gif" width="14" height="10" alt="" /> <a class="item-action" href="<inp2:ProductLink template="in-commerce/products/add_review"/>"><inp2:m_phrase name="lu_btn_AddReview"/></a>
+				</td>
+
+			</tr>
+		</table>
+	</td>
+</inp2:m_DefineElement>
+<!--## /PRODUCT ELEMENT ##-->
+
+<!--## RELATED PRODUCT ELEMENT ##-->
+<inp2:m_DefineElement name="related_product_element">
+	<tr>
+		<td width="25"><img src="<inp2:m_TemplatesBase module="In-Commerce"/>img/shopping_cart_item.gif" alt=""/></td>
+		<td><a href="<inp2:ProductLink template="__default__"/>" class="text-title"><inp2:Field name="Name"/></a></td>
+	</tr>
+</inp2:m_DefineElement>
+<!--## //RELATED PRODUCT ELEMENT ##-->
+
+<!--## FEATURED PRODUCT ELEMENT SHORT ##-->
+<inp2:m_DefineElement name="featured_product_element_short">
+	<td valign="top">
+		<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="1" alt="" /><br /></div>
+		<table>
+			<tr>
+				<td class="picture-padding">
+					<table>
+						<tr>
+							<td align="center">
+								<a href="<inp2:ProductLink template="__default__"/>" title="<inp2:Field name="Name" html_escape="1"/>"><inp2:Image render_as="image_element" primary="1" thumbnail="1" DefaultImage="platform/img/no_picture.gif" MaxWidth="thumbnail" DefaultWidth="150"/></a><br />
+							</td>
+						</tr>
+
+						<tr>
+							<td align="center">
+								<inp2:m_if check="Available">
+									<br/>
+									<input class="button" onclick=" window.location.href='<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>' " type="button" value="<inp2:m_Phrase label="lu_btn_BuyNow"/>" />
+								<inp2:m_else />
+									<inp2:m_phrase label="lu_comm_outofstock"/>
+								</inp2:m_if>
+							</td>
+						</tr>
+					</table>
+				</td>
+				<td class="text-padding" valign="top">
+					<span class="text-title">
+						<a href="<inp2:ProductLink template="__default__"/>"><inp2:Field name="Name" /></a>
+					</span>
+
+					<inp2:m_if check="Field" name="IsHot"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_hot.gif" alt="<inp2:m_phrase name="lu_Hot"/>"/></inp2:m_if>
+					<inp2:m_if check="Field" name="IsNew"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_new.gif" alt="<inp2:m_phrase name="lu_New"/>"/></inp2:m_if>
+					<inp2:m_if check="Field" name="IsPop"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_popular.gif" alt="<inp2:m_phrase name="lu_Pop"/>"/></inp2:m_if>
+					<inp2:m_if check="IsEditorsPick"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_pick.gif" alt="<inp2:m_phrase name="lu_Pick"/>"/></inp2:m_if>
+					<inp2:m_if check="IsFavorite"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_favorite.gif" alt="<inp2:m_phrase name="lu_Favorite"/>"/></inp2:m_if>
+					<inp2:VotesIndicator render_as="rating_element"/>
+
+					<br />
+
+					<span class="item-statistics">
+						<inp2:m_phrase name="lu_Reviews"/>: <inp2:Field name="CachedReviewsQty"/>,
+						<inp2:m_phrase name="lu_Rating"/>: <inp2:Field name="CachedRating"/>,
+						<inp2:m_phrase name="lu_Votes"/>: <inp2:Field name="CachedVotesQty"/>
+					</span>
+
+					<br />
+
+					<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="4" alt="" /><br />
+
+					<inp2:m_if check="Field" name="ManufacturerId">
+						<inp2:m_Phrase label="lu_fld_Manufacturer"/>: <inp2:field name="ManufacturerId"/> (<inp2:m_Phrase label="lu_comm_OtherProductsBy"/> <a href="<inp2:ManufacturerLink template="in-commerce/products/manufacturer_products" />"><inp2:Field name="ManufacturerId"/></a> <inp2:m_Phrase label="lu_comm_OtherProducts"/>) <br />
+					</inp2:m_if>
+					<br />
+
+					<inp2:m_if check="Field" name="MSRP">
+						<span class="listing-field-name"><inp2:m_Phrase label="lu_fld_MSRP"/>:</span> <span class="product-price-msrp"><inp2:Field name="MSRP" currency="selected"/></span><br />
+					</inp2:m_if>
+
+					<span class="listing-field-name"><inp2:m_Phrase label="lu_fld_OurPrice"/>:</span> <span class="product-price"><inp2:Field name="Price" currency="selected"/>
+					</span> <br />
+
+					<inp2:m_if check="Savings">
+						<span class="listing-field-name">
+						<inp2:m_Phrase label="lu_fld_YouSave"/>: <inp2:Savings currency="selected" />  (<inp2:Savings type="percent"/>%)
+						</span><br/>
+					</inp2:m_if>
+				</td>
+			</tr>
+		</table>
+	</td>
+</inp2:m_DefineElement>
+<!--## /FEATURED PRODUCT ELEMENT SHORT ##-->
+
+<!--## FEATURED PRODUCT ELEMENT ##-->
+<inp2:m_DefineElement name="featured_product_element">
+	<td>
+		<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="1" alt="" /><br /></div>
+		<table>
+			<tr>
+				<td class="picture-padding">
+					<table>
+					<tr><td align="center">
+					<a href="<inp2:ProductLink template="__default__"/>" title="<inp2:Field name="Name" html_escape="1"/>"><inp2:Image render_as="image_element" primary="1" thumbnail="1" DefaultImage="platform/img/no_picture.gif" MaxWidth="thumbnail" DefaultWidth="150"/></a><br />
+					</td></tr>
+					<tr><td align="center">
+					<inp2:m_if check="Available">
+						<br/>
+						<input class="button" onclick=" window.location.href='<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>' " type="button" value="<inp2:m_Phrase label="lu_btn_BuyNow"/>" />
+					<inp2:m_else />
+						<inp2:m_phrase label="lu_comm_outofstock"/>
+					</inp2:m_if>
+					</td></tr>
+					</table>
+				</td>
+				<td class="text-padding" valign="top">
+					<span class="text-title">
+						<a href="<inp2:ProductLink template="__default__"/>"><inp2:Field name="Name" /></a>
+					</span>
+
+					<inp2:m_if check="Field" name="IsHot"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_hot.gif" alt="<inp2:m_phrase name="lu_Hot"/>"/></inp2:m_if>
+					<inp2:m_if check="Field" name="IsNew"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_new.gif" alt="<inp2:m_phrase name="lu_New"/>"/></inp2:m_if>
+					<inp2:m_if check="Field" name="IsPop"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_popular.gif" alt="<inp2:m_phrase name="lu_Pop"/>"/></inp2:m_if>
+					<inp2:m_if check="IsEditorsPick"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_pick.gif" alt="<inp2:m_phrase name="lu_Pick"/>"/></inp2:m_if>
+					<inp2:m_if check="IsFavorite"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_favorite.gif" alt="<inp2:m_phrase name="lu_Favorite"/>"/></inp2:m_if>
+					<inp2:VotesIndicator render_as="rating_element"/>
+
+					<br />
+
+					<span class="item-statistics">
+						<inp2:m_phrase name="lu_Reviews"/>: <inp2:Field name="CachedReviewsQty"/>,
+						<inp2:m_phrase name="lu_Rating"/>: <inp2:Field name="CachedRating"/>,
+						<inp2:m_phrase name="lu_Votes"/>: <inp2:Field name="CachedVotesQty"/>
+					</span>
+
+					<br />
+
+					<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="4" alt="" /><br />
+
+					<inp2:m_if check="Field" name="ManufacturerId">
+						<inp2:m_Phrase label="lu_fld_Manufacturer"/>: <inp2:field name="ManufacturerId"/> (<inp2:m_Phrase label="lu_comm_OtherProductsBy"/> <a href="<inp2:ManufacturerLink template="in-commerce/products/manufacturer_products" />"><inp2:Field name="ManufacturerId"/></a> <inp2:m_Phrase label="lu_comm_OtherProducts"/>) <br />
+					</inp2:m_if>
+					<br />
+
+					<inp2:m_if check="Field" name="MSRP">
+						<span class="listing-field-name"><inp2:m_Phrase label="lu_fld_MSRP"/>:</span> <span class="product-price-msrp"><inp2:Field name="MSRP" currency="selected"/></span><br />
+					</inp2:m_if>
+
+					<span class="listing-field-name"><inp2:m_Phrase label="lu_fld_OurPrice"/>:</span> <span class="product-price"><inp2:Field name="Price" currency="selected"/>
+					</span> <br />
+
+					<inp2:m_if check="Savings">
+						<span class="listing-field-name">
+						<inp2:m_Phrase label="lu_fld_YouSave"/>: <inp2:Savings currency="selected" />  (<inp2:Savings type="percent"/>%)
+						</span><br/>
+					</inp2:m_if>
+
+					<inp2:m_if check="Field" name="DescriptionExcerpt">
+						<br/>
+						<span class="listing-field-name"><inp2:m_Phrase label="lu_fld_Description"/>:</span> <inp2:Field name="DescriptionExcerpt" nl2br="1"/><br />
+					</inp2:m_if>
+
+					<br />
+
+					<inp2:m_if check="CustomField" name="Availability">
+						<inp2:CustomFieldLabel field="Availability"/>:
+						<inp2:CustomField name="Availability"/>
+						<br />
+						<br />
+					</inp2:m_if>
+					<inp2:m_if check="CustomField" name="Features">
+						<inp2:CustomFieldLabel field="Features"/>:
+						<inp2:CustomField name="Features"/>
+						<br />
+						<br />
+					</inp2:m_if>
+				</td>
+
+			</tr>
+		</table>
+	</td>
+</inp2:m_DefineElement>
+<!--## /FEATURED PRODUCT ELEMENT ##-->
+
+<!--## EDITORS PICK PRODUCT ELEMENT ##-->
+<inp2:m_DefineElement name="pick_product_element">
+	<td width="16%" align="center" valign="top" class="block-data">
+		<a href="<inp2:ProductLink template="__default__"/>"><inp2:Image render_as="image_element" primary="1" thumbnail="1" DefaultImage="platform/img/no_picture.gif" MaxWidth="120"/></a><br />
+		<inp2:m_if check="Available">
+			<a href="<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>" class="link-product2"><strong><inp2:m_Phrase label="lu_comm_BuyNow"/></strong></a>
+			<a href="<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>"><img src="in-commerce/img/buy2.gif" alt="<inp2:m_Phrase label="lu_comm_BuyNow"/>" width="15" height="17" border="0" vspace="4" style="vertical-align:middle" /></a>
+		<inp2:m_else />
+			<strong><inp2:m_phrase label="lu_comm_outofstock"/></strong>
+		</inp2:m_if>
+	</td>
+	<td width="84%" class="block-data">
+		<a href="<inp2:ProductLink template="__default__"/>" class="link-product2"><strong><inp2:Field field="Name" /></strong></a>
+		<inp2:m_if check="Available">
+			<a href="<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>"><img src="in-commerce/img/buy2.gif" alt="" width="15" height="17" border="0" style="vertical-align:middle" /></a>
+		</inp2:m_if>
+		<br />
+
+		<inp2:m_if check="Field" name="MSRP">
+			<span class="listing-field-name"><inp2:m_Phrase label="lu_fld_MSRP"/>:</span> <span class="product-price-msrp"><inp2:Field name="MSRP" currency="selected"/></span><br />
+		</inp2:m_if>
+
+		<span class="listing-field-name"><inp2:m_Phrase label="lu_fld_OurPrice"/>:</span> <span class="product-price"><inp2:Field name="Price" currency="selected"/>
+		</span> <br />
+
+		<inp2:m_if check="Savings">
+			<span class="listing-field-name">
+			<inp2:m_Phrase label="lu_fld_YouSave"/>: <inp2:Savings currency="selected" />  (<inp2:Savings type="percent"/>%)
+			</span><br/>
+		</inp2:m_if>
+
+		<inp2:m_if check="Field" name="DescriptionExcerpt">
+		<br/><span class="listing-field-name"><inp2:m_Phrase label="lu_fld_Description"/>:</span> <inp2:Field name="DescriptionExcerpt" nl2br="1"/><br />
+		</inp2:m_if>
+
+	</td>
+</inp2:m_DefineElement>
+<!--## /EDITORS PICK PRODUCT ELEMENT ##-->
+
+<!--## DOWNLOADABLE PRODUCT ELEMENT ##-->
+<inp2:m_DefineElement name="downloadable_product_element">
+	<td>
+		<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="1" alt="" /><br /></div>
+		<table>
+			<tr>
+				<td class="picture-padding">
+					<a href="<inp2:ProductLink template="__default__"/>" title="<inp2:Field name="Name" html_escape="1"/>"><inp2:Image render_as="image_element" primary="1" thumbnail="1" DefaultImage="platform/img/no_picture.gif" MaxWidth="thumbnail" DefaultWidth="150"/></a><br />
+				</td>
+				<td class="text-padding" valign="top">
+					<span class="text-title">
+						<inp2:m_if check="p_HasFiles">
+							<a href="<inp2:ProductLink template="in-commerce/my_account/my_downloads_more"/>"><inp2:Field name="Name" /></a>
+						<inp2:m_else />
+							<inp2:Field name="Name" />
+						</inp2:m_if>
+					</span>
+
+					<inp2:m_if check="Field" name="IsHot"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_hot.gif" alt="<inp2:m_phrase name="lu_Hot"/>"/></inp2:m_if>
+					<inp2:m_if check="Field" name="IsNew"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_new.gif" alt="<inp2:m_phrase name="lu_New"/>"/></inp2:m_if>
+					<inp2:m_if check="Field" name="IsPop"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_popular.gif" alt="<inp2:m_phrase name="lu_Pop"/>"/></inp2:m_if>
+					<inp2:m_if check="IsEditorsPick"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_pick.gif" alt="<inp2:m_phrase name="lu_Pick"/>"/></inp2:m_if>
+					<inp2:m_if check="IsFavorite"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/icon_favorite.gif" alt="<inp2:m_phrase name="lu_Favorite"/>"/></inp2:m_if>
+					<inp2:VotesIndicator render_as="rating_element"/>
+
+					<br />
+
+					<span class="item-statistics">
+						<inp2:m_phrase name="lu_Reviews"/>: <inp2:Field name="CachedReviewsQty"/>,
+						<inp2:m_phrase name="lu_Rating"/>: <inp2:Field name="CachedRating"/>,
+						<inp2:m_phrase name="lu_Votes"/>: <inp2:Field name="CachedVotesQty"/>
+					</span>
+
+					<br />
+
+					<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="4" alt="" /><br />
+
+					<br />
+					<inp2:m_if check="Field" name="DescriptionExcerpt">
+						<inp2:m_Phrase label="lu_fld_Description"/>: <inp2:Field name="DescriptionExcerpt" nl2br="1"/><br />
+					</inp2:m_if>
+
+					<inp2:m_if check="p_HasFiles">
+						<a href="<inp2:ProductFileLink template="in-commerce/elements/download.elm"/>"><inp2:m_Phrase label="lu_comm_DownloadNow" /></a><br />
+						<a href="<inp2:ProductLink template="in-commerce/my_account/my_downloads_more"/>"><inp2:m_Phrase label="lu_comm_MoreFiles" />...</a><br />
+					<inp2:m_else />
+						<inp2:m_Phrase label="lu_text_NoFilesForThisProduct" />
+					</inp2:m_if>
+
+					<br /><br />
+
+					<inp2:m_if check="IsFavorite">
+						<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/ic_removefromfav.gif" width="11" height="10" alt="" /> <a class="item-action" href="<inp2:FavoriteToggleLink/>"><inp2:m_phrase name="lu_btn_RemoveFromWishList"/></a>
+					<inp2:m_else/>
+						<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/ic_addtofav.gif" width="11" height="10" alt="" /> <a class="item-action" href="<inp2:FavoriteToggleLink template="platform/my_account/my_favorites"/>"><inp2:m_phrase name="lu_btn_AddToWishList"/></a>
+					</inp2:m_if>
+					 &nbsp;|&nbsp;
+
+					<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/reviews.gif" width="14" height="10" alt="" /> <a class="item-action" href="<inp2:ProductLink template="in-commerce/products/add_review"/>"><inp2:m_phrase name="lu_btn_AddReview"/></a>
+				</td>
+
+			</tr>
+		</table>
+	</td>
+</inp2:m_DefineElement>
+<!--## /DOWNLOADABLE PRODUCT ELEMENT ##-->
+
+<!--## SHORT PRODUCT ELEMENT ##-->
+<inp2:m_DefineElement name="product_short_element">
+	<tr>
+		<td>
+			<a href="<inp2:ProductLink template="__default__"/>"><inp2:Field field="Name" /></a><br />
+			<inp2:m_if check="Field" name="DescriptionExcerpt">
+		 		<inp2:Field field="DescriptionExcerpt" first_chars="70"/><br />
+		 	</inp2:m_if>
+
+			<inp2:Field name="Price" currency="selected"/></span>
+			<br /><br />
+		</td>
+	</tr>
+</inp2:m_DefineElement>
+<!--## /SHORT PRODUCT ELEMENT ##-->
+
+<!--## NO PRODUCTS ELEMENT ##-->
+<inp2:m_DefineElement name="no_products">
+	<inp2:m_phrase name="lu_NoProducts"/>
+</inp2:m_DefineElement>
+<!--## /NO PRODUCTS ELEMENT ##-->

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/products.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/html_head.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/html_head.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/html_head.elm.tpl	(revision 12131)
@@ -0,0 +1,6 @@
+<!--## CSS & JAVASCRIPT FOR IN-COMMERCE ##-->
+
+<link rel="stylesheet" rev="stylesheet" href="<inp2:m_TemplatesBase module="In-Commerce"/>inc/styles.css" type="text/css" />
+<!--<script type="text/javascript" src="<inp2:m_TemplatesBase module="In-Commerce"/>inc/script.js"></script>-->
+
+<!--## /CSS & JAVASCRIPT FOR IN-COMMERCE ##-->

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/html_head.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/affiliates.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/affiliates.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/affiliates.elm.tpl	(revision 12131)
@@ -0,0 +1,151 @@
+<!--## NO PAYMENTS ELEMENT ##-->
+<inp2:m_DefineElement name="no_payments">
+	<inp2:m_Phrase label="lu_DontHavePayments"/>
+</inp2:m_DefineElement>
+<!--## /NO PAYMENTS ELEMENT ##-->
+
+<!--## NO VISITORS ELEMENT ##-->
+<inp2:m_DefineElement name="no_visitors">
+	<inp2:m_include template="in-commerce/elements/affiliate_date_filter.elm" prefix="visits.incommerce" field="VisitDate" grid_name="visitsincommerce"/>
+
+	<inp2:m_Phrase label="lu_DontHaveVisitors"/>
+</inp2:m_DefineElement>
+<!--## /NO VISITORS ELEMENT ##-->
+
+<!--## NO ORDERS ELEMENT ##-->
+<inp2:m_DefineElement name="no_orders">
+	<inp2:m_include template="in-commerce/elements/affiliate_date_filter.elm" prefix="visits.incommerce" field="VisitDate" grid_name="visitsincommerce"/>
+
+	<inp2:m_Phrase label="lu_DontHaveOrders"/>
+</inp2:m_DefineElement>
+<!--## /NO ORDERS ELEMENT ##-->
+
+<!--## PAYMENT ELEMENT ##-->
+<inp2:m_DefineElement name="payment_element">
+	<tr class="listing-row">
+		<td><inp2:Field field="PaymentDate" /></td>
+		<td><inp2:Field field="PaymentReference" /></td>
+		<td>
+			<strong><inp2:Field field="Amount" currency="selected"/></strong>
+		</td>
+	</tr>
+	<inp2:m_RenderElement name="separator" colspan="4"/>
+</inp2:m_DefineElement>
+<!--## /PAYMENT ELEMENT ##-->
+
+<!--## AFF. VISITS INFO ELEMENT ##-->
+<inp2:m_DefineElement name="affiliate_visits_info">
+	<tr class="listing-row">
+		<td>&nbsp;</td>
+		<td>&nbsp;</td>
+		<td>&nbsp;</td>
+		<td>
+			<strong><inp2:m_Phrase label="lu_Total"/>:<inp2:m_param name="OrderTotalAmount" /></strong>
+		</td>
+		<td>
+			<strong><inp2:m_Phrase label="lu_Total"/>:<inp2:m_param name="OrderAffiliateCommission" /></strong>
+		</td>
+	</tr>
+</inp2:m_DefineElement>
+<!--## /AFF. VISITS INFO ELEMENT ##-->
+
+<!--## AFF. ORDERS ELEMENT ##-->
+<inp2:m_DefineElement name="affiliate_orders_info">
+	<tr class="listing-row">
+		<td>&nbsp;</td>
+		<td>&nbsp;</td>
+		<td>
+			<inp2:m_Phrase label="lu_Total"/>:
+			<inp2:m_param name="OrderTotalAmount" />
+		</td>
+		<td>
+			<inp2:m_Phrase label="lu_Total"/>:
+			<inp2:m_param name="OrderAffiliateCommission" />
+		</td>
+	</tr>
+</inp2:m_DefineElement>
+<!--## /AFF. ORDERS ELEMENT ##-->
+
+<!--## MY VISITOR ELEMENT ##-->
+<inp2:m_DefineElement name="my_visitor_element">
+	<tr class="listing-row">
+		<td><inp2:Field field="VisitDate" format="_regional_DateFormat"/></td>
+		<td>
+			<inp2:m_if check="FieldEquals" field="Referer" value="">
+				<inp2:m_Phrase label="lu_visit_DirectReferer"/>
+			<inp2:m_else/>
+				<div style="overflow: hidden"><a href="<inp2:Field field="Referer"/>"><inp2:m_Phrase label="lu_RefererLink"/></a></div>
+			</inp2:m_if>
+		</td>
+		<td><inp2:Field field="OrderCountByVisit" /></td>
+		<td>
+			<inp2:Field field="OrderTotalAmountSum" currency="selected"/>
+		</td>
+		<td>
+			<inp2:Field field="OrderAffiliateCommissionSum" currency="selected"/>
+		</td>
+	</tr>
+	<inp2:m_RenderElement name="separator" colspan="5"/>
+</inp2:m_DefineElement>
+<!--## /MY VISITOR ELEMENT ##-->
+
+<!--## MY ORDER ELEMENT ##-->
+<inp2:m_DefineElement name="my_order_element">
+	<tr class="listing-row">
+		<td><inp2:Field field="VisitDate" format="_regional_DateFormat"/></td>
+		<td><inp2:Field field="OrderNumber"/></td>
+		<td>
+			<strong><inp2:Field field="OrderTotalAmount" currency="selected"/></strong>
+		</td>
+		<td>
+			<strong><inp2:Field field="OrderAffiliateCommission" currency="selected"/></strong>
+		</td>
+	</tr>
+	<inp2:m_RenderElement name="separator" colspan="4"/>
+</inp2:m_DefineElement>
+<!--## /MY VISITOR ELEMENT ##-->
+
+<inp2:m_DefineElement name="separator" colspan="0">
+	<tr>
+		<td colspan="<inp2:m_param name="colspan" />">
+			<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="3" height="1" alt=""/><br /></div>
+		</td>
+	</tr>
+</inp2:m_DefineElement>
+
+<!--## AFF. INFO TR ELEMENT ##-->
+<inp2:m_DefineElement name="affiliate_info_tr" type="">
+	<tr class="listing-row">
+		<td width="25%"><inp2:m_phrase label="$title"/></td>
+		<td width="25%"><inp2:m_param name="param" /></td>
+		<td align="left">
+			<a href="<inp2:m_Link template="in-commerce/my_account/affiliate/affiliate_statistics_{$type}_list"/>"><inp2:m_Phrase label="lu_details"/></a>
+		</td>
+	</tr>
+</inp2:m_DefineElement>
+<!--## /AFF. INFO TR ELEMENT ##-->
+
+<!--## AFF. INFO ELEMENT ##-->
+<inp2:m_DefineElement name="affiliate_info">
+	<table class="fullwidth">
+		<tr>
+			<td align="center">
+				<table width="400">
+					<inp2:m_RenderElement name="separator" colspan="3"/>
+					<inp2:m_RenderElement name="affiliate_info_tr" title="lu_TotalVisitors" param="$TotalVisitors" type="visits"/>
+					<inp2:m_RenderElement name="separator" colspan="3"/>
+
+					<inp2:m_RenderElement name="affiliate_info_tr" title="lu_TotalOrders" param="$OrderCount" type="orders"/>
+					<inp2:m_RenderElement name="separator" colspan="3"/>
+
+					<inp2:m_RenderElement name="affiliate_info_tr" title="lu_TotalOrderAmount" param="$OrderTotalAmount" type="orders"/>
+					<inp2:m_RenderElement name="separator" colspan="3"/>
+
+					<inp2:m_RenderElement name="affiliate_info_tr" title="lu_TotalCommissionEarned" param="$OrderAffiliateCommission" type="orders"/>
+					<inp2:m_RenderElement name="separator" colspan="3"/>
+				</table>
+			</td>
+		</tr>
+	</table>
+</inp2:m_DefineElement>
+<!--## /AFF. INFO ELEMENT ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/affiliates.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/pick_products.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/pick_products.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/pick_products.elm.tpl	(revision 12131)
@@ -0,0 +1,18 @@
+<!-- pick products -->
+<inp2:p_InitList list_name="pick_products" types="pick" parent_cat_id="0" recursive="1" per_page="short_list"/>
+
+<inp2:m_Capture to_var="header">
+	<a href="<inp2:m_Link template="in-commerce/products/pick_products" m_cat_id="0" m_cat_page="1" />"><inp2:m_phrase name="lu_title_PickProducts"/></a> (<inp2:p_TotalRecords list_name="pick_products"/>)
+</inp2:m_Capture>
+
+<inp2:m_include template="in-commerce/elements/products.elm"/>
+
+<table width="100%" style="border-width: 0px;">
+	<inp2:p_ListProducts list_name="pick_products" render_as="product_short_element" direction="H"/>
+</table>
+
+<inp2:m_DefineElement name="more_link">
+	<a href="<inp2:m_Link template="in-commerce/products/pick_products" m_cat_id="0" m_cat_page="1" />"><inp2:m_Phrase label="lu_More" /></a>
+</inp2:m_DefineElement>
+<inp2:p_MoreLink list_name="pick_products" render_as="more_link"/>
+<!-- // pick products -->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/pick_products.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/top_seller_products.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/top_seller_products.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/top_seller_products.elm.tpl	(revision 12131)
@@ -0,0 +1,17 @@
+<inp2:p_InitList list_name="top_seller_products" types="hot" recursive="1" per_page="short_list" />
+
+<inp2:m_Capture to_var="header">
+	<a href="<inp2:m_Link template="in-commerce/products/top_seller_products" m_cat_id="0" m_cat_page="1" />"><inp2:m_phrase name="lu_title_TopSellerProducts"/></a> (<inp2:p_TotalRecords list_name="top_seller_products"/>)
+</inp2:m_Capture>
+
+<inp2:m_include template="in-commerce/elements/products.elm"/>
+
+<table>
+	<inp2:p_ListProducts list_name="top_seller_products" render_as="product_short_element" no_table="1"/>
+</table>
+
+<inp2:m_DefineElement name="more_link">
+	<a href="<inp2:m_Link template="in-commerce/products/top_seller_products" />"><inp2:m_Phrase label="lu_More"/>...</a>
+</inp2:m_DefineElement>
+
+<inp2:p_MoreLink list_name="top_seller_products" render_as="more_link" />

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/top_seller_products.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/recent_products.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/recent_products.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/recent_products.elm.tpl	(revision 12131)
@@ -0,0 +1,22 @@
+<inp2:p_InitList list_name="recent_products" types="recent" parent_cat_id="any" recursive="true" per_page="short_list" except="in_cart" />
+
+<inp2:m_Capture to_var="header">
+	<a href="<inp2:m_Link template="in-commerce/products/recent_products" m_cat_id="0" m_cat_page="1" />"><inp2:m_phrase name="lu_title_RecentlyViewedProducts"/></a> (<inp2:p_TotalRecords list_name="recent_products"/>)
+</inp2:m_Capture>
+
+<inp2:m_include template="in-commerce/elements/products.elm"/>
+
+<table>
+	<inp2:p_ListProducts list_name="recent_products" render_as="product_short_element" columns="1" requery="0"/>
+</table>
+
+<inp2:m_DefineElement name="more_link">
+	<a href="<inp2:m_Link template="in-commerce/products/recent_products" />"><inp2:m_Phrase label="lu_More"/>...</a><br />
+</inp2:m_DefineElement>
+
+<inp2:p_MoreLink list_name="recent_products" render_as="more_link" />
+<br />
+
+<form method="post" action="<inp2:m_FormAction />">
+	<input class="button" type="submit" name="events[p][OnClearRecent]" value="<inp2:m_Phrase label="lu_btn_Clear"/>"/>
+</form>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/recent_products.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/action_box.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/action_box.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/action_box.elm.tpl	(revision 12131)
@@ -0,0 +1,29 @@
+<inp2:m_Capture to_var="header">
+	<inp2:m_phrase name="lu_title_ActionBox"/>
+</inp2:m_Capture>
+
+<table width="100%" style="border-width: 0px;">
+	<inp2:m_if check="m_Param" name="item_actions">
+		<tr>
+			<td>-</td>
+			<td>
+				<inp2:m_if check="p_IsFavorite">
+					<a href="<inp2:p_FavoriteToggleLink/>">
+						<inp2:m_phrase name="lu_btn_RemoveFromWishList"/>
+					</a>
+				<inp2:m_else/>
+					<a href="<inp2:p_FavoriteToggleLink template="platform/my_account/my_favorites"/>">
+						<inp2:m_phrase name="lu_btn_AddToWishList"/>
+					</a>
+				</inp2:m_if>
+			</td>
+		</tr>
+
+		<tr>
+			<td>-</td>
+			<td>
+				<a href="<inp2:p_ProductLink template="in-commerce/products/add_review"/>"><inp2:m_phrase name="lu_btn_ReviewThisProduct"/></a>
+			</td>
+		</tr>
+	</inp2:m_if>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/action_box.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/categories.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/categories.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/categories.elm.tpl	(revision 12131)
@@ -0,0 +1,50 @@
+<inp2:m_DefineElement name="more_link_elem">
+	<tr>
+		<td class="sub-category-padding">
+			<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/menu-li-2-level.gif" alt="" width="4" height="4" border="0" /><br />
+		</td>
+		<td>
+			<a href="<inp2:CategoryLink template="__default__" m_cat_page="1"/>" class="sub-category"><inp2:m_Phrase label="lu_more_products"/>...</a><br />
+			<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" alt="" width="1" height="3" border="0" /><br />
+		</td>
+	</tr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="subcategory_elem">
+	<tr>
+		<td class="sub-category-padding">
+			<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/menu-li-2-level.gif" alt="" width="4" height="4" border="0" /><br />
+		</td>
+		<td>
+			<inp2:m_if check="IsCurrent">
+				<inp2:Field name="Name"/>
+			<inp2:m_else/>
+				<a href="<inp2:CategoryLink template="__default__" m_cat_page="1"/>" class="sub-category"><inp2:Field name="Name"/></a>
+			</inp2:m_if>
+		</td>
+	</tr>
+</inp2:m_DefineElement>
+
+<inp2:m_Capture to_var="header">
+	<inp2:m_Phrase label="lu_title_Categories"/>
+</inp2:m_Capture>
+
+<table width="100%">
+	<inp2:m_DefineElement name="category_elem">
+		<td class="top-category-padding">
+			<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/menu-li-1-level.gif" alt="" width="6" height="5" border="0" /><br />
+		</td>
+		<td valign="top">
+			<inp2:m_if check="IsCurrent">
+				<strong><inp2:Field name="Name"/></strong><br />
+			<inp2:m_else/>
+				<a href="<inp2:CategoryLink template="__default__" m_cat_page="1"/>" class="top-category"><inp2:Field name="Name"/></a><br />
+			</inp2:m_if>
+			<table>
+			<inp2:ListCategories requery="1" render_as="subcategory_elem" more_link_render_as="more_link_elem" max_items="4" no_table="1"/>
+			</table>
+			<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" alt="" width="1" height="5" border="0" /><br />
+		</td>
+	</inp2:m_DefineElement>
+	<inp2:c_ListCategories render_as="category_elem" per_page="-1" columns="1" direction="H" parent_cat_id="Root" module="In-Commerce"/>
+</table>

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/categories.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/cart_indicator.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/cart_indicator.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/cart_indicator.elm.tpl	(revision 12131)
@@ -0,0 +1,26 @@
+<inp2:m_Capture to_var="header">
+	<inp2:m_phrase name="lu_title_CartIndicator"/>
+</inp2:m_Capture>
+
+<inp2:m_if check="ord_CartNotEmpty">
+	<table border="0" cellspacing="0" cellpadding="0" class="block">
+		<tr>
+			<td class="block-header"><inp2:m_Phrase label="lu_YourCart"/></td>
+		</tr>
+		<tr>
+			<td class="block-data">
+				<form method="post" action="<inp2:m_FormAction />">
+					<strong><inp2:m_Phrase label="lu_cart_TotalItems" />: </strong><inp2:ord_ItemsInCart/><br />
+
+					<strong><inp2:m_Phrase label="lu_cart_OrderTotal" />: </strong><inp2:ord_Field field="SubTotal" currency="selected"/><br />
+					<img src="img/s.gif" alt="" width="5" height="10" border="0" /><br />
+					<input type="hidden" name="viewcart_template" value="in-commerce/checkout/shop_cart">
+					<input class="button" type="submit" name="events[ord][OnViewCart]" value="<inp2:m_Phrase label="lu_cart_ViewCart" />">
+					<input type="hidden" name="next_step_template" value="<inp2:m_if check="ord_OrderHasTangibleItems">in-commerce/checkout/shipping<inp2:m_else/>in-commerce/checkout/billing</inp2:m_if>" />
+					<input class="button" type="submit" name="events[ord][OnCheckout]" value="<inp2:m_Phrase label="lu_cart_Checkout" />">
+
+				</form>
+			</td>
+		</tr>
+	</table>
+</inp2:m_if>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/cart_indicator.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/credit_cards.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/credit_cards.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/credit_cards.elm.tpl	(revision 12131)
@@ -0,0 +1,26 @@
+<inp2:m_Capture to_var="header">
+	<inp2:m_phrase name="lu_title_CreditCards"/>
+</inp2:m_Capture>
+
+<inp2:m_Phrase label="lu_text_WeAcceptCreditCards"/><br />
+<br />
+
+<table class="credit-card-table">
+	<tr>
+		<td>
+			<img alt="" src="<inp2:m_TemplatesBase module="In-Commerce"/>img/credit_cards/visa.gif" /><br />
+		</td>
+		<td>
+			<img alt="" src="<inp2:m_TemplatesBase module="In-Commerce"/>img/credit_cards/american_express.gif" /><br />
+		</td>
+	</tr>
+
+	<tr>
+		<td>
+			<img alt="" src="<inp2:m_TemplatesBase module="In-Commerce"/>img/credit_cards/master_card.gif" /><br />
+		</td>
+		<td>
+			<img alt="" src="<inp2:m_TemplatesBase module="In-Commerce"/>img/credit_cards/novus.gif" /><br />
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/credit_cards.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/manufacturer_dropdown.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/manufacturer_dropdown.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/manufacturer_dropdown.elm.tpl	(revision 12131)
@@ -0,0 +1,15 @@
+<inp2:m_Capture to_var="header">
+	<inp2:m_Phrase label="lu_comm_Manufacturers"/>1
+</inp2:m_Capture>
+
+<inp2:m_Get var="manuf_id" result_to_var="curr_manuf_id"/>
+
+<inp2:m_DefineElement name="manuf_elem_dropdown">
+<option value="<inp2:p_ManufacturerLink template="in-commerce/products/manufacturer_products" />" <inp2:m_if check="FieldEquals" name="ManufacturerId" value="$curr_manuf_id">selected="selected"</inp2:m_if> >
+<inp2:Field field="Name" /></option></inp2:m_DefineElement>
+
+<form id="manufacturers" method="post" action="<inp2:m_FormAction />">
+	<select name="Manufacturer" onchange="window.location.href=this.value">
+	<inp2:manuf.custom_ListManufacturers list_name="manufacturers" render_as="manuf_elem_dropdown" per_page="-1" row_start_render_as="html:" row_end_render_as="html:" empty_cell_render_as="html:" parent_cat_id="any" />
+	</select>
+</form>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/manufacturer_dropdown.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/checkout_steps.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/checkout_steps.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/checkout_steps.elm.tpl	(revision 12131)
@@ -0,0 +1,44 @@
+<inp2:m_Capture to_var="header">
+	<inp2:m_phrase name="lu_title_CheckoutSteps"/>
+</inp2:m_Capture>
+
+<table border="0" cellspacing="0" cellpadding="0" class="block">
+	<tr>
+		<td class="block-data">
+				<inp2:m_DefineElement name="passed_checkout_step">
+					<inp2:m_param name="number"/>. <a href="<inp2:m_param name="template_link"/>"><inp2:m_param name="title"/></a><br/>
+				</inp2:m_DefineElement>
+
+				<inp2:m_DefineElement name="current_checkout_step">
+					<span class="nav-bar-current" style="color:red"><inp2:m_param name="number"/>. <inp2:m_param name="title"/></span><br/>
+				</inp2:m_DefineElement>
+
+				<inp2:m_DefineElement name="checkout_step">
+					<inp2:m_param name="number"/>. <inp2:m_param name="title"/><br/>
+				</inp2:m_DefineElement>
+
+				<inp2:m_if check="ord_OrderHasTangibleItems">
+
+					<inp2:ord_CheckoutSteps render_as="checkout_step" passed_step_render_as="passed_checkout_step"
+							 current_step_render_as="current_checkout_step"
+							 steps="lu_ShoppingCart,lu_comm_ShippingInfo,lu_comm_BillingInfo,lu_comm_OrderPreview,lu_comm_Confirmation"
+							 templates="in-commerce/checkout/shop_cart,
+							 			in-commerce/checkout/shipping,
+							 			in-commerce/checkout/billing,
+							 			in-commerce/checkout/preview,
+							 			in-commerce/checkout/confirmation" />
+
+				<inp2:m_else/>
+
+					<inp2:ord_CheckoutSteps render_as="checkout_step" passed_step_render_as="passed_checkout_step"
+								 current_step_render_as="current_checkout_step"
+								 steps="lu_ShoppingCart,lu_comm_BillingInfo,lu_comm_OrderPreview,lu_comm_Confirmation"
+								 templates="in-commerce/checkout/shop_cart,
+								 			in-commerce/checkout/billing,
+								 			in-commerce/checkout/preview,
+								 			in-commerce/checkout/confirmation" />
+
+				</inp2:m_if>
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/checkout_steps.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/affiliate_navigation.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/affiliate_navigation.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/affiliate_navigation.elm.tpl	(revision 12131)
@@ -0,0 +1,24 @@
+<inp2:m_Capture to_var="header">
+	<inp2:m_Phrase label="lu_title_Affiliate"/>
+</inp2:m_Capture>
+
+<table class="fullwidth" style="border-width: 0px;">
+	<inp2:m_RenderElement name="box_element" template="in-commerce/my_account/affiliate/affiliate_statistics" title="lu_Statistics"/>
+	<inp2:m_RenderElement name="box_element" template="in-commerce/my_account/affiliate/affiliate_payments" title="lu_Payments"/>
+	<inp2:m_RenderElement name="box_element" template="in-commerce/my_account/affiliate/affiliate_materials" title="lu_Materials"/>
+	<inp2:m_RenderElement name="box_element" template="in-commerce/my_account/affiliate/affiliate_payment_type" title="lu_ChangePaymentType"/>
+	<tr>
+		<td>
+			<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/menu-li-2-level.gif" alt="" width="4" height="4" border="0" /><br />
+		</td>
+		<td>
+			<a href="<inp2:m_Link t='in-commerce/my_account/affiliate'/>" onclick="showAffiliateAgreement(); return false;"><inp2:m_phrase label="lu_TermsAndConditionsLink"/></a>
+		</td>
+	</tr>
+</table>
+
+<script type="text/javascript">
+function showAffiliateAgreement() {
+	window.open('<inp2:m_Link template="in-commerce/my_account/affiliate/affiliate_agreement" />', null, 'menubar=no,toolbars=no,width=500,height=300');
+}
+</script>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/side_boxes/affiliate_navigation.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/addresses.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/addresses.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/addresses.elm.tpl	(revision 12131)
@@ -0,0 +1,92 @@
+<!--## MY ADDRESS ELEMENT ##-->
+<inp2:m_DefineElement name="my_address_element">
+	<tr>
+		<td colspan="4">
+			<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="1" alt="" /></div>
+		</td>
+	</tr>
+	<tr class="listing-row">
+		<td>
+			<strong><inp2:Field field="To"/></strong><br />
+			<inp2:m_if check="Field" name="Company">
+				<inp2:Field field="Company"/><br />
+			</inp2:m_if>
+			<inp2:m_if check="FieldEquals" field="Address1" value="" inverse="inverse">
+				<inp2:Field field="Address1"/><br />
+			</inp2:m_if>
+
+			<inp2:m_if check="FieldEquals" field="Address2" value="" inverse="inverse">
+				<inp2:Field field="Address2"/><br />
+			</inp2:m_if>
+			<inp2:PrintLocation/><br />
+		</td>
+		<td>
+			<inp2:m_if check="Field" name="Email">
+				<inp2:Field field="Email"/><br />
+			</inp2:m_if>
+
+			<inp2:m_if check="Field" name="Phone">
+				<inp2:m_Phrase name="lu_Phone"/>: <inp2:Field field="Phone"/><br />
+			</inp2:m_if>
+
+			<inp2:m_if check="Field" name="Fax">
+				<inp2:m_Phrase name="lu_Fax"/>: <inp2:Field field="Fax"/><br />
+			</inp2:m_if>
+		</td>
+		<td>
+			<inp2:m_if check="Field" field="LastUsedAsShipping" value="1"><inp2:m_Phrase label="lu_LastUsedAsShipping"/><br/></inp2:m_if>
+			<inp2:m_if check="Field" field="LastUsedAsBilling" value="1"><inp2:m_Phrase label="lu_LastUsedAsBilling"/></inp2:m_if>
+			<br />
+		</td>
+		<td>
+			<inp2:m_if check="u.current_Field" name="cust_shipping_addr_block" inverse="1">
+				<inp2:m_if check="IsProfileAddress">
+					<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/ic_edit.gif" width="11" height="10" alt="" /> <a href="<inp2:m_Link template="platform/my_account/my_profile"/>" class="item-action"><inp2:m_Phrase label="lu_btn_Edit"/></a>
+				<inp2:m_else />
+					<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/ic_edit.gif" width="11" height="10" alt="" /> <a href="<inp2:m_Link template="in-commerce/my_account/edit_address" pass="m,addr"/>" class="item-action"><inp2:m_Phrase label="lu_btn_Edit"/></a> &nbsp;&nbsp;
+					&nbsp;|&nbsp; <img src="<inp2:m_TemplatesBase module="In-Portal"/>img/ic_delete.gif" width="11" height="10" alt="" /> <a href="<inp2:DeleteLink/>" onclick="return confirm('<inp2:m_phrase name="lu_comm_DeleteAddress" js_escape="1"/>');" class="item-action"><inp2:m_Phrase label="lu_btn_Delete"/></a>
+				</inp2:m_if>
+			</inp2:m_if>
+		</td>
+	</tr>
+</inp2:m_DefineElement>
+<!--## /MY ADDRESS ELEMENT ##-->
+
+<!--## ADDRESS SHORT ELEMENT ##-->
+<inp2:m_DefineElement name="address_short_element">
+	<option value="<inp2:m_param name="key"/>"<inp2:m_param name="selected"/>><inp2:m_param name="value"/></option>
+</inp2:m_DefineElement>
+<!--## /ADDRESS SHORT ELEMENT ##-->
+
+<!--## EDIT ADDRESS ELEMENT ##-->
+<inp2:m_DefineElement name="inp_edit_select_address" style="" is_last="0">
+	<tr>
+		<td class="field-name">
+			<inp2:m_phrase label="$title"/>:<br />
+			<span class="field-hint">
+				<inp2:m_phrase label="lu_hint_OrEnterAddress"/>
+			</span>
+		</td>
+		<td class="field-value">
+			<select class="input-select" name="<inp2:m_param name="type"/>_address_id" onchange="document.getElementById('events[ord][OnSelectAddress]').click();" style="<inp2:m_param name="style"/>">
+				<inp2:m_if check="ord_AllowAddAddress">
+					<option value="-1"><inp2:m_phrase name="lu_opt_NewAddress"/></option>
+				</inp2:m_if>
+				<inp2:ord_PrintAddresses render_as="address_short_element" type="$type" />
+			</select>
+				&nbsp;
+			<input class="button" type="submit" id="events[ord][OnSelectAddress]" name="events[ord][OnSelectAddress]" value="<inp2:m_Phrase label="lu_btn_Select"/>"/>
+			<a href="<inp2:m_Link template="in-commerce/my_account/my_addresses"/>"><inp2:m_Phrase name="lu_btn_ManageAddresses"/></a>
+		</td>
+	</tr>
+
+	<inp2:m_if check="ord_IsProfileAddress" type="$type">
+		<tr>
+			<td class="field-name" colspan="2">
+				<inp2:m_Phrase label="lu_hint_ProfileAddressWarning"/><br />
+			</td>
+		</tr>
+	</inp2:m_if>
+	<inp2:m_RenderElement name="inp_edit_field_separator" is_last="$is_last"/>
+</inp2:m_DefineElement>
+<!--## /EDIT ADDRESS ELEMENT ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/addresses.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/orders.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/orders.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/orders.elm.tpl	(revision 12131)
@@ -0,0 +1,23 @@
+<!--## NO ORDERS ELEMENT ##-->
+<inp2:m_DefineElement name="no_orders">
+	<inp2:m_phrase name="lu_NoOrders"/>
+</inp2:m_DefineElement>
+<!--## /NO ORDERS ELEMENT ##-->
+
+<!--## MY ORDER ELEMENT ##-->
+<inp2:m_DefineElement name="my_order_element">
+	<tr>
+		<td colspan="4">
+			<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="1" alt="" /></div>
+		</td>
+	</tr>
+	<tr class="listing-row">
+		<td><a href="<inp2:m_Link template="in-commerce/my_account/my_order_details" pass="m,ord"/>"><inp2:Field field="OrderNumber"/></a> <inp2:m_if check="FieldEquals" field="IsRecurringBilling" value="1"><strong>(<inp2:m_Phrase label="lu_Recurring"/>)</strong></inp2:m_if></td>
+		<td ><inp2:Field field="OrderDate" format="_regional_DateFormat"/></td>
+		<td>
+			<strong><inp2:Field field="TotalAmount" currency="selected"/></strong>
+		</td>
+		<td><inp2:Field field="Status"/></td>
+	</tr>
+</inp2:m_DefineElement>
+<!--## /MY ORDER ELEMENT ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/orders.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/sorting.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/sorting.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/sorting.elm.tpl	(revision 12131)
@@ -0,0 +1,41 @@
+<!--## SORTING TEMPLATE FOR IN-COMMERCE ##-->
+
+<table class="fullwidth">
+	<tr>
+		<td class="category-statistics">
+			<inp2:m_phrase name="lu_TotalProducts"/>: <inp2:p_ItemCount/>  &nbsp;|&nbsp;  <inp2:m_phrase name="lu_AddedToday"/>: <inp2:p_ItemCount today="1"/>
+		</td>
+		<td class="category-statistics" align="right">
+			<inp2:m_phrase name="lu_ProductsUpdated"/>: <inp2:p_LastUpdated format="_regional_DateFormat"/>
+		</td>
+	</tr>
+</table>
+<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="4" alt="" /><br />
+<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/grey_pix.gif" width="100%" height="1" alt="" /><br />
+<br />
+
+<table class="fullwidth">
+	<tr>
+		<td align="right">
+			<form method="post" action="<inp2:m_FormAction />">
+				<inp2:m_Phrase label="lu_SortProductsBy"/>:
+
+				<select class="input-select" name="<inp2:p_CombinedSortingDropDownName/>">
+					<option value="Name|asc" <inp2:p_SortingSelected sorting="l1_Name|asc" selected='selected="selected"'/>> <inp2:m_Phrase label="lu_comm_NameAZ"/></option>
+					<option value="Name|desc" <inp2:p_SortingSelected sorting="l1_Name|desc" selected='selected="selected"'/>> <inp2:m_Phrase label="lu_comm_NameZA"/></option>
+					<option value="Manufacturer|asc" <inp2:p_SortingSelected sorting="Manufacturer|asc" selected='selected="selected"'/>> <inp2:m_Phrase label="lu_comm_ManufAZ"/></option>
+					<option value="Manufacturer|desc" <inp2:p_SortingSelected sorting="Manufacturer|desc" selected='selected="selected"'/>> <inp2:m_Phrase label="lu_comm_ManufZA"/></option>
+					<option value="Price|asc" <inp2:p_SortingSelected sorting="Price|asc" selected='selected="selected"'/>> <inp2:m_Phrase label="lu_comm_PriceLH"/></option>
+					<option value="Price|desc" <inp2:p_SortingSelected sorting="Price|desc" selected='selected="selected"'/>> <inp2:m_Phrase label="lu_comm_PriceHL"/></option>
+					<option value="CreatedOn|asc" <inp2:p_SortingSelected sorting="CreatedOn|asc" selected='selected="selected"'/>> <inp2:m_Phrase label="lu_comm_RecentToOld"/></option>
+					<option value="CreatedOn|desc" <inp2:p_SortingSelected sorting="CreatedOn|desc" selected='selected="selected"'/>> <inp2:m_Phrase label="lu_comm_OldToRecent"/></option>
+				</select>
+				<input type="submit" class="button" name="<inp2:p_SubmitName event="OnSetSortingDirect"/>" value="<inp2:m_Phrase label="lu_btn_Sort"/>" />
+			</form>
+		</td>
+	</tr>
+</table>
+
+<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="10" alt="" /><br />
+
+<!--## /SORTING TEMPLATE FOR IN-COMMERCE ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/sorting.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/affiliate_date_filter.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/affiliate_date_filter.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/affiliate_date_filter.elm.tpl	(revision 12131)
@@ -0,0 +1,46 @@
+<form method="POST" action="<inp2:m_FormAction />">
+<center>
+	<script src="<inp2:m_TemplatesBase module='In-Portal'/>inc/calendar.js"></script>
+	<table align="center">
+		<tr class="listing-row">
+			<inp2:m_inc param="tab_index" by="1"/>
+			<td>
+				<strong><inp2:m_phrase label="la_from_date"/></strong>
+			</td>
+			<td>
+				<inp2:m_if check="{$prefix}_SearchError" field="$field">
+					<span class="field-error"><inp2:{$prefix}_SearchError field="$field"/></span><br />
+				</inp2:m_if>
+				<input type="text" class="input-text" name="<inp2:{$prefix}_SearchInputName field="$field" filter_type="date_range" type="from" grid="$grid_name"/>" id="<inp2:{$prefix}_SearchInputName field="$field" filter_type="date_range" type="from" grid="$grid_name"/>" value="<inp2:{$prefix}_SearchField field="$field" filter_type="date_range" type="from" grid="$grid_name"/>" size="<inp2:{$prefix}_SearchFormat field="{$field}_date" input_format="1" edit_size="1"/>" datepickerIcon="<inp2:m_TemplatesBase module="In-Portal"/>img/calendar_icon.gif"/>
+				<span>(<inp2:{$prefix}_SearchFormat field="{$field}_date" input_format="1" human="true"/>)</span>
+				<script type="text/javascript">
+					initCalendar("<inp2:{$prefix}_SearchInputName field="$field" filter_type="date_range" type="from" grid="$grid_name"/>", "<inp2:{$prefix}_SearchFormat field="{$field}_date" input_format="1"/>");
+				</script>
+			</td>
+		</tr>
+		<tr class="listing-row">
+			<td>
+				<strong><inp2:m_phrase label="la_to_date"/></strong>
+			</td>
+			<td>
+				<inp2:m_if check="{$prefix}_SearchError" field="$field">
+					<span class="field-error"><inp2:{$prefix}_SearchError field="$field"/></span><br />
+				</inp2:m_if>
+				<input type="text" class="input-text" name="<inp2:{$prefix}_SearchInputName field="$field" filter_type="date_range" type="to" grid="$grid_name"/>" id="<inp2:{$prefix}_SearchInputName field="$field" filter_type="date_range" type="to" grid="$grid_name"/>" value="<inp2:{$prefix}_SearchField field="$field" filter_type="date_range" type="to" grid="$grid_name"/>" size="<inp2:{$prefix}_SearchFormat field="{$field}_date" input_format="1" edit_size="1"/>" datepickerIcon="<inp2:m_TemplatesBase module="In-Portal"/>img/calendar_icon.gif"/>
+				<span>(<inp2:{$prefix}_SearchFormat field="{$field}_date" input_format="1" human="true"/>)</span>
+				<script type="text/javascript">
+					initCalendar("<inp2:{$prefix}_SearchInputName field="$field" filter_type="date_range" type="to" grid="$grid_name"/>", "<inp2:{$prefix}_SearchFormat field="{$field}_date" input_format="1"/>");
+				</script>
+			</td>
+		</tr>
+		<tr class="listing-row">
+			<td colspan="3" align="center">
+				<input class="button" type="submit" name="events[<inp2:m_param name="prefix"/>][OnSearch]" value="<inp2:m_phrase label="lu_search" />">
+				<input class="button" type="submit" name="events[<inp2:m_param name="prefix"/>][OnSearchReset]" value="<inp2:m_phrase label="lu_reset" />">
+			</td>
+		</tr>
+	</table>
+</center>
+<input type="hidden" name="grid_name" value="<inp2:m_param name="grid_name"/>" />
+</form>
+<br />
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/affiliate_date_filter.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/forms.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/forms.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/forms.elm.tpl	(revision 12131)
@@ -0,0 +1,82 @@
+<inp2:m_DefineElement name="inp_affiliate_caption" style="" valign="top" title="" required="0">
+	<td class="field-name" valign="<inp2:m_Param name="valign"/>" style="<inp2:m_Param name="style"/>">
+		<inp2:m_phrase label="$title"/><inp2:m_if check="m_ParamEquals" name="required" value="1"><span class="field-required"> *</span></inp2:m_if>:
+	</td>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="inp_affiliate_box" is_last="0" style="" required="0">
+	<tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+		<inp2:m_inc param="tab_index" by="1"/>
+		<inp2:m_RenderElement name="inp_affiliate_caption" style="$style" title="$title" required="$required"/>
+		<td class="field-value" nowrap>
+			<inp2:m_if check="m_GetEquals" var="{$field}RequiredError" value="1">
+				<span class="field-error"><inp2:m_Phrase label="la_err_required" /></span><br />
+			</inp2:m_if>
+			<input type="text" class="input-text" name="<inp2:m_Param name="field"/>" value="<inp2:m_Get var="$field" />" tabindex="<inp2:m_get param="tab_index"/>"/>
+		</td>
+	</tr>
+	<inp2:m_RenderElement name="inp_edit_field_separator" is_last="$is_last"/>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="inp_affiliate_textarea" is_last="0" required="0">
+	<tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+		<inp2:m_inc param="tab_index" by="1"/>
+		<inp2:m_RenderElement name="inp_affiliate_caption" style="$style" title="$title" required="$required"/>
+		<td class="field-value">
+			<textarea class="input-textarea" tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:m_param name="field"/>" cols="<inp2:m_param name="cols"/>" rows="<inp2:m_param name="rows"/>"><inp2:m_Get var="$field" /></textarea>
+		</td>
+	</tr>
+	<inp2:m_RenderElement name="inp_edit_field_separator" is_last="$is_last"/>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="affiliate_payment_type_element">
+	<tr>
+		<td valign="top" nowrap>
+			<input type="radio" name="<inp2:m_Param name="field"/>" id="<inp2:m_Param name="field"/>_<inp2:Field name="PaymentTypeId" />" value="<inp2:Field name="$field" />" <inp2:m_if check="u_AffiliatePaymentTypeChecked">checked</inp2:m_if>/>
+		</td>
+		<td>
+			<label for="<inp2:m_Param name="field"/>_<inp2:Field name="$field" />">
+				<inp2:Field name="Name" /><br />
+				<inp2:m_if check="Field" name="Description">
+					<inp2:Field name="Description" />
+				</inp2:m_if>
+			</label>
+		</td>
+	</tr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="inp_affiliate_payment_types" is_last="0" required="0">
+	<tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+		<inp2:m_inc param="tab_index" by="1"/>
+		<inp2:m_RenderElement name="inp_affiliate_caption" style="$style" title="$title" required="$required"/>
+		<td class="field-value">
+			<table>
+				<inp2:u_ListAffiliatesPaymentTypes render_as="affiliate_payment_type_element" field="$field"/>
+			</table>
+		</td>
+	</tr>
+	<inp2:m_RenderElement name="inp_edit_field_separator" is_last="$is_last"/>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="inp_affiliate_terms_checkbox" is_last="0">
+	<tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+		<td class="field-name" nowrap>
+			&nbsp;
+		</td>
+		<td class="field-value">
+			<inp2:m_if check="m_GetEquals" var="MustAgreeToTerms" value="1">
+				<span class="field-error"><inp2:m_Phrase label="lu_comm_MustAgreeAffiliateTermsError" /></span><br />
+			</inp2:m_if>
+			<input type="checkbox" name="AgreeToAffiliateTerms"/>
+			<inp2:m_Phrase label="lu_comm_IAgreeTo" />
+			<a href="javascript:showAffiliateAgreement()"><inp2:m_Phrase label="lu_comm_AffiliateAgreement" /></a>
+			<inp2:m_Phrase label="lu_comm_TermsAndConditions" />
+		</td>
+	</tr>
+
+	<script type="text/javascript">
+		function showAffiliateAgreement() {
+			window.open('<inp2:m_Link template="in-commerce/my_account/affiliate/affiliate_agreement" />', null, 'menubar=no,toolbars=no,width=500,height=300');
+		}
+	</script>
+</inp2:m_DefineElement>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/forms.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/currency_picker.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/currency_picker.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/currency_picker.elm.tpl	(revision 12131)
@@ -0,0 +1,15 @@
+<td width="1">
+	<img src="<inp2:m_TemplatesBase module="In-Portal"/>img/languages_separator.gif" width="1" height="22" alt="" />
+</td>
+<td class="top-select-padding">
+<form method="post" name="cur_form"  id="cur_form" action="<inp2:m_FormAction />">
+&nbsp; <inp2:m_Phrase label="lu_YourCurrency"/>:
+	<input type="hidden" name="events[curr][OnChangeCurrency]" value="" />
+	<select name="curr_iso" class="input-select" onchange="document.getElementById('cur_form').submit()">
+	<inp2:m_DefineElement name="currency">
+		<option value="<inp2:Field name="ISO"/>" <inp2:m_if check="SelectedCurrency">selected="selected"</inp2:m_if> ><inp2:Field name="ISO"/></option>
+	</inp2:m_DefineElement>
+	<inp2:curr_ListCurrencies render_as="currency" no_table="1"/>
+	</select>
+</form>
+</td>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/currency_picker.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/options_blocks.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/options_blocks.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/options_blocks.elm.tpl	(revision 12131)
@@ -0,0 +1,32 @@
+<!--## PRODUCT OPTIONS ELEMENTS ##-->
+
+<inp2:m_DefineElement name="option_value_element">
+	<inp2:m_param name="value"/> <inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/> (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if>
+	<inp2:m_if check="m_ParamEquals" name="is_last" value="1"><inp2:m_else/>, </inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="option_element">
+	<inp2:m_if check="m_ParamEquals" param="type" value="6"> <!-- checkboxes - multiple -->
+		<strong><inp2:m_param name="option"/>:</strong>
+			<inp2:PrintOptionValues render_as="option_value_element" currency="selected"/>
+	<inp2:m_else/>
+			<strong><inp2:m_param name="option"/>:</strong> <inp2:m_param name="value"/>
+				<inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/> (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if>
+	</inp2:m_if><br/>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="option_value_element_no_price">
+	<inp2:m_param name="value"/>
+	<inp2:m_if check="m_ParamEquals" name="is_last" value="1"><inp2:m_else/>, </inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="option_element_no_price">
+	<inp2:m_if check="m_ParamEquals" param="type" value="6"> <!-- checkboxes - multiple -->
+		<strong><inp2:m_param name="option"/>:</strong>
+			<inp2:PrintOptionValues render_as="option_value_element_no_price"/>
+	<inp2:m_else/>
+			<strong><inp2:m_param name="option"/>:</strong> <inp2:m_param name="value"/>
+	</inp2:m_if><br/>
+</inp2:m_DefineElement>
+
+<!--## /PRODUCT OPTIONS ELEMENTS ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/options_blocks.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/order_preview.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/order_preview.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/order_preview.elm.tpl	(revision 12131)
@@ -0,0 +1,312 @@
+<inp2:m_include template="in-commerce/elements/options_blocks.elm"/>
+
+<inp2:m_DefineElement name="orderitem_elem">
+	<tr  class="order-prewiew-padding-cell">
+		<td>
+			<strong><inp2:Field name="ProductName"/></strong><inp2:m_if check="ord_BackorderFlag"> <span><inp2:m_phrase label="lu_cart_BackorderFlag" /></span></inp2:m_if>
+			<inp2:m_if check="HasOptions">
+				<br/>
+				<span>
+				<inp2:m_if check="DisplayOptionsPricing"> <!-- selectable options or overriding combination -->
+					<inp2:PrintOptions render_as="option_element" currency="selected"/>
+				<inp2:m_else/> <!-- listed combinations -->
+					<inp2:PrintOptions render_as="option_element_no_price"/>
+				</inp2:m_if>
+				</span>
+				<br/>
+			</inp2:m_if>
+			<inp2:m_if check="HasDiscount">
+				<br />
+				<inp2:m_Phrase label="lu_comm_RegularPrice" />: <inp2:Field name="FlatPrice" currency="selected"/><br />
+				<inp2:m_Phrase label="lu_comm_Discount" />: <span><inp2:Field name="ItemDiscount" currency="selected" negative="1"/></span>
+			</inp2:m_if>
+		</td>
+		<td>
+			<strong><inp2:Field name="Price" currency="selected"/></strong>
+		</td>
+		<td><inp2:Field name="Quantity"/></td>
+		<td><strong><inp2:Field name="ExtendedPrice" currency="selected"/></strong></td>
+	</tr>
+	<tr>
+		<td colspan="4">
+			<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="1" alt="" /></div>
+		</td>
+	</tr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="order_form_shipping">
+	<!-- shipping -->
+	<table width="100%">
+		<tr>
+			<td colspan="2">
+				<inp2:m_RenderElement name="subsection" title="lu_section_ShippingInfo"/>
+			</td>
+		</tr>
+		<tr class="order-prewiew-padding-cell">
+			<td><strong><inp2:m_Phrase label="lu_Name"/></strong>:</td>
+			<td><inp2:Field field="ShippingTo"/></td>
+		</tr>
+		<inp2:m_if check="Field" name="ShippingCompany">
+		<tr  class="order-prewiew-padding-cell">
+			<td><strong><inp2:m_Phrase label="lu_comm_Company"/></strong>:</td>
+			<td><inp2:Field field="ShippingCompany"/></td>
+		</tr>
+		</inp2:m_if>
+		<inp2:m_if check="Field" name="ShippingEmail">
+		<tr  class="order-prewiew-padding-cell">
+			<td><strong><inp2:m_Phrase label="lu_comm_EmailAddress"/></strong>:</td>
+			<td><inp2:Field field="ShippingEmail"/></td>
+		</tr>
+		</inp2:m_if>
+		<tr class="order-prewiew-padding-cell">
+			<td><strong><inp2:m_Phrase label="lu_comm_PhoneNumber"/></strong>:</td>
+			<td><inp2:Field field="ShippingPhone"/></td>
+		</tr>
+		<tr  class="order-prewiew-padding-cell">
+			<td><strong><inp2:m_Phrase label="lu_comm_FaxNumber"/></strong>:</td>
+			<td><inp2:Field field="ShippingFax"/></td>
+		</tr>
+		<tr  class="order-prewiew-padding-cell">
+			<td><strong><inp2:m_Phrase label="lu_comm_Address"/></strong>:</td>
+			<td>
+				<inp2:m_if check="FieldEquals" field="ShippingAddress1" value="" inverse="inverse">
+					<inp2:Field field="ShippingAddress1"/><br>
+				</inp2:m_if>
+
+				<inp2:m_if check="FieldEquals" field="ShippingAddress2" value="" inverse="inverse">
+					<inp2:Field field="ShippingAddress2"/><br>
+				</inp2:m_if>
+				<inp2:PrintLocation type="Shipping"/>
+			</td>
+		</tr>
+	</table>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="order_form_billing">
+	<!-- billing -->
+	<table width="100%">
+		<tr>
+			<td colspan="2">
+				<inp2:m_RenderElement name="subsection" title="lu_section_BillingInfo"/>
+			</td>
+		</tr>
+		<tr class="order-prewiew-padding-cell">
+			<td><strong><inp2:m_Phrase label="lu_Name"/></strong>:</td>
+			<td><inp2:Field field="BillingTo"/></td>
+		</tr>
+		<inp2:m_if check="Field" name="BillingCompany">
+		<tr class="order-prewiew-padding-cell">
+			<td><strong><inp2:m_Phrase label="lu_comm_Company"/></strong>:</td>
+			<td><inp2:Field field="BillingCompany"/></td>
+		</tr>
+		</inp2:m_if>
+		<inp2:m_if check="Field" name="BillingEmail">
+		<tr class="order-prewiew-padding-cell">
+			<td><strong><inp2:m_Phrase label="lu_comm_EmailAddress"/></strong>:</td>
+			<td><inp2:Field field="BillingEmail"/></td>
+		</tr>
+		</inp2:m_if>
+		<tr class="order-prewiew-padding-cell">
+			<td><strong><inp2:m_Phrase label="lu_comm_PhoneNumber"/></strong>:</td>
+			<td><inp2:Field field="BillingPhone"/></td>
+		</tr>
+		<tr class="order-prewiew-padding-cell">
+			<td><strong><inp2:m_Phrase label="lu_comm_FaxNumber"/></strong>:</td>
+			<td><inp2:Field field="BillingFax"/></td>
+		</tr>
+		<tr class="order-prewiew-padding-cell">
+			<td><strong><inp2:m_Phrase label="lu_comm_Company"/></strong>:</td>
+			<td><inp2:Field field="BillingCompany"/></td>
+		</tr>
+		<tr class="order-prewiew-padding-cell">
+			<td><strong><inp2:m_Phrase label="lu_comm_Address"/></strong>:</td>
+			<td>
+				<inp2:m_if check="FieldEquals" field="BillingAddress1" value="" inverse="inverse">
+					<inp2:Field field="BillingAddress1"/><br>
+				</inp2:m_if>
+
+				<inp2:m_if check="FieldEquals" field="BillingAddress2" value="" inverse="inverse">
+					<inp2:Field field="BillingAddress2"/><br>
+				</inp2:m_if>
+				<inp2:PrintLocation type="Billing"/>
+			</td>
+		</tr>
+
+		<tr class="order-prewiew-padding-cell">
+			<td><strong><inp2:m_Phrase label="lu_comm_PaymentType"/>:</strong></td>
+			<td><inp2:Field name="PaymentType" /></td>
+		</tr>
+
+		<inp2:m_if check="UsingCreditCard">
+			<tr class="order-prewiew-padding-cell">
+				<td><strong><inp2:m_Phrase label="lu_comm_NameOnCard"/>:</strong></td>
+				<td><inp2:Field name="PaymentNameOnCard"/></td>
+			</tr>
+			<tr class="order-prewiew-padding-cell">
+				<td><strong><inp2:m_Phrase label="lu_comm_CardType"/>:</strong></td>
+				<td><inp2:Field name="PaymentCardType" /></td>
+			</tr>
+			<tr class="order-prewiew-padding-cell">
+				<td><strong><inp2:m_Phrase label="lu_comm_CardNumber"/>:</strong></td>
+				<td><inp2:Field name="PaymentAccount" masked="masked"/></td>
+			</tr>
+			<tr class="order-prewiew-padding-cell">
+				<td><strong><inp2:m_Phrase label="lu_comm_Exp"/>:</strong></td>
+				<td><inp2:Field name="PaymentCCExpDate"/></td>
+			</tr>
+		</inp2:m_if>
+	</table>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="order_form">
+	<table>
+		<tr>
+			<td>
+				<strong><inp2:m_Phrase label="lu_comm_OrderNumber"/><inp2:Field name="OrderNumber"/></strong>
+			</td>
+		</tr>
+	</table>
+	<br />
+
+	<inp2:m_if check="OrderHasTangibleItems">
+		<table width="100%">
+			<tr>
+				<td valign="top" width="49%">
+					<inp2:m_RenderElement name="order_form_shipping" PrefixSpecial="ord"/>
+				</td>
+				<td>&nbsp;</td>
+				<td valign="top" width="49%">
+					<inp2:m_RenderElement name="order_form_billing" PrefixSpecial="ord"/>
+				</td>
+			</tr>
+		</table>
+	<inp2:m_else />
+		<table width="100%">
+			<tr>
+				<td>
+					<inp2:m_RenderElement name="order_form_billing" PrefixSpecial="ord"/>
+				</td>
+			</tr>
+		</table>
+	</inp2:m_if>
+
+	<br /><br />
+
+	<table style="width:100%">
+		<tr>
+			<td colspan="4">
+				<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="1" alt="" /></div>
+			</td>
+		</tr>
+		<tr>
+			<td class="sub-section-header"><inp2:m_Phrase label="lu_comm_ProductDescription"/></td>
+			<td class="sub-section-header"><inp2:m_Phrase label="lu_comm_YourPrice"/></td>
+			<td class="sub-section-header"><inp2:m_Phrase label="lu_comm_Qty"/>.</td>
+			<td class="sub-section-header"><inp2:m_Phrase label="lu_comm_Total"/></td>
+		</tr>
+		<tr>
+			<td colspan="4">
+				<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="1" alt="" /></div>
+			</td>
+		</tr>
+
+		<inp2:ord_ListOrderItems render_as="orderitem_elem"/>
+
+		<tr class="order-sub-total">
+			<td>
+				<inp2:m_if check="ord_HasDiscount">
+					<inp2:m_Phrase label="lu_comm_TotalSavings" />: <span><inp2:ord_Field name="DiscountTotal" currency="selected" /></span><br />
+				</inp2:m_if>&nbsp;
+			</td>
+			<td>
+				&nbsp;
+			</td>
+			<td>
+				&nbsp;
+			</td>
+			<td align="left" class="shopping-cart-button-padding">
+				<inp2:m_Phrase label="lu_comm_Subtotal"/>: <inp2:Field name="SubTotal" currency="selected"/>
+			</td>
+		</tr>
+	</table>
+
+
+	<br />
+	<table width="100%">
+		<tr>
+		    <td>
+		    	<inp2:m_RenderElement name="subsection" title="lu_section_OrderTotal"/>
+			</td>
+		</tr>
+	</table>
+
+	<table class="order-prewiew-padding-cell">
+
+		<inp2:m_DefineElement name="shipping_total">
+			<tr>
+				<td><strong><inp2:m_Phrase label="lu_comm_ShippingCost"/> (<inp2:ord_ShippingType />):</strong></td>
+				<td><inp2:ord_Field name="ShippingCost" currency="selected"/></td>
+			</tr>
+			<tr>
+				<td><strong><inp2:m_Phrase label="lu_comm_Insurance_Fee"/>:</strong></td>
+				<td><inp2:ord_Field name="InsuranceFee" currency="selected"/></td>
+			</tr>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="processing_total">
+			<tr>
+				<td><strong><inp2:m_Phrase label="lu_comm_ProcessingFee"/>: </strong></td>
+				<td><inp2:ord_Field name="ProcessingFee" currency="selected"/></td>
+			</tr>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="sub_total">
+			<tr>
+				<td><strong><inp2:m_Phrase label="lu_comm_SubTotal"/>: </strong></td>
+				<td><inp2:ord_Field name="AmountWithoutVAT" currency="selected"/></td>
+			</tr>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="vat_total">
+			<tr>
+				<td><strong><inp2:m_Phrase label="lu_comm_VAT"/> <inp2:ord_Field name="VATPercent"/>%: </strong></td>
+				<td><inp2:ord_Field name="VAT" currency="selected"/></td>
+			</tr>
+		</inp2:m_DefineElement>
+
+		<inp2:ord_PrintTotals
+			shipping_render_as="shipping_total"
+			processing_render_as="processing_total"
+			sub_total_render_as="sub_total"
+			vat_render_as="vat_total"/>
+
+		<inp2:m_if check="ord_Field" name="GiftCertificateId">
+			<tr>
+				<td><strong><inp2:m_Phrase label="lu_comm_Gift_Certificate"/>: </strong></td>
+				<td><inp2:ord_Field name="GiftCertificateDiscount" currency="selected"/></td>
+			</tr>
+		</inp2:m_if>
+
+		<tr class="order-grand-total">
+		  <td><inp2:m_Phrase label="lu_comm_GrandTotal"/>:</td>
+			<td><span><inp2:Field name="TotalAmount" currency="selected"/></span></td>
+		</tr>
+	</table>
+	<br />
+</inp2:m_DefineElement>
+
+<inp2:ord_ShowOrder render_as="order_form" />
+
+<table>
+	<tr>
+		<td>
+			<form method="POST" action="<inp2:ord_GetFormAction/>">
+				<inp2:ord_GetFormHiddenFields return_template="in-commerce/checkout/checkout_success"
+											  cancel_template="in-commerce/checkout/billing" />
+				<inp2:m_if check="ord_NeedsPlaceButton">
+					<input type="submit" value="<inp2:m_Phrase label="lu_order_CompleteOrder" />" class="button">
+				</inp2:m_if>
+			</form>
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/order_preview.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/order_details.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/order_details.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/order_details.elm.tpl	(revision 12131)
@@ -0,0 +1,362 @@
+<inp2:m_include template="in-commerce/elements/options_blocks.elm"/>
+
+<!--## PRODUCT IMAGE ELEMENT ##-->
+<inp2:m_DefineElement name="product_image">
+	<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" /><br/>
+</inp2:m_DefineElement>
+<!--## /PRODUCT IMAGE ELEMENT ##-->
+
+<!--## ORDER DETAILS ELEMENTS ##-->
+<!--## THIS SECTION IS USED BY myaccount/my_order_details.tpl ##-->
+<inp2:m_DefineElement name="orderitem_elem">
+	<tr class="order-padding-left">
+		<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">
+			<td width="120">
+				<inp2:p_Image render_as="product_image" thumbnail="1" DefaultImage="platform/img/no_picture.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120" />
+			</td>
+		</inp2:m_if>
+
+		<td valign="top">
+			<inp2:m_if check="ProductExists">
+				<inp2:m_if check="FieldEquals" field="Virtual" value="0">
+					<a href="<inp2:ProductLink template="__default__"/>"><inp2:Field name="ProductName" /></a>
+				<inp2:m_else/>
+					<inp2:Field name="ProductName" />
+				</inp2:m_if>
+			<inp2:m_else/>
+				<inp2:Field field="ProductName"/>
+			</inp2:m_if>
+			<inp2:m_if check="HasOptions">
+				<br/>
+				<span>
+				<inp2:m_if check="DisplayOptionsPricing"> <!-- selectable options or overriding combination -->
+					<inp2:PrintOptions render_as="option_element" currency="selected"/>
+				<inp2:m_else/> <!-- listed combinations -->
+					<inp2:PrintOptions render_as="option_element_no_price"/>
+				</inp2:m_if>
+				</span>
+				<br/>
+			</inp2:m_if>
+			<inp2:m_if check="HasDiscount">
+				<br />
+				<inp2:m_Phrase label="lu_comm_RegularPrice" />: <inp2:Field name="FlatPrice" currency="selected"/><br />
+				<inp2:m_Phrase label="lu_comm_Discount" />: <span>- <inp2:Field name="ItemDiscount" currency="selected" negative="1"/></span>
+			</inp2:m_if>
+		</td>
+		<td valign="top"><strong><inp2:Field field="Price" currency="selected"/></strong></td>
+		<td valign="top"><inp2:Field field="Quantity"/></td>
+		<td valign="top"><strong><inp2:Field field="ExtendedPrice" currency="selected"/></strong></td>
+	</tr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="order_form_shipping">
+	<!-- shipping -->
+	<table width="100%" cellpadding="0" cellspacing="0">
+		<tr>
+			<td colspan="2">
+				<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="1" alt="" /></div>
+			</td>
+		</tr>
+		<tr class="sub-section-header">
+			<td colspan="2"><inp2:m_Phrase label="lu_section_ShippingInfo"/></td>
+		</tr>
+		<tr>
+			<td colspan="2">
+				<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="1" alt="" /></div>
+			</td>
+		</tr>
+		<tr class="order-padding-left">
+			<td width="150"><strong><inp2:m_Phrase label="lu_Name"/></strong>:</td>
+			<td><inp2:Field field="ShippingTo"/></td>
+		</tr>
+		<inp2:m_if check="Field" name="ShippingCompany">
+		<tr class="order-padding-left">
+			<td><strong><inp2:m_Phrase label="lu_comm_Company"/></strong>:</td>
+			<td><inp2:Field field="ShippingCompany"/></td>
+		</tr>
+		</inp2:m_if>
+		<inp2:m_if check="Field" name="ShippingEmail">
+		<tr class="order-padding-left">
+			<td><strong><inp2:m_Phrase label="lu_comm_EmailAddress"/></strong>:</td>
+			<td><inp2:Field field="ShippingEmail"/></td>
+		</tr>
+		</inp2:m_if>
+		<tr class="order-padding-left">
+			<td><strong><inp2:m_Phrase label="lu_comm_PhoneNumber"/></strong>:</td>
+			<td><inp2:Field field="ShippingPhone"/></td>
+		</tr>
+		<tr class="order-padding-left">
+			<td><strong><inp2:m_Phrase label="lu_comm_FaxNumber"/></strong>:</td>
+			<td><inp2:Field field="ShippingFax"/></td>
+		</tr>
+		<tr class="order-padding-left">
+			<td><strong><inp2:m_Phrase label="lu_comm_Address"/></strong>:</td>
+			<td>
+				<inp2:m_if check="FieldEquals" field="ShippingAddress1" value="" inverse="inverse">
+					<inp2:Field field="ShippingAddress1"/><br>
+				</inp2:m_if>
+
+				<inp2:m_if check="FieldEquals" field="ShippingAddress2" value="" inverse="inverse">
+					<inp2:Field field="ShippingAddress2"/><br>
+				</inp2:m_if>
+				<inp2:PrintLocation type="Shipping"/>
+			</td>
+		</tr>
+
+		<inp2:m_if check="Field" name="ShippingTracking">
+		<tr class="order-padding-left">
+			<td><strong><inp2:m_Phrase label="lu_comm_ShippingTracking"/></strong>:</td>
+			<td><inp2:Field field="ShippingTracking"/></td>
+		</tr>
+		</inp2:m_if>
+
+	</table>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="order_form_billing">
+	<!-- billing -->
+	<table width="100%" cellpadding="0" cellspacing="0">
+		<tr>
+			<td colspan="2">
+				<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="1" alt="" /></div>
+			</td>
+		</tr>
+		<tr class="sub-section-header">
+			<td colspan="2"><inp2:m_Phrase label="lu_section_BillingInfo"/></td>
+		</tr>
+		<tr>
+			<td colspan="2">
+				<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="1" alt="" /></div>
+			</td>
+		</tr>
+		<tr class="order-padding-left">
+			<td width="150"><strong><inp2:m_Phrase label="lu_Name"/></strong>:</td>
+			<td><inp2:Field field="BillingTo"/></td>
+		</tr>
+		<inp2:m_if check="Field" name="BillingCompany">
+		<tr class="order-padding-left">
+			<td><strong><inp2:m_Phrase label="lu_comm_Company"/></strong>:</td>
+			<td><inp2:Field field="BillingCompany"/></td>
+		</tr>
+		</inp2:m_if>
+		<inp2:m_if check="Field" name="BillingEmail">
+		<tr class="order-padding-left">
+			<td><strong><inp2:m_Phrase label="lu_comm_EmailAddress"/></strong>:</td>
+			<td><inp2:Field field="BillingEmail"/></td>
+		</tr>
+		</inp2:m_if>
+		<tr class="order-padding-left">
+			<td><strong><inp2:m_Phrase label="lu_comm_PhoneNumber"/></strong>:</td>
+			<td><inp2:Field field="BillingPhone"/></td>
+		</tr>
+		<tr class="order-padding-left">
+			<td><strong><inp2:m_Phrase label="lu_comm_FaxNumber"/></strong>:</td>
+			<td><inp2:Field field="BillingFax"/></td>
+		</tr>
+		<tr class="order-padding-left">
+			<td><strong><inp2:m_Phrase label="lu_comm_Address"/></strong>:</td>
+			<td>
+				<inp2:m_if check="FieldEquals" field="BillingAddress1" value="" inverse="inverse">
+					<inp2:Field field="BillingAddress1"/><br>
+				</inp2:m_if>
+
+				<inp2:m_if check="FieldEquals" field="BillingAddress2" value="" inverse="inverse">
+					<inp2:Field field="BillingAddress2"/><br>
+				</inp2:m_if>
+				<inp2:PrintLocation type="Billing"/>
+			</td>
+		</tr>
+
+		<tr class="order-padding-left">
+			<td><strong><inp2:m_Phrase label="lu_comm_PaymentType"/>:</strong></td>
+			<td><inp2:Field name="PaymentType" /></td>
+		</tr>
+
+		<inp2:m_if check="UsingCreditCard">
+			<tr class="order-padding-left">
+				<td><strong><inp2:m_Phrase label="lu_comm_NameOnCard"/>:</strong></td>
+				<td><inp2:Field name="PaymentNameOnCard"/></td>
+			</tr>
+			<tr class="order-padding-left">
+				<td><strong><inp2:m_Phrase label="lu_comm_CardType"/>:</strong></td>
+				<td><inp2:Field name="PaymentCardType" /></td>
+			</tr>
+			<tr class="order-padding-left">
+				<td><strong><inp2:m_Phrase label="lu_comm_CardNumber"/>:</strong></td>
+				<td><inp2:Field name="PaymentAccount" masked="masked"/></td>
+			</tr>
+			<tr class="order-padding-left">
+				<td><strong><inp2:m_Phrase label="lu_comm_Exp"/>:</strong></td>
+				<td><inp2:Field name="PaymentCCExpDate"/></td>
+			</tr>
+		</inp2:m_if>
+	</table>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="order_form">
+	<table>
+		<tr>
+			<td>
+				<strong><inp2:m_Phrase label="lu_comm_OrderNumber"/><inp2:Field field="OrderNumber"/>&nbsp;&nbsp;(<inp2:Field field="Status"/>)</strong>
+			</td>
+		</tr>
+	</table>
+
+	<inp2:m_if check="FieldEquals" field="IsRecurringBilling" value="1">
+		<table>
+			<tr>
+				<td valign="top" align="left">
+					<strong><inp2:m_Phrase label="lu_recurring_notice"/></strong> <inp2:m_Phrase label="lu_recurring_next_charge"/> <inp2:Field name="NextCharge" format="_regional_DateFormat"/> <inp2:m_Phrase label="lu_or"/> <inp2:m_GetConfig var="Comm_RecurringChargeInverval"/> <inp2:m_Phrase label="lu_recurring_charge_advance"/><br>
+					<a href="<inp2:m_link template="in-commerce/my_account/cancel_recurring" pass="ord"/>"><inp2:m_Phrase label="lu_recurring_cancel"/></a>
+				</td>
+			</tr>
+		</table>
+	</inp2:m_if>
+
+	<br />
+
+
+	<inp2:m_if check="OrderHasTangibleItems">
+		<table class="fullwidth">
+			<tr>
+				<td valign="top" width="49%">
+					<inp2:m_RenderElement name="order_form_shipping" PrefixSpecial="ord"/>
+				</td>
+				<td>&nbsp;</td>
+				<td valign="top" width="49%">
+					<inp2:m_RenderElement name="order_form_billing" PrefixSpecial="ord"/>
+				</td>
+			</tr>
+		</table>
+	<inp2:m_else />
+		<table class="fullwidth">
+			<tr>
+				<td>
+					<inp2:m_RenderElement name="order_form_billing" PrefixSpecial="ord"/>
+				</td>
+			</tr>
+		</table>
+	</inp2:m_if>
+
+
+
+	<br /><br />
+
+
+
+	<table class="fullwidth">
+		<tr>
+			<td colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">5<inp2:m_else/>4</inp2:m_if>">
+				<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="1" alt="" /></div>
+			</td>
+		</tr>
+		<tr class="sub-section-header">
+			<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">
+				<td colspan="2"><inp2:m_Phrase label="lu_comm_ProductDescription"/></td>
+			<inp2:m_else/>
+				<td><inp2:m_Phrase label="lu_comm_ProductDescription"/></td>
+			</inp2:m_if>
+
+			<td><inp2:m_Phrase label="lu_comm_Price"/></td>
+
+			<td><inp2:m_Phrase label="lu_comm_Qty"/>.</td>
+			<td><inp2:m_Phrase label="lu_comm_Total"/></td>
+		</tr>
+		<tr>
+			<td colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">5<inp2:m_else/>4</inp2:m_if>">
+				<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="1" alt="" /></div>
+			</td>
+		</tr>
+
+		<inp2:ord_ListOrderItems render_as="orderitem_elem"/>
+
+		<tr class="order-padding-left">
+			<tr>
+				<td colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">5<inp2:m_else/>4</inp2:m_if>">
+					<br />
+					<div class="horizontal-separator"><img src="<inp2:m_TemplatesBase module="In-Portal"/>img/s.gif" width="1" height="1" alt="" /></div>
+				</td>
+			</tr>
+			<td>
+				<inp2:m_if check="ord_HasDiscount">
+					<inp2:m_Phrase label="lu_comm_TotalSavings" />: <span><inp2:ord_Field name="DiscountTotal" currency="selected" /></span><br />
+				</inp2:m_if>&nbsp;
+			</td>
+			<td colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">5<inp2:m_else/>4</inp2:m_if>" align="right">
+				<div class="subtotal"><inp2:m_Phrase label="lu_comm_SubTotal"/>: <inp2:Field field="SubTotal" currency="selected"/><div>
+			</td>
+		</tr>
+	</table>
+
+
+	<br /><br />
+
+	<inp2:m_RenderElement name="subsection" title="lu_section_OrderTotal"/>
+
+	<table class="fullwidth">
+		<inp2:ord_PrintTotals
+			shipping_render_as="shipping_total"
+			processing_render_as="processing_total"
+			sub_total_render_as="sub_total"
+			vat_render_as="vat_total"
+			return_render_as="return_total"/>
+
+		<inp2:m_if check="ord_Field" name="GiftCertificateId">
+			<tr class="order-padding-left">
+				<td align="right"><inp2:m_Phrase label="lu_comm_Gift_Certificate"/>:</td>
+				<td align="right"><inp2:ord_Field name="GiftCertificateDiscount" currency="selected"/></td>
+			</tr>
+		</inp2:m_if>
+
+		<tr class="order-padding-left grand-total-blue">
+		    <td align="right"><inp2:m_Phrase label="lu_comm_GrandTotal"/>:</td>
+			<td align="right"><inp2:Field name="TotalAmount" currency="selected"/></td>
+		</tr>
+	</table>
+
+	<br />
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="shipping_total">
+	<tr class="order-padding-left">
+		<td align="right"><inp2:m_Phrase label="lu_comm_ShippingCost"/> (<inp2:ord_ShippingType />):</td>
+		<td align="right"><inp2:ord_Field name="ShippingCost" currency="selected"/></td>
+	</tr>
+	<tr class="order-padding-left">
+		<td align="right"><inp2:m_Phrase label="lu_comm_Insurance_Fee"/>:</td>
+		<td align="right"><inp2:ord_Field name="InsuranceFee" currency="selected"/></td>
+	</tr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="processing_total">
+	<tr class="order-padding-left">
+		<td align="right"><inp2:m_Phrase label="lu_comm_ProcessingFee"/>: </td>
+		<td align="right"><inp2:ord_Field name="ProcessingFee" currency="selected"/></td>
+	</tr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="sub_total">
+	<tr class="order-padding-left">
+		<td align="right"><inp2:m_Phrase label="lu_comm_SubTotal"/>: </td>
+		<td align="right"><inp2:ord_Field name="AmountWithoutVAT" currency="selected"/></td>
+	</tr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="vat_total">
+	<tr class="order-padding-left">
+		<td align="right"><inp2:m_Phrase label="lu_comm_VAT"/> <inp2:ord_Field name="VATPercent"/>%: </td>
+		<td align="right"><inp2:ord_Field name="VAT" currency="selected"/></td>
+	</tr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="return_total">
+	<tr class="order-padding-left">
+		<td align="right"><inp2:m_Phrase label="lu_fld_ReturnTotal"/> : </td>
+		<td align="right"><inp2:ord_Field name="ReturnTotal" currency="selected"/></td>
+	</tr>
+</inp2:m_DefineElement>
+<!--## /ORDER DETAILS ELEMENTS ##-->
+
+<!--## SHOW ORDER DETAILS TAG! ##-->
+<inp2:ord_ShowOrder render_as="order_form" />
+<!--## /SHOW ORDER DETAILS TAG! ##-->
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/order_details.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/elements/registration_fields.elm.tpl
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/elements/registration_fields.elm.tpl	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/elements/registration_fields.elm.tpl	(revision 12131)
@@ -0,0 +1,40 @@
+	<!--## AFFILIATE REGISTRATION CHECKBOX ##-->
+	<inp2:m_if check="m_ConfigEquals" option="Comm_RegisterAsAffiliate" value="1">
+
+		<inp2:m_RenderElement name="inp_edit_field_separator" is_last="0"/>
+
+		<tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+			<inp2:m_inc param="tab_index" by="1"/>
+			<td class="field-name">
+				<label for="RegisterAsAffiliate">
+					<inp2:m_phrase label="lu_fld_RegisterAsAffiliate"/>:
+				</label>
+			</td>
+			<td class="field-value">
+				<input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="RegisterAsAffiliate" name="RegisterAsAffiliate" onchange="toggle_affiliate()" <inp2:m_if check="m_GetEquals" name="RegisterAsAffiliate" value="on">checked</inp2:m_if>/>
+				<input class="hidden-element" type="submit" id="events[u][OnRefreshForm]" name="events[u][OnRefreshForm]" />
+			</td>
+		</tr>
+
+		<inp2:m_if check="m_GetEquals" name="RegisterAsAffiliate" value="on">
+			<inp2:m_RenderElement name="inp_edit_field_separator" is_last="0"/>
+		</inp2:m_if>
+
+	</inp2:m_if>
+	<!--## /AFFILIATE REGISTRATION CHECKBOX ##-->
+
+	<inp2:m_if check="m_GetEquals" name="RegisterAsAffiliate" value="on">
+		<inp2:m_include template="in-commerce/elements/forms.elm"/>
+
+		<inp2:m_RenderElement name="inp_affiliate_box" field="SSN" title="lu_fld_SSNField" required="1"/>
+		<inp2:m_RenderElement name="inp_affiliate_payment_types" field="PaymentTypeId" title="lu_fld_AffiliatePaymentType"/>
+		<inp2:m_RenderElement name="inp_affiliate_textarea" field="Comments" title="lu_fld_AffiliateComments" cols="35" rows="5"/>
+
+		<inp2:m_RenderElement name="inp_affiliate_terms_checkbox"/>
+	</inp2:m_if>
+
+<script type="text/javascript">
+	function toggle_affiliate() {
+		document.getElementById('events[u][OnRefreshForm]').click();
+	}
+</script>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/elements/registration_fields.elm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/module_info.xml
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/module_info.xml	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/module_info.xml	(revision 12131)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<module_info>
+	<section_design_template>in-commerce/designs/section</section_design_template>
+	<item_design_template>in-commerce/designs/detail</item_design_template>
+</module_info>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/module_info.xml
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.2
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/inc/styles.css
===================================================================
--- branches/5.1.x/themes/default2009/in-commerce/inc/styles.css	(nonexistent)
+++ branches/5.1.x/themes/default2009/in-commerce/inc/styles.css	(revision 12131)
@@ -0,0 +1,125 @@
+.shopping-cart-cell-item-padding
+	{
+	padding:5px 8px;
+	vertical-align:middle;
+	}
+
+.shopping-cart-icpn-padding-right
+	{
+	padding-right:10px;
+	width:16px;
+	vertical-align:top;
+	}
+
+.cart-subtotal
+	{
+	background:#f4f4f4;
+	padding:5px 10px;
+	}
+
+.cart-item td {
+	color: #000000;
+	padding:10px;
+	border-bottom: 1px solid #989898;
+}
+
+.cart-item-small td {
+	color: #000000;
+	padding: 2px 10px 2px 10px;
+	border-bottom: 1px solid #989898;
+}	
+	
+.cart-subtotal-text
+	{
+	font-weight:bold;
+	font-size:12px;
+	}
+
+.shopping-cart-button-padding
+	{
+	padding:10px;
+	}
+
+.order-prewiew-padding-cell TD
+	{
+	padding:3px 13px;
+	}
+
+.order-padding-left TD
+	{
+	padding:6px 6px 0px 7px;
+	}
+
+.subtotal
+	{
+	font-size:13px;
+	font-weight:bold;
+	color:#0073B0
+	}
+
+.grand-total-blue TD
+	{
+	font-size:15px;
+	font-weight:bold;
+	color:#0073B0
+	}
+
+.credit-card-table td {
+	padding: 2px;
+}
+
+/* --- Category Sidebox Styles --- */
+.top-category-padding {
+	padding: 5px 2px 0px 0px;
+	vertical-align: top;
+}
+
+a.top-category {
+	font-size: 12px;
+	color: #13547C;
+}
+
+a.top-category:hover {
+	color: #000000;
+}
+
+.sub-category-padding {
+	padding: 5px 2px 0px 10px;
+	vertical-align: top;
+}
+
+a.sub-category {
+	color: #13547C;
+}
+
+a.sub-category:hover {
+	color: #000000;
+}
+
+/* --- Product Pricing Styles --- */
+.product-price {
+	color: #CC0000;
+	font-weight: bold;
+}
+
+.product-price-large {
+	color: #CC0000;
+	font-size: 13px;
+	font-weight: bold;
+}
+
+.product-price-msrp {
+	text-decoration: line-through;
+}
+
+/* --- Order Preview & Checkout Process Styles --- */
+.order-grand-total td, .order-sub-total td {
+	color: #CC0000;
+	font-size: 13px;
+	font-weight: bold;
+}
+
+.order-totals td {
+	padding: 5px;
+	vertical-align: top;
+}
\ No newline at end of file

Property changes on: branches/5.1.x/themes/default2009/in-commerce/inc/styles.css
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/img/shopping_cart_item.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/default2009/in-commerce/img/shopping_cart_item.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/img/buy.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/default2009/in-commerce/img/buy.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/img/ic_myaffiliate46.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/default2009/in-commerce/img/ic_myaffiliate46.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/img/buy2.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/default2009/in-commerce/img/buy2.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/img/credit_cards/visa.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/default2009/in-commerce/img/credit_cards/visa.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/img/credit_cards/master_card.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/default2009/in-commerce/img/credit_cards/master_card.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/img/credit_cards/american_express.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/default2009/in-commerce/img/credit_cards/american_express.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/img/credit_cards/novus.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/default2009/in-commerce/img/credit_cards/novus.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/img/menu_shopping_cart.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/default2009/in-commerce/img/menu_shopping_cart.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/img/zoom.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/default2009/in-commerce/img/zoom.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/img/ic_mydownloads46.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/default2009/in-commerce/img/ic_mydownloads46.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/img/menu_products.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/default2009/in-commerce/img/menu_products.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/default2009/in-commerce/img/ic_myorders46.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/default2009/in-commerce/img/ic_myorders46.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/checkout/shipping.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/checkout/shipping.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/checkout/shipping.tpl	(revision 12131)
@@ -0,0 +1,56 @@
+<inp2:m_RequireLogin condition="Comm_RequireLoginBeforeCheckout" login_template="platform/login/login_register"/>
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" />
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_cart_Checkout"/> :: <inp2:m_Phrase label="lu_comm_ShippingInfo"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center">
+			<script type="text/javascript">
+				function catchFormEnter(e, id)
+				{
+					if (typeof(e) == 'undefined')	e = window.event;
+					if (!e) return;
+
+				 	if (e.keyCode == 13) { //enter
+				 		if (typeof(document.all) == 'undefined') e.preventDefault();
+				 		e.cancelBubble = true;
+						e.returnValue = false;
+
+				 		document.getElementById(id).focus();
+				 		document.getElementById(id).click();
+						return false;
+				 	}
+				}
+			</script>
+			<form method="post" onkeypress="catchFormEnter(event, 'events[ord][OnUpdate]')" action="<inp2:m_FormAction />">
+				<inp2:m_include template="in-commerce/blocks/checkout/shipping_address"/>
+
+				<inp2:m_include template="in-commerce/blocks/checkout/shipping_options"/>
+			</form>
+		</td>
+		<td class="main-column-right">
+
+			<inp2:m_include template="in-commerce/blocks/checkout/checkout_steps"/>
+
+			<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1"/>
+
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/checkout/shipping.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/checkout/login_register.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/checkout/login_register.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/checkout/login_register.tpl	(revision 12131)
@@ -0,0 +1,38 @@
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" />
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="LU_COMM_REGISTRATION"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center">
+			<form method="post" action="<inp2:m_FormAction />">
+
+				<inp2:m_include template="in-commerce/blocks/checkout/thank_you"/>
+
+				<inp2:m_include template="in-commerce/blocks/checkout/form_register"/>
+
+			</form>
+		</td>
+		<td class="main-column-right">
+
+			<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1"/>
+
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/checkout/login_register.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/checkout/billing.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/checkout/billing.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/checkout/billing.tpl	(revision 12131)
@@ -0,0 +1,57 @@
+<inp2:m_RequireLogin condition="Comm_RequireLoginBeforeCheckout" login_template="platform/login/login_register"/>
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" />
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_cart_Checkout"/> :: <inp2:m_Phrase label="lu_comm_BillingInfo"/> </title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table width="100%" border="0" cellspacing="0" cellpadding="0">
+	<tr>
+		<td class="main-column-center">
+			<script type="text/javascript">
+				function catchFormEnter(e, id)
+				{
+					if (typeof(e) == 'undefined')	e = window.event;
+					if (!e) return;
+
+				 	if (e.keyCode == 13) { //enter
+				 		if (typeof(document.all) == 'undefined') e.preventDefault();
+				 		e.cancelBubble = true;
+						e.returnValue = false;
+
+				 		document.getElementById(id).focus();
+				 		document.getElementById(id).click();
+						return false;
+				 	}
+				}
+			</script>
+
+			<form id="billing_info" method="post" onkeypress="catchFormEnter(event, 'events[ord][OnUpdate]')" action="<inp2:m_FormAction />">
+				<inp2:m_include template="in-commerce/blocks/checkout/billing_address"/>
+
+				<inp2:m_include template="in-commerce/blocks/checkout/billing_options"/>
+			</form>
+		</td>
+		<td class="main-column-right">
+
+			<inp2:m_include template="in-commerce/blocks/checkout/checkout_steps"/>
+
+			<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1"/>
+
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/checkout/billing.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/checkout/preview.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/checkout/preview.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/checkout/preview.tpl	(revision 12131)
@@ -0,0 +1,36 @@
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" />
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_cart_Checkout"/> :: <inp2:m_Phrase label="lu_comm_OrderPreview"/> </title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table width="100%" border="0" cellspacing="0" cellpadding="0">
+	<tr>
+		<td class="main-column-center">
+
+			<inp2:m_include template="in-commerce/blocks/checkout/order_preview"/>
+
+		</td>
+		<td class="main-column-right">
+
+			<inp2:m_include template="in-commerce/blocks/checkout/checkout_steps"/>
+
+			<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1"/>
+
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/checkout/preview.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/checkout/checkout_success.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/checkout/checkout_success.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/checkout/checkout_success.tpl	(revision 12131)
@@ -0,0 +1,36 @@
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" />
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_cart_Checkout"/> :: <inp2:m_Phrase label="lu_comm_OrderCompleted"/> </title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center">
+
+			<inp2:m_include template="in-commerce/blocks/checkout/thank_you"/>
+
+			<inp2:m_include template="in-commerce/blocks/checkout/form_register"/>
+
+		</td>
+		<td class="main-column-right">
+
+			<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1"/>
+
+		</td>
+  </tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/checkout/checkout_success.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/checkout/discount_info.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/checkout/discount_info.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/checkout/discount_info.tpl	(revision 12131)
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:m_Phrase label="lu_comm_DiscountInfo" /></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body> 
+
+<div style="padding: 10px;">
+<p>
+<inp2:m_if check="ord_ItemFieldEquals" field="DiscountType" value="discount">
+	<inp2:m_Phrase label="lu_comm_ItemIsEligibleForDiscount" />:
+<inp2:m_else />
+	<inp2:m_Phrase label="lu_comm_CouponHasBeenApplied" />:
+</inp2:m_if>
+<br />
+<span class="price1"><inp2:ord_DiscountField name="Name" /></span>
+</p>
+</div>
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/checkout/discount_info.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/checkout/shop_cart.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/checkout/shop_cart.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/checkout/shop_cart.tpl	(revision 12131)
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_comm_YourCart"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table width="100%" border="0" cellspacing="0" cellpadding="0">
+	<tr>
+		<td class="main-column-center">
+	
+			<inp2:m_include template="in-commerce/blocks/checkout/shop_cart"/>	
+	
+		</td>
+		<td class="main-column-right">
+	
+			<inp2:m_include template="in-commerce/blocks/checkout/checkout_steps"/>
+	
+			<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1"/>
+			
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/checkout/shop_cart.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/checkout/cvv2help.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/checkout/cvv2help.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/checkout/cvv2help.tpl	(revision 12131)
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body> 
+
+<div style="padding: 10px;">
+<p>
+<inp2:m_Phrase label="lu_cvv2_help" />
+</p>
+</div>
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/checkout/cvv2help.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/shipping_options.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/shipping_options.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/shipping_options.tpl	(revision 12131)
@@ -0,0 +1,204 @@
+<inp2:m_DefineElement name="order_shipping_type">
+	<option <inp2:m_param name="selected"/> value="<inp2:m_param name="ShippingId"/>"><inp2:m_param name="ShippingName"/> (<inp2:m_param name="TotalCost"/>)
+</inp2:m_DefineElement>
+
+<table class="block-no-border">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_comm_ShippingOptions"/></td>
+	</tr>
+	<tr>
+		<td class="block-data">
+
+				<inp2:m_DefineElement name="shippings_table_header">
+					<table>
+						<tr class="cart-header">
+							<td><inp2:m_Phrase label="lu_ship_Shipment" /></td>
+							<td><inp2:m_Phrase label="lu_ship_ItemsNumber" /></td>
+							<td><inp2:m_Phrase label="lu_ship_ShippingWeight" /></td>
+							<td><inp2:m_Phrase label="lu_ship_ShippingType" /></td>
+						</tr>
+
+						<inp2:m_if check="ord_CartHasBackorders">
+							<strong><inp2:m_Phrase label="lu_comm_Note"/>:</strong>
+							<inp2:m_Phrase label="lu_comm_YouHaveBackorderedItems"/>
+
+							<br />
+							<inp2:m_DefineElement name="order_option">
+								<input onclick="document.getElementById('events[ord][OnUpdate]').click();" type="radio"
+									<inp2:m_param name="checked"/>
+									name="<inp2:m_param name="field_name"/>"
+									id="<inp2:m_param name="field_name"/>_<inp2:m_param name="key"/>" value="<inp2:m_param name="key"/>">
+									<label for="<inp2:m_param name="field_name"/>_<inp2:m_param name="key"/>">
+										<inp2:m_phrase label="$option"/>
+									</label>&nbsp;<br />
+							</inp2:m_DefineElement>
+							<inp2:ord_PredefinedOptions field="ShippingOption" render_as="order_option" selected_param="checked" selected="checked=\"checked\""/>
+							<br />
+						</inp2:m_if>
+
+						<inp2:m_if check="m_GetEquals" var="shipping_limitations_apply" value="0"><inp2:m_else/>
+							<strong><inp2:m_Phrase label="lu_comm_Note"/>:</strong>
+							<inp2:m_if check="m_GetEquals" var="shipping_limitations_apply" value="1">
+								<inp2:m_Phrase label="lu_comm_ShippingTypesLimitationApply"/><br/>
+								<input type="hidden" name="<inp2:ord_InputName field="ShippingGroupOption"/>" id="<inp2:ord_InputName field="ShippingGroupOption"/>" value="<inp2:ord_Field name="ShippingGroupOption" db="1"/>" />
+								<input onclick="document.getElementById('<inp2:ord_InputName field="ShippingGroupOption"/>').value = this.checked ? 1:0; document.getElementById('events[ord][OnUpdate]').click();" type="checkbox"
+										<inp2:m_param name="checked"/>
+										name="cb_<inp2:ord_InputName field="ShippingGroupOption"/>"
+										id="cb_<inp2:ord_InputName field="ShippingGroupOption"/>" value="1" <inp2:ord_Field name="ShippingGroupOption" db="1" checked="checked"/> />
+										<label for="cb_<inp2:ord_InputName field="ShippingGroupOption"/>">
+											<inp2:m_phrase label="lu_AdjustShippingManually"/>
+										</label>&nbsp;<br />
+							<inp2:m_else/> <!-- Order canNOT be shipped with single shipping type -->
+								<inp2:m_Phrase label="lu_comm_ShippingTypesLimitationApply_CantSingleShip"/><br/>
+								<input type="hidden" name="<inp2:ord_InputName field="ShippingGroupOption"/>" value="1" />
+							</inp2:m_if>
+						</inp2:m_if>
+				</inp2:m_DefineElement>
+
+				<inp2:m_DefineElement name="shippings_table_footer">
+						<tr class="cart-item">
+							<td>
+								<input class="button" type="submit" name="events[ord][OnUpdate]" value="<inp2:m_Phrase label="lu_comm_UpdateShipping"/>"/><br/>
+							</td>
+							<td>&nbsp;</td>
+							<td style="text-align: right">
+								<strong><inp2:m_Phrase label="lu_comm_ShippingTotal" />:</strong>
+							</td>
+							<td>
+								<inp2:ord_Field name="ShippingCost" currency="selected"/>
+							</td>
+						</tr>
+
+						<inp2:m_DefineElement name="products_total">
+							<tr class="cart-subtotal">
+								<td>&nbsp;</td>
+								<td>&nbsp;</td>
+								<td style="text-align: right">
+									<strong><inp2:m_Phrase label="lu_comm_ProductsTotal"/>:</strong>
+								</td>
+								<td>
+									<inp2:ord_Field name="SubTotal" currency="selected"/>
+								</td>
+							</tr>
+						</inp2:m_DefineElement>
+
+						<inp2:m_DefineElement name="processing_total">
+							<tr class="cart-subtotal">
+								<td>&nbsp;</td>
+								<td>&nbsp;</td>
+								<td style="text-align: right">
+									<strong><inp2:m_Phrase label="lu_comm_ProcessingFee"/>:</strong>
+								</td>
+								<td>
+									<inp2:ord_Field name="ProcessingFee" currency="selected"/>
+								</td>
+							</tr>
+						</inp2:m_DefineElement>
+
+						<inp2:m_DefineElement name="sub_total">
+							<tr class="cart-subtotal">
+								<td>&nbsp;</td>
+								<td>&nbsp;</td>
+								<td style="text-align: right">
+									<strong><inp2:m_Phrase label="lu_comm_SubTotal"/>:</strong>
+								</td>
+								<td>
+									<span class="price1"><inp2:ord_Field name="AmountWithoutVAT" currency="selected"/></span>
+								</td>
+							</tr>
+						</inp2:m_DefineElement>
+
+						<inp2:m_DefineElement name="vat_total">
+							<tr class="cart-subtotal">
+								<td>&nbsp;</td>
+								<td>&nbsp;</td>
+								<td style="text-align: right">
+									<strong><inp2:m_Phrase label="lu_comm_VAT"/> <inp2:ord_Field name="VATPercent"/>%:</strong>
+								</td>
+								<td>
+									<span class="price1"><inp2:ord_Field name="VAT" currency="selected"/></span>
+								</td>
+							</tr>
+						</inp2:m_DefineElement>
+
+						<inp2:ord_PrintTotals
+							products_render_as="products_total"
+							processing_render_as="processing_total"
+							sub_total_render_as="sub_total"
+							vat_render_as="vat_total"/>
+
+						<tr class="cart-subtotal">
+							<td>&nbsp;</td>
+							<td>&nbsp;</td>
+							<td style="text-align: right">
+								<strong><inp2:m_Phrase label="lu_comm_GrandTotal"/>:</strong>
+							</td>
+							<td>
+								<span class="price1"><inp2:ord_Field name="TotalAmount" currency="selected"/></span>
+							</td>
+						</tr>
+					</table>
+
+					<table>
+						<tr>
+							<td style="text-align: right">
+								<input type="hidden" name="next_step_template" value="in-commerce/checkout/billing">
+								<input type="submit" name="events[ord][OnProceedToBilling]" value="<inp2:m_Phrase label="lu_comm_ProceedToBilling"/>" class="button">
+							</td>
+						</tr>
+					</table>
+				</inp2:m_DefineElement>
+
+				<inp2:m_include template="in-commerce/blocks/checkout/options"/>
+
+				<inp2:m_DefineElement name="shipping_group_item">
+					<li><inp2:Field name="Name"/><inp2:m_if check="ord_BackorderFlag"> <span class="error"><inp2:m_phrase label="lu_cart_BackorderFlag" /></span></inp2:m_if>
+					<inp2:m_if check="HasOptions">
+						<br/>
+						<span style="font-size: 8pt">
+						<inp2:m_if check="DisplayOptionsPricing"> <!-- selectable options or overriding combination -->
+							<inp2:PrintOptions render_as="option_element" currency="selected"/>
+						<inp2:m_else/> <!-- listed combinations -->
+							<inp2:PrintOptions render_as="option_element_no_price"/>
+						</inp2:m_if>
+						<inp2:m_if check="FieldEquals" field="OptionsSelectionMode" value="0"> <!-- selectable options -->
+							<a href="<inp2:m_link template="__default__" pass="m,p,orditems"/>"><inp2:m_Phrase label="lu_comm_edit_options"/></a><br />
+						</inp2:m_if>
+						</span>
+					</inp2:m_if>
+					</li>
+				</inp2:m_DefineElement>
+
+				<inp2:m_DefineElement name="order_shipment">
+					<tr class="cart-item">
+						<td><inp2:m_param name="shipment"/><br/>
+							<b><inp2:m_Phrase label="lu_Items"/>:</b><br/>
+							<ul>
+								<inp2:ord_PrintCart item_render_as="shipping_group_item" requery="1" package_num="$package_num" product_type="1" header_render_as="html:" footer_render_as="html:"/>
+							</ul>
+						</td>
+						<td><inp2:m_param name="items"/></td>
+						<td><inp2:m_param name="weight"/></td>
+						<td>
+							<select name="<inp2:m_param name="field_name"/>">
+								<inp2:ord_PrintShippingTypes render_as="order_shipping_type" currency="selected" />
+							</select>
+						</td>
+					</tr>
+				</inp2:m_DefineElement>
+
+				<inp2:m_DefineElement name="no_shipments">
+					<div class="error"><inp2:m_Recall name="usps_errors" /></div>
+					<inp2:m_Phrase label="lu_comm_ErrorNoShippingTypes"/> (<a href="mailto:<inp2:conf_ConfigValue name="Comm_Contacts_Email"/>"><inp2:conf_ConfigValue name="Comm_Contacts_Email"/></a>).
+				</inp2:m_DefineElement>
+
+				<inp2:m_DefineElement name="invalid_address">
+					<inp2:m_Phrase label="lu_comm_ErrorInvalidShippingAddress"/>.
+				</inp2:m_DefineElement>
+
+				<inp2:ord_PrintShippings render_as="order_shipment" currency="selected" no_shipments_render_as="no_shipments" invalid_address_render_as="invalid_address" table_header_render_as="shippings_table_header" table_footer_render_as="shippings_table_footer" />
+
+				<br />
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/shipping_options.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/shop_cart.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/shop_cart.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/shop_cart.tpl	(revision 12131)
@@ -0,0 +1,199 @@
+<table border="0" cellspacing="0" cellpadding="0" class="block-no-border">
+	<tr>
+    	<td class="block-header"><inp2:m_Phrase label="lu_comm_YourCart"/></td>
+	</tr>
+	<tr>
+		<td class="block-data">
+  			<form method="post" action="<inp2:m_FormAction />">
+
+  				<inp2:m_if check="ord_CartHasError">
+					<table class="warning">
+						<tr>
+							<td valign="top" align="left" class="block-data">
+								<img src="img/message.gif" alt="" width="19" height="19" />
+								<span class="warning-text"><inp2:m_Phrase label="lu_Warning"/></span><br />
+								<inp2:ord_CheckoutError state_changed="lu_comm_msg_state_changed" qty_unavailable="lu_comm_msg_qty_unavailable" outofstock="lu_comm_msg_outofstock"
+														coupon_applied="lu_comm_CouponApplied"
+														invalid_code="lu_comm_invalid_code" code_expired="lu_comm_code_expired"
+														min_qty="lu_min_qty_error" code_removed="lu_comm_CouponRemoved"
+														code_removed_automatically="lu_comm_CouponIsNotEffective"
+														changed_after_login="lu_comm_CartChangedAfterLogin" />
+							</td>
+						</tr>
+					</table>
+				</inp2:m_if>
+
+				<table>
+
+					<inp2:m_DefineElement name="shop_cart_header">
+						<tr class="cart-header">
+							<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">
+								<td colspan="2"><inp2:m_Phrase label="lu_comm_ProductDescription"/></td>
+							<inp2:m_else/>
+								<td><inp2:m_Phrase label="lu_comm_ProductDescription"/></td>
+							</inp2:m_if>
+
+							<td><inp2:m_Phrase label="lu_comm_YourPrice"/></td>
+							<td><inp2:m_Phrase label="lu_comm_Qty"/>.</td>
+							<td><inp2:m_Phrase label="lu_comm_Total"/></td>
+							<td>&nbsp;</td>
+						</tr>
+					</inp2:m_DefineElement>
+
+					<inp2:m_include template="in-commerce/blocks/checkout/options"/>
+
+					<inp2:m_DefineElement name="product_image">
+						<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" /><br/>
+					</inp2:m_DefineElement>
+
+					<inp2:m_DefineElement name="shop_cart_item">
+						<tr class="cart-item">
+							<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">
+								<td width="120">
+									<inp2:p_Image render_as="product_image" thumbnail="1" DefaultImage="in-commerce/img/no_picture_list.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120" />
+								</td>
+							</inp2:m_if>
+
+							<td>
+								<a href="<inp2:ProductLink template="__default__"/>"><inp2:Field name="Name" /></a> <inp2:m_if check="ord_BackorderFlag"> <span class="error"><inp2:m_phrase label="lu_cart_BackorderFlag" /></span></inp2:m_if>
+								<inp2:m_if check="HasOptions">
+									<br/>
+									<span style="font-size: 8pt">
+									<inp2:m_if check="DisplayOptionsPricing"> <!-- selectable options or overriding combination -->
+										<inp2:PrintOptions render_as="option_element" currency="selected"/>
+									<inp2:m_else/> <!-- listed combinations -->
+										<inp2:PrintOptions render_as="option_element_no_price" currency="selected"/>
+									</inp2:m_if>
+									<inp2:m_if check="FieldEquals" field="OptionsSelectionMode" value="0"> <!-- selectable options -->
+										<a href="<inp2:m_link template="__default__" pass="m,p,orditems"/>"><inp2:m_Phrase label="lu_comm_edit_options"/></a>
+									</inp2:m_if>
+									</span>
+								</inp2:m_if>
+								<inp2:m_if check="p_CustomField" name="Availability">
+									<br />
+									<inp2:p_CustomField name="Availability"/>
+								</inp2:m_if>
+								<inp2:m_if check="HasDiscount">
+									<br />
+									<inp2:m_Phrase label="lu_comm_RegularPrice" />: <inp2:Field name="FlatPrice" currency="selected"/><br />
+									<inp2:m_Phrase label="lu_comm_Discount" />: <span class="price1"><inp2:Field name="ItemDiscount" currency="selected" negative="1" /></span>
+									<a href="javascript:showDiscountInfo('<inp2:ord_DiscountHelpLink template="in-commerce/checkout/discount_info" />')">[?]</a>
+								</inp2:m_if>
+							</td>
+							<td><strong><inp2:Field name="Price" currency="selected"/></strong></td>
+							<td>
+									<inp2:m_if check="IsTangible" >
+										<input value="<inp2:Field field="Quantity"/>" size="5" name="<inp2:InputName field="Quantity"/>" />
+										<!--<inp2:m_if check="ProductsInStock">
+											<inp2:m_Phrase name="lu_of"/> <inp2:ProductsInStock/>
+										</inp2:m_if>-->
+									<inp2:m_else />
+										1
+								</inp2:m_if>
+							</td>
+							<td><strong><inp2:Field name="ExtendedPrice" currency="selected"/></strong></td>
+							<td><a href="<inp2:LinkRemoveFromCart/>"><img src="in-commerce/img/delete.gif" title="Delete" alt="Delete" width="15" height="14" border="0" /></a></td>
+						</tr>
+					</inp2:m_DefineElement>
+
+					<inp2:m_DefineElement name="shop_cart_footer">
+
+						<tr class="cart-subtotal">
+							<td colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>">
+								<inp2:m_if check="ord_HasDiscount">
+									<inp2:m_Phrase label="lu_comm_TotalSavings" />: <span class="price1"><inp2:ord_Field name="DiscountTotal" currency="selected" /></span><br />
+								</inp2:m_if>
+								<inp2:m_if check="ord_Field" name="CouponId">
+									<inp2:m_Phrase label="lu_comm_CouponHasBeenApplied" />:
+									<inp2:ord_Field field="CouponName" />
+									<input class="button" type="submit" name="events[ord][OnRemoveCoupon]" value="<inp2:m_Phrase label="lu_comm_RemoveCoupon"/>">
+								<inp2:m_else />
+									<inp2:m_Phrase label="lu_comm_EnterCouponCode" />:
+									<input size="10" name="coupon_code" />
+								</inp2:m_if>
+							</td>
+							<td colspan="2">
+								<strong><inp2:m_Phrase label="lu_comm_Subtotal"/>: <span class="price1"><inp2:ord_Field field="SubtotalWithDiscount" currency="selected"/></span></strong>
+							</td>
+						</tr>
+
+<!--						<inp2:m_if check="ord_HasPayPalSubscription"/>
+							<input type="hidden" name="next_step_template" value="in-commerce/checkout/paypal">
+						<inp2:m_else/> -->
+							<input type="hidden" name="next_step_template" value="<inp2:m_if check="ord_OrderHasTangibleItems">in-commerce/checkout/shipping<inp2:m_else/>in-commerce/checkout/billing</inp2:m_if>" />
+<!--						</inp2:m_if> -->
+
+
+
+						<input type="hidden" name="login_template" value="in-commerce/checkout/login_register" />
+
+						<tr class="cart-subtotal">
+							<td colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>">
+								<input class="button" type="submit" name="events[ord][OnUpdateCart]" value="<inp2:m_Phrase label="lu_comm_UpdateCart"/>" />
+								&nbsp;
+								<input class="button" type="submit" name="events[ord][OnCleanupCart]" onclick="return confirm('<inp2:m_Phrase label="lu_comm_ClearCartConfirmation" />')" value="<inp2:m_Phrase label="lu_comm_CleanupCart"/>" />
+							</td>
+							<td align="right" colspan="2">
+								<input class="button" type="submit" name="events[ord][OnCheckout]" value="<inp2:m_Phrase label="lu_comm_ProceedCheckout"/>" />
+							</td>
+						</tr>
+					</inp2:m_DefineElement>
+
+					<inp2:m_DefineElement name="shop_cart_empty">
+						<tr>
+							<td>
+								<strong><inp2:m_Phrase label="lu_comm_YourCartIsEmpty"/></strong>
+							</td>
+						</tr>
+					</inp2:m_DefineElement>
+
+					<script language="JavaScript">
+						function showDiscountInfo(url)
+						{
+							window.open(url, null, 'scrollbars=no,menubar=no,toolbars=no,width=300,height=150');
+						}
+					</script>
+
+					<inp2:ord_PrintCart item_render_as="shop_cart_item" header_render_as="shop_cart_header" footer_render_as="shop_cart_footer" empty_cart_render_as="shop_cart_empty" per_page="-1"/>
+
+				</table>
+
+				<hr/>
+				<input type="hidden" name="continue_shopping_template" value="__default__"/>
+				<input class="button" type="submit" name="events[ord][OnContinueShopping]" value="<inp2:m_Phrase label="lu_comm_Continue_Shopping"/>">
+
+			</form>
+
+			<inp2:m_if check="ord_CartNotEmpty">
+				<inp2:m_if check="ord_HasPaymentGateway" name="Google Checkout">
+					<inp2:m_DefineElement name="google_checkout_button">
+						<form method="POST" target="_blank" action="<inp2:ord_GetFormAction payment_type_id="$payment_type_id"/>">
+							<inp2:ord_GetFormHiddenFields return_template="in-commerce/checkout/checkout_success"
+														  cancel_template="in-commerce/checkout/billing"
+														  payment_type_id="$payment_type_id"/>
+
+							<inp2:m_if check="m_Param" name="submit_url" equals_to="https://checkout.google.com/api/checkout/v2">
+								<input type="image" name="Google Checkout" alt="Fast checkout through Google"
+						        	src="https://checkout.google.com/buttons/checkout.gif?merchant_id=<inp2:m_Param name="merchant_id"/>
+						              &w=180&h=46&style=white&variant=text&loc=en_US" height="46" width="180">
+							<inp2:m_else/>
+								<input type="image" name="Google Checkout" alt="Fast checkout through Google"
+						        src="http://sandbox.google.com/checkout/buttons/checkout.gif?merchant_id=<inp2:m_Param name="merchant_id"/>
+						              &w=180&h=46&style=white&variant=text&loc=en_US" height="46" width="180">
+							</inp2:m_if>
+						</form>
+					</inp2:m_DefineElement>
+
+					<inp2:ord_DisplayPaymentGateway name="Google Checkout" render_as="google_checkout_button"/>
+				</inp2:m_if>
+			</inp2:m_if>
+
+		</td>
+	</tr>
+</table>
+
+<inp2:m_if check="ord_CartIsEmpty">
+
+	<inp2:m_include template="in-commerce/blocks/products/products_picks" data_exists="1"/>
+
+</inp2:m_if>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/shop_cart.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.23.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/cart_indicator.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/cart_indicator.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/cart_indicator.tpl	(revision 12131)
@@ -0,0 +1,22 @@
+<inp2:m_if check="ord_CartNotEmpty">
+	<table border="0" cellspacing="0" cellpadding="0" class="block">
+		<tr>
+			<td class="block-header"><inp2:m_Phrase label="lu_YourCart"/></td>
+		</tr>
+		<tr>
+			<td class="block-data">
+				<form method="post" action="<inp2:m_FormAction />">
+					<strong><inp2:m_Phrase label="lu_cart_TotalItems" />: </strong><inp2:ord_ItemsInCart/><br />
+
+					<strong><inp2:m_Phrase label="lu_cart_OrderTotal" />: </strong><inp2:ord_Field field="SubTotal" currency="selected"/><br />
+					<img src="img/s.gif" alt="" width="5" height="10" border="0" /><br />
+					<input type="hidden" name="viewcart_template" value="in-commerce/checkout/shop_cart">
+					<input class="button" type="submit" name="events[ord][OnViewCart]" value="<inp2:m_Phrase label="lu_cart_ViewCart" />">
+					<input type="hidden" name="next_step_template" value="<inp2:m_if check="ord_OrderHasTangibleItems">in-commerce/checkout/shipping<inp2:m_else/>in-commerce/checkout/billing</inp2:m_if>" />
+					<input class="button" type="submit" name="events[ord][OnCheckout]" value="<inp2:m_Phrase label="lu_cart_Checkout" />">
+
+				</form>
+			</td>
+		</tr>
+	</table>
+</inp2:m_if>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/cart_indicator.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/order_preview.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/order_preview.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/order_preview.tpl	(revision 12131)
@@ -0,0 +1,296 @@
+<inp2:m_include template="in-commerce/blocks/checkout/options"/>
+
+<inp2:m_DefineElement name="product_image">
+	<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" /><br/>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="orderitem_elem">
+	<tr class="cart-item">
+		<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">
+			<td width="120">
+				<inp2:p_Image render_as="product_image" thumbnail="1" DefaultImage="in-commerce/img/no_picture_list.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120" />
+			</td>
+		</inp2:m_if>
+
+		<td>
+			<strong><inp2:Field name="ProductName"/></strong><inp2:m_if check="ord_BackorderFlag"> <span class="error"><inp2:m_phrase label="lu_cart_BackorderFlag" /></span></inp2:m_if>
+			<inp2:m_if check="HasOptions">
+				<br/>
+				<span style="font-size: 8pt">
+				<inp2:m_if check="DisplayOptionsPricing"> <!-- selectable options or overriding combination -->
+					<inp2:PrintOptions render_as="option_element" currency="selected"/>
+				<inp2:m_else/> <!-- listed combinations -->
+					<inp2:PrintOptions render_as="option_element_no_price"/>
+				</inp2:m_if>
+				</span>
+				<br/>
+			</inp2:m_if>
+			<inp2:m_if check="HasDiscount">
+				<br />
+				<inp2:m_Phrase label="lu_comm_RegularPrice" />: <inp2:Field name="FlatPrice" currency="selected"/><br />
+				<inp2:m_Phrase label="lu_comm_Discount" />: <span class="price1"><inp2:Field name="ItemDiscount" currency="selected" negative="1"/></span>
+			</inp2:m_if>
+		</td>
+		<td>
+			<strong><inp2:Field name="Price" currency="selected"/></strong>
+		</td>
+		<td><inp2:Field name="Quantity"/></td>
+		<td><strong><inp2:Field name="ExtendedPrice" currency="selected"/></strong></td>
+	</tr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="order_form_shipping">
+	<!-- shipping -->
+	<table width="100%" cellpadding="0" cellspacing="0">
+		<tr class="cart-header">
+			<td colspan="2"><inp2:m_Phrase label="lu_comm_ShipmentInfo"/></td>
+		</tr>
+		<tr class="block-data2">
+			<td><strong><inp2:m_Phrase label="lu_Name"/></strong>:</td>
+			<td style="text-align: right;"><inp2:Field field="ShippingTo"/></td>
+		</tr>
+		<inp2:m_if check="Field" name="ShippingCompany">
+		<tr class="block-data2">
+			<td><strong><inp2:m_Phrase label="lu_comm_Company"/></strong>:</td>
+			<td style="text-align: right;"><inp2:Field field="ShippingCompany"/></td>
+		</tr>
+		</inp2:m_if>
+		<inp2:m_if check="Field" name="ShippingEmail">
+		<tr class="block-data2">
+			<td><strong><inp2:m_Phrase label="lu_comm_EmailAddress"/></strong>:</td>
+			<td style="text-align: right;"><inp2:Field field="ShippingEmail"/></td>
+		</tr>
+		</inp2:m_if>
+		<tr class="block-data2">
+			<td><strong><inp2:m_Phrase label="lu_comm_PhoneNumber"/></strong>:</td>
+			<td style="text-align: right;"><inp2:Field field="ShippingPhone"/></td>
+		</tr>
+		<tr class="block-data2">
+			<td><strong><inp2:m_Phrase label="lu_comm_FaxNumber"/></strong>:</td>
+			<td style="text-align: right;"><inp2:Field field="ShippingFax"/></td>
+		</tr>
+		<tr class="block-data2">
+			<td style="vertical-align: top;"><strong><inp2:m_Phrase label="lu_comm_Address"/></strong>:</td>
+			<td style="text-align: right;">
+				<inp2:m_if check="FieldEquals" field="ShippingAddress1" value="" inverse="inverse">
+					<inp2:Field field="ShippingAddress1"/><br>
+				</inp2:m_if>
+
+				<inp2:m_if check="FieldEquals" field="ShippingAddress2" value="" inverse="inverse">
+					<inp2:Field field="ShippingAddress2"/><br>
+				</inp2:m_if>
+				<inp2:PrintLocation type="Shipping"/>
+			</td>
+		</tr>
+	</table>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="order_form_billing">
+	<!-- billing -->
+	<table width="100%" cellpadding="0" cellspacing="0">
+		<tr class="cart-header">
+			<td colspan="2"><inp2:m_Phrase label="lu_comm_BillingInfo"/></td>
+		</tr>
+		<tr class="block-data2">
+			<td><strong><inp2:m_Phrase label="lu_Name"/></strong>:</td>
+			<td style="text-align: right;"><inp2:Field field="BillingTo"/></td>
+		</tr>
+		<inp2:m_if check="Field" name="BillingCompany">
+		<tr class="block-data2">
+			<td><strong><inp2:m_Phrase label="lu_comm_Company"/></strong>:</td>
+			<td style="text-align: right;"><inp2:Field field="BillingCompany"/></td>
+		</tr>
+		</inp2:m_if>
+		<inp2:m_if check="Field" name="BillingEmail">
+		<tr class="block-data2">
+			<td><strong><inp2:m_Phrase label="lu_comm_EmailAddress"/></strong>:</td>
+			<td style="text-align: right;"><inp2:Field field="BillingEmail"/></td>
+		</tr>
+		</inp2:m_if>
+		<tr class="block-data2">
+			<td><strong><inp2:m_Phrase label="lu_comm_PhoneNumber"/></strong>:</td>
+			<td style="text-align: right;"><inp2:Field field="BillingPhone"/></td>
+		</tr>
+		<tr class="block-data2">
+			<td><strong><inp2:m_Phrase label="lu_comm_FaxNumber"/></strong>:</td>
+			<td style="text-align: right;"><inp2:Field field="BillingFax"/></td>
+		</tr>
+		<tr class="block-data2">
+			<td><strong><inp2:m_Phrase label="lu_comm_Company"/></strong>:</td>
+			<td style="text-align: right;"><inp2:Field field="BillingCompany"/></td>
+		</tr>
+		<tr class="block-data2">
+			<td style="vertical-align: top;"><strong><inp2:m_Phrase label="lu_comm_Address"/></strong>:</td>
+			<td style="text-align: right;">
+				<inp2:m_if check="FieldEquals" field="BillingAddress1" value="" inverse="inverse">
+					<inp2:Field field="BillingAddress1"/><br>
+				</inp2:m_if>
+
+				<inp2:m_if check="FieldEquals" field="BillingAddress2" value="" inverse="inverse">
+					<inp2:Field field="BillingAddress2"/><br>
+				</inp2:m_if>
+				<inp2:PrintLocation type="Billing"/>
+			</td>
+		</tr>
+
+		<tr class="block-data2">
+			<td><strong><inp2:m_Phrase label="lu_comm_PaymentType"/>:</strong></td>
+			<td style="text-align: right;"><inp2:Field name="PaymentType" /></td>
+		</tr>
+
+		<inp2:m_if check="UsingCreditCard">
+			<tr class="block-data2">
+				<td><strong><inp2:m_Phrase label="lu_comm_NameOnCard"/>:</strong></td>
+				<td style="text-align: right;"><inp2:Field name="PaymentNameOnCard"/></td>
+			</tr>
+			<tr class="block-data2">
+				<td><strong><inp2:m_Phrase label="lu_comm_CardType"/>:</strong></td>
+				<td style="text-align: right;"><inp2:Field name="PaymentCardType" /></td>
+			</tr>
+			<tr class="block-data2">
+				<td style="vertical-align: top;"><strong><inp2:m_Phrase label="lu_comm_CardNumber"/>:</strong></td>
+				<td style="text-align: right;"><inp2:Field name="PaymentAccount" masked="masked"/></td>
+			</tr>
+			<tr class="block-data2">
+				<td style="vertical-align: top;"><strong><inp2:m_Phrase label="lu_comm_Exp"/>:</strong></td>
+				<td style="text-align: right;"><inp2:Field name="PaymentCCExpDate"/></td>
+			</tr>
+		</inp2:m_if>
+	</table>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="order_form">
+	<table class="block-no-border">
+		<tr>
+			<td class="block-header">
+				<inp2:m_Phrase label="lu_comm_OrderPreview"/>
+			</td>
+		</tr>
+	</table>
+
+	<table class="block-no-border">
+		<tr>
+			<td class="block-data">
+				<strong><inp2:m_Phrase label="lu_comm_OrderNumber"/><inp2:Field name="OrderNumber"/></strong>
+			</td>
+		</tr>
+	</table>
+
+	<inp2:m_if check="OrderHasTangibleItems">
+		<table class="block-no-border">
+			<tr>
+				<td width="49%">
+					<inp2:m_RenderElement name="order_form_shipping" PrefixSpecial="ord"/>
+				</td>
+				<td>&nbsp;</td>
+				<td width="49%">
+					<inp2:m_RenderElement name="order_form_billing" PrefixSpecial="ord"/>
+				</td>
+			</tr>
+		</table>
+	<inp2:m_else />
+		<table class="block-no-border">
+			<tr>
+				<td>
+					<inp2:m_RenderElement name="order_form_billing" PrefixSpecial="ord"/>
+				</td>
+			</tr>
+		</table>
+	</inp2:m_if>
+
+	<table>
+		<tr class="cart-header">
+			<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">
+				<td colspan="2"><inp2:m_Phrase label="lu_comm_ProductDescription"/></td>
+			<inp2:m_else/>
+				<td><inp2:m_Phrase label="lu_comm_ProductDescription"/></td>
+			</inp2:m_if>
+
+			<td><inp2:m_Phrase label="lu_comm_YourPrice"/></td>
+
+			<td><inp2:m_Phrase label="lu_comm_Qty"/>.</td>
+			<td><inp2:m_Phrase label="lu_comm_Total"/></td>
+		</tr>
+
+		<inp2:ord_ListOrderItems render_as="orderitem_elem"/>
+
+		<tr class="cart-subtotal">
+			<td>
+				<inp2:m_if check="ord_HasDiscount">
+					<inp2:m_Phrase label="lu_comm_TotalSavings" />: <span class="price1"><inp2:ord_Field name="DiscountTotal" currency="selected" /></span><br />
+				</inp2:m_if>&nbsp;
+			</td>
+			<td style="text-align: right;" colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">5<inp2:m_else/>4</inp2:m_if>">
+				<strong><inp2:m_Phrase label="lu_comm_Subtotal"/>: <span class="price1"><inp2:Field name="SubTotal" currency="selected"/></span></strong>
+			</td>
+		</tr>
+	</table>
+
+	<table>
+		<tr class="cart-header">
+		    <td>
+				<inp2:m_Phrase label="lu_comm_OrderTotal"/>
+			</td>
+		</tr>
+	</table>
+
+	<table class="block-no-border">
+
+		<inp2:m_DefineElement name="shipping_total">
+			<tr class="block-data2">
+				<td style="text-align: right;"><inp2:m_Phrase label="lu_comm_ShippingCost"/> (<inp2:ord_ShippingType />):</td>
+				<td style="text-align: right;"><inp2:ord_Field name="ShippingCost" currency="selected"/></td>
+			</tr>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="processing_total">
+			<tr class="block-data2">
+				<td style="text-align: right;"><inp2:m_Phrase label="lu_comm_ProcessingFee"/>: </td>
+				<td style="text-align: right;"><inp2:ord_Field name="ProcessingFee" currency="selected"/></td>
+			</tr>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="sub_total">
+			<tr class="block-data2">
+				<td style="text-align: right;"><inp2:m_Phrase label="lu_comm_SubTotal"/>: </td>
+				<td style="text-align: right;"><inp2:ord_Field name="AmountWithoutVAT" currency="selected"/></td>
+			</tr>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="vat_total">
+			<tr class="block-data2">
+				<td style="text-align: right;"><inp2:m_Phrase label="lu_comm_VAT"/> <inp2:ord_Field name="VATPercent"/>%: </td>
+				<td style="text-align: right;"><inp2:ord_Field name="VAT" currency="selected"/></td>
+			</tr>
+		</inp2:m_DefineElement>
+
+		<inp2:ord_PrintTotals
+			shipping_render_as="shipping_total"
+			processing_render_as="processing_total"
+			sub_total_render_as="sub_total"
+			vat_render_as="vat_total"/>
+
+		<tr class="block-data2">
+		  <td class="price3" style="text-align: right;"><strong><inp2:m_Phrase label="lu_comm_GrandTotal"/>:</strong></td>
+			<td class="price3" style="text-align: right;"><span class="price1"><inp2:Field name="TotalAmount" currency="selected"/></span></td>
+		</tr>
+	</table>
+
+	<br />
+</inp2:m_DefineElement>
+
+<inp2:ord_ShowOrder render_as="order_form" />
+
+<table class="block-no-border">
+	<tr class="block-data2">
+		<td class="price3" style="text-align: right;">
+			<form method="POST" action="<inp2:ord_GetFormAction/>">
+				<inp2:ord_GetFormHiddenFields return_template="in-commerce/checkout/checkout_success"
+											  cancel_template="in-commerce/checkout/billing" />
+				<inp2:m_if check="ord_NeedsPlaceButton">
+					<input type="submit" value="<inp2:m_Phrase label="lu_order_CompleteOrder" />" class="button">
+				</inp2:m_if>
+			</form>
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/order_preview.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.19.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/options.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/options.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/options.tpl	(revision 12131)
@@ -0,0 +1,28 @@
+<inp2:m_DefineElement name="option_value_element">
+	<inp2:m_param name="value"/> <inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/> (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if>
+	<inp2:m_if check="m_ParamEquals" name="is_last" value="1"><inp2:m_else/>, </inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="option_element">
+	<inp2:m_if check="m_ParamEquals" param="type" value="6"> <!-- checkboxes - multiple -->
+		<strong><inp2:m_param name="option"/>:</strong>
+			<inp2:PrintOptionValues render_as="option_value_element" currency="selected"/>
+	<inp2:m_else/>
+			<strong><inp2:m_param name="option"/>:</strong> <inp2:m_param name="value"/>
+				<inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/> (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if>
+	</inp2:m_if><br/>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="option_value_element_no_price">
+	<inp2:m_param name="value"/>
+	<inp2:m_if check="m_ParamEquals" name="is_last" value="1"><inp2:m_else/>, </inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="option_element_no_price">
+	<inp2:m_if check="m_ParamEquals" param="type" value="6"> <!-- checkboxes - multiple -->
+		<strong><inp2:m_param name="option"/>:</strong>
+			<inp2:PrintOptionValues render_as="option_value_element_no_price"/>
+	<inp2:m_else/>
+			<strong><inp2:m_param name="option"/>:</strong> <inp2:m_param name="value"/>
+	</inp2:m_if><br/>
+</inp2:m_DefineElement>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/options.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/billing_address.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/billing_address.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/billing_address.tpl	(revision 12131)
@@ -0,0 +1,251 @@
+<inp2:m_DefineElement name="destination">
+	<option value="<inp2:m_param name="key"/>"<inp2:m_param name="selected"/>><inp2:m_param name="option"/></option>
+</inp2:m_DefineElement>
+
+<inp2:ord_ShowDefaultAddress type="billing"/>
+<table class="block-no-border">
+	<tr>
+		<td class="block-header">
+			<inp2:m_Phrase label="lu_comm_BillingInfo"/>
+		</td>
+	</tr>
+	<tr>
+		<td class="block-data">
+			<inp2:m_if check="ord_HasError" field="any">
+				<table class="warning">
+					<tr>
+						<td valign="top" align="left" class="block-data">
+							<img src="img/message.gif" alt="" width="19" height="19" />
+							<span class="warning-text"><inp2:m_Phrase label="lu_Warning"/></span><br />
+							<inp2:m_Phrase label="lu_AProblemInForm"/>
+
+						</td>
+					</tr>
+				</table>
+			</inp2:m_if>
+			<inp2:m_Phrase label="lu_comm_PleaseEnterBillingAddress"/>
+
+			<br />
+			<strong>* <inp2:m_Phrase label="lu_IndicatesRequired"/>.</strong> 	<br /><br />
+
+			<inp2:m_if check="m_LoggedIn">
+				<!-- address selector: begin -->
+				<inp2:m_Phrase label="lu_comm_SelectAddress"/>:
+
+				<inp2:m_DefineElement name="address_elem">
+					<option value="<inp2:m_param name="key"/>"<inp2:m_param name="selected"/>><inp2:m_param name="value"/></option>
+				</inp2:m_DefineElement>
+
+				<select name="billing_address_id" onchange="document.getElementById('events[ord][OnSelectAddress]').click();">
+					<inp2:m_if check="ord_AllowAddAddress">
+						<option value="-1"><inp2:m_phrase name="lu_comm_NewAddress"/></option>
+					</inp2:m_if>
+					<inp2:ord_PrintAddresses render_as="address_elem" type="billing" />
+				</select>
+				&nbsp;
+				<input class="button" type="submit" id="events[ord][OnSelectAddress]" name="events[ord][OnSelectAddress]" value="<inp2:m_Phrase label="lu_comm_Select"/>"/>
+				<a href="<inp2:m_Link template="in-commerce/my_account/address"/>"><inp2:m_Phrase name="lu_comm_ManageAddresses"/></a>
+				<br />
+				<inp2:m_Phrase label="lu_comm_OrEnterAddress"/>:<br />
+
+				<inp2:m_if check="ord_IsProfileAddress" type="billing">
+					<inp2:m_Phrase label="lu_comm_ProfileAddressWarning"/><br />
+				</inp2:m_if>
+				<!-- address selector: end -->
+			</inp2:m_if>
+
+			<table class="form-data">
+				<inp2:m_if check="ord_OrderHasTangibleItems">
+					<inp2:m_if check="m_LoggedIn"><inp2:m_else/>
+						<tr>
+							<td><strong><inp2:m_Phrase label="lu_SameAsShipping"/>:</strong></td>
+							<td>
+								<input type="checkbox" name="same_address" onclick="document.getElementById('events[ord][OnUpdate]').click();" value="1"<inp2:m_if check="m_GetEquals" name="same_address" value="1"> checked</inp2:m_if>" />
+							</td>
+							<td class="error"></td>
+						</tr>
+					</inp2:m_if>
+				</inp2:m_if>
+
+				<inp2:m_if check="u.current_Field" name="cust_shipping_addr_block" inverse="1">
+
+					<tr>
+						<td><strong><inp2:m_Phrase label="lu_comm_FullName"/>*:</strong></td>
+						<td>
+							<input type="text" name="<inp2:ord_InputName field="BillingTo"/>" value="<inp2:ord_Field name="BillingTo"/>" style="width: 300px;" />
+						</td>
+						<td width="170" class="error"><inp2:ord_Error field="BillingTo" /></td>
+					</tr>
+					<tr>
+						<td><strong><inp2:m_Phrase label="lu_comm_Company"/>:</strong></td>
+						<td>
+							<input type="text" name="<inp2:ord_InputName field="BillingCompany"/>" value="<inp2:ord_Field name="BillingCompany"/>" style="width: 300px;" />
+						</td>
+						<td width="170" class="error"><inp2:ord_Error field="BillingCompany" /></td>
+					</tr>
+					<tr>
+						<td>
+							<strong><inp2:m_Phrase label="lu_comm_AddressLine"/> 1*:</strong></td>
+						<td>
+							<input type="text" name="<inp2:ord_InputName field="BillingAddress1"/>" value="<inp2:ord_Field name="BillingAddress1"/>" style="width: 300px;" />
+						</td>
+						<td class="error"><inp2:ord_Error field="BillingAddress1" /></td>
+					</tr>
+					<tr>
+						<td>
+							<strong><inp2:m_Phrase label="lu_comm_AddressLine"/> 2:</strong></td>
+						<td>
+							<input type="text" name="<inp2:ord_InputName field="BillingAddress2"/>" value="<inp2:ord_Field name="BillingAddress2"/>" style="width: 300px;" />
+						</td>
+						<td class="error"><inp2:ord_Error field="BillingAddress2" /></td>
+					</tr>
+					<tr>
+						<td>
+							<strong><inp2:m_Phrase label="lu_comm_City"/> *:</strong></td>
+						<td>
+							<input type="text" name="<inp2:ord_InputName field="BillingCity"/>" value="<inp2:ord_Field name="BillingCity"/>" style="width: 200px;" />
+						</td>
+						<td class="error"><inp2:ord_Error field="BillingCity" /></td>
+					</tr>
+					<tr>
+						<td>
+							<strong><inp2:m_Phrase label="lu_State"/> *:</strong></td>
+						<td>
+							<input type="text" name="<inp2:ord_InputName field="BillingState"/>" value="<inp2:ord_Field name="BillingState"/>" style="width: 200px;" />
+						</td>
+						<td class="error"><inp2:ord_Error field="BillingState"/></td>
+					</tr>
+					<tr>
+						<td>
+							<strong><inp2:m_Phrase label="lu_ZipCode"/> *:</strong></td>
+						<td>
+							<input type="text" name="<inp2:ord_InputName field="BillingZip"/>" value="<inp2:ord_Field name="BillingZip"/>" style="width: 100px;" />
+						</td>
+						<td class="error"><inp2:ord_Error field="BillingZip" /></td>
+					</tr>
+					<tr>
+						<td>
+							<strong><inp2:m_Phrase label="lu_Country"/> *:</strong></td>
+						<td>
+							<select name="<inp2:ord_InputName field="BillingCountry"/>" style="width: 300px;">
+									<option value="0"></option>
+									<inp2:ord_PredefinedOptions field="BillingCountry" render_as="destination" selected_param="selected" selected="selected=\"selected\""/>
+							</select>
+						</td>
+						<td class="error"><inp2:ord_Error field="BillingCountry" /></td>
+					</tr>
+					<tr>
+						<td><strong><inp2:m_Phrase label="lu_Phone"/> *:</strong></td>
+						<td>
+							<input type="text" name="<inp2:ord_InputName field="BillingPhone"/>" value="<inp2:ord_Field name="BillingPhone"/>" style="width: 150px;" />
+						</td>
+						<td class="error"><inp2:ord_Error field="BillingPhone"/></td>
+					</tr>
+					<tr>
+						<td><strong><inp2:m_Phrase label="lu_Email"/> :</strong></td>
+						<td>
+							<input type="text" name="<inp2:ord_InputName field="BillingEmail"/>" value="<inp2:ord_Field name="BillingEmail"/>" style="width: 150px;" />
+						</td>
+						<td class="error"><inp2:ord_Error field="BillingEmail"/></td>
+					</tr>
+
+				<inp2:m_else/>
+					<tr>
+						<td><strong><inp2:m_Phrase label="lu_comm_FullName"/>*:</strong></td>
+						<td>
+							<inp2:ord_Field name="BillingTo"/>
+							<input type="hidden" name="<inp2:ord_InputName field="BillingTo"/>" value="<inp2:ord_Field name="BillingTo"/>" style="width: 300px;" />
+						</td>
+						<td width="170" class="error"><inp2:ord_Error field="BillingTo"/></td>
+					</tr>
+					<tr>
+						<td><strong><inp2:m_Phrase label="lu_comm_Company"/>:</strong></td>
+						<td>
+							<inp2:ord_Field name="BillingCompany"/>
+							<input type="hidden" name="<inp2:ord_InputName field="BillingCompany"/>" value="<inp2:ord_Field name="BillingCompany"/>" style="width: 300px;" />
+						</td>
+						<td width="170" class="error"><inp2:ord_Error field="BillingCompany"/></td>
+					</tr>
+					<tr>
+						<td>
+							<strong><inp2:m_Phrase label="lu_comm_AddressLine"/> 1*:</strong></td>
+						<td>
+							<inp2:ord_Field name="BillingAddress1"/>
+							<input type="hidden" name="<inp2:ord_InputName field="BillingAddress1"/>" value="<inp2:ord_Field name="BillingAddress1"/>" style="width: 300px;" />
+						</td>
+						<td class="error"><inp2:ord_Error field="BillingAddress1"/></td>
+					</tr>
+					<tr>
+						<td>
+							<strong><inp2:m_Phrase label="lu_comm_AddressLine"/> 2:</strong></td>
+						<td>
+							<inp2:ord_Field name="BillingAddress2"/>
+							<input type="hidden" name="<inp2:ord_InputName field="BillingAddress2"/>" value="<inp2:ord_Field name="BillingAddress2"/>" style="width: 300px;" />
+						</td>
+						<td class="error"><inp2:ord_Error field="BillingAddress2"/></td>
+					</tr>
+					<tr>
+						<td>
+							<strong><inp2:m_Phrase label="lu_comm_City"/> *:</strong></td>
+						<td>
+							<inp2:ord_Field name="BillingCity"/>
+							<input type="hidden" name="<inp2:ord_InputName field="BillingCity"/>" value="<inp2:ord_Field name="BillingCity"/>" style="width: 200px;" />
+						</td>
+						<td class="error"><inp2:ord_Error field="BillingCity"/></td>
+					</tr>
+					<tr>
+						<td>
+							<strong><inp2:m_Phrase label="lu_State"/>*:</strong></td>
+						<td>
+							<inp2:ord_Field name="BillingState"/>
+							<input type="hidden" name="<inp2:ord_InputName field="BillingState"/>" value="<inp2:ord_Field name="BillingState"/>" style="width: 200px;" />
+						</td>
+						<td class="error"><inp2:ord_Error field="BillingState"/></td>
+					</tr>
+					<tr>
+						<td>
+							<strong><inp2:m_Phrase label="lu_comm_ZipCode"/> *:</strong></td>
+						<td>
+							<inp2:ord_Field name="BillingZip"/>
+							<input type="hidden" name="<inp2:ord_InputName field="BillingZip"/>" value="<inp2:ord_Field name="BillingZip"/>" style="width: 100px;" />
+						</td>
+						<td class="error"><inp2:ord_Error field="BillingZip"/></td>
+					</tr>
+					<tr>
+						<td>
+							<strong><inp2:m_Phrase label="lu_Country"/> *:</strong></td>
+						<td>
+							<inp2:ord_Field name="BillingCountry"/>
+							<input type="hidden" name="<inp2:ord_InputName field="BillingCountry"/>" value="<inp2:ord_Field name="BillingCountry"/>" style="width: 100px;" />
+						</td>
+						<td class="error"><inp2:ord_Error field="BillingCountry"/></td>
+					</tr>
+					<tr>
+						<td><strong><inp2:m_Phrase label="lu_Phone"/>*:</strong></td>
+						<td>
+							<inp2:ord_Field name="BillingPhone"/>
+							<input type="hidden" name="<inp2:ord_InputName field="BillingPhone"/>" value="<inp2:ord_Field name="BillingPhone"/>" style="width: 150px;" />
+						</td>
+						<td class="error"><inp2:ord_Error field="BillingPhone"/></td>
+					</tr>
+					<tr>
+						<td><strong><inp2:m_Phrase label="lu_Email"/>:</strong></td>
+						<td>
+							<inp2:ord_Field name="BillingEmail"/>
+							<input type="hidden" name="<inp2:ord_InputName field="BillingEmail"/>" value="<inp2:ord_Field name="BillingEmail"/>" style="width: 150px;" />
+						</td>
+						<td class="error"><inp2:ord_Error field="BillingEmail"/></td>
+					</tr>
+				</inp2:m_if>
+
+				<tr>
+					<td colspan="2" valign="bottom">
+						<br/>
+						<input type="hidden" name="check_billing_address" value="true"/>
+						<input class="button" type="submit" id="events[ord][OnUpdate]" name="events[ord][OnUpdate]" value="<inp2:m_Phrase label="lu_comm_UpdateAddress"/>"/>
+					</td>
+				</tr>
+			</table>
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/billing_address.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.8
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/shipping_address.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/shipping_address.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/shipping_address.tpl	(revision 12131)
@@ -0,0 +1,235 @@
+<inp2:m_DefineElement name="destination">
+	<option value="<inp2:m_param name="key"/>"<inp2:m_param name="selected"/>><inp2:m_param name="option"/></option>
+</inp2:m_DefineElement>
+
+<inp2:ord_ShowDefaultAddress type="shipping"/>
+<table class="block-no-border">
+	<tr>
+		<td class="block-header">
+			<inp2:m_Phrase label="lu_comm_ShippingInfo"/>
+		</td>
+	</tr>
+	<tr>
+		<td class="block-data">
+				<inp2:m_if check="ord_HasError" field="any">
+					<table class="warning">
+						<tr>
+							<td valign="top" align="left" class="block-data">
+								<img src="img/message.gif" alt="" width="19" height="19" />
+								<span class="warning-text"><inp2:m_Phrase label="lu_Warning"/></span><br />
+								<inp2:m_Phrase label="lu_AProblemInForm"/>
+							</td>
+						</tr>
+					</table>
+				</inp2:m_if>
+				<inp2:m_Phrase label="lu_comm_EnterShippingAddress"/>
+				<br />
+				<strong>* <inp2:m_Phrase label="lu_IndicatesRequired"/>.</strong> 	<br /><br />
+
+				<inp2:m_if check="m_LoggedIn">
+					<!-- address selector: begin -->
+					<inp2:m_Phrase label="lu_comm_SelectAddress"/>:
+
+					<inp2:m_DefineElement name="address_elem">
+						<option value="<inp2:m_param name="key"/>"<inp2:m_param name="selected"/>><inp2:m_param name="value"/></option>
+					</inp2:m_DefineElement>
+
+					<select name="shipping_address_id" onchange="document.getElementById('events[ord][OnSelectAddress]').click();">
+						<inp2:m_if check="ord_AllowAddAddress">
+							<option value="-1"><inp2:m_phrase name="lu_comm_NewAddress"/></option>
+						</inp2:m_if>
+						<inp2:ord_PrintAddresses render_as="address_elem" type="shipping" />
+					</select>
+					&nbsp;
+					<input class="button" type="submit" id="events[ord][OnSelectAddress]" name="events[ord][OnSelectAddress]" value="<inp2:m_Phrase label="lu_comm_Select"/>"/>
+					<a href="<inp2:m_Link template="in-commerce/my_account/address"/>"><inp2:m_Phrase name="lu_comm_ManageAddresses"/></a>
+					<br />
+					<inp2:m_Phrase label="lu_comm_OrEnterAddress"/>:<br />
+
+					<inp2:m_if check="ord_IsProfileAddress" type="billing">
+						<inp2:m_Phrase label="lu_comm_ProfileAddressWarning"/><br />
+					</inp2:m_if>
+					<!-- address selector: end -->
+				</inp2:m_if>
+				<table class="form-data">
+
+					<inp2:m_if check="u.current_Field" name="cust_shipping_addr_block" inverse="1">
+
+						<tr>
+							<td><strong><inp2:m_Phrase label="lu_comm_FullName"/>*:</strong></td>
+							<td>
+								<input type="text" name="<inp2:ord_InputName field="ShippingTo"/>" value="<inp2:ord_Field name="ShippingTo"/>" style="width: 300px;" />
+							</td>
+							<td width="170" class="error"><inp2:ord_Error field="ShippingTo"/></td>
+						</tr>
+						<tr>
+							<td><strong><inp2:m_Phrase label="lu_comm_Company"/>:</strong></td>
+							<td>
+								<input type="text" name="<inp2:ord_InputName field="ShippingCompany"/>" value="<inp2:ord_Field name="ShippingCompany"/>" style="width: 300px;" />
+							</td>
+							<td width="170" class="error"><inp2:ord_Error field="ShippingCompany"/></td>
+						</tr>
+						<tr>
+							<td>
+								<strong><inp2:m_Phrase label="lu_comm_AddressLine"/> 1*:</strong></td>
+							<td>
+								<input type="text" name="<inp2:ord_InputName field="ShippingAddress1"/>" value="<inp2:ord_Field name="ShippingAddress1"/>" style="width: 300px;" />
+							</td>
+							<td class="error"><inp2:ord_Error field="ShippingAddress1"/></td>
+						</tr>
+						<tr>
+							<td>
+								<strong><inp2:m_Phrase label="lu_comm_AddressLine"/> 2:</strong></td>
+							<td>
+								<input type="text" name="<inp2:ord_InputName field="ShippingAddress2"/>" value="<inp2:ord_Field name="ShippingAddress2"/>" style="width: 300px;" />
+							</td>
+							<td class="error"><inp2:ord_Error field="ShippingAddress2"/></td>
+						</tr>
+						<tr>
+							<td>
+								<strong><inp2:m_Phrase label="lu_comm_City"/> *:</strong></td>
+							<td>
+								<input type="text" name="<inp2:ord_InputName field="ShippingCity"/>" value="<inp2:ord_Field name="ShippingCity"/>" style="width: 200px;" />
+							</td>
+							<td class="error"><inp2:ord_Error field="ShippingCity"/></td>
+						</tr>
+						<tr>
+							<td>
+								<strong><inp2:m_Phrase label="lu_State"/>*:</strong></td>
+							<td>
+								<input type="text" name="<inp2:ord_InputName field="ShippingState"/>" value="<inp2:ord_Field name="ShippingState"/>" style="width: 200px;" />
+							</td>
+							<td class="error"><inp2:ord_Error field="ShippingState"/></td>
+						</tr>
+						<tr>
+							<td>
+								<strong><inp2:m_Phrase label="lu_comm_ZipCode"/> *:</strong></td>
+							<td>
+								<input type="text" name="<inp2:ord_InputName field="ShippingZip"/>" value="<inp2:ord_Field name="ShippingZip"/>" style="width: 100px;" />
+							</td>
+							<td class="error"><inp2:ord_Error field="ShippingZip"/></td>
+						</tr>
+						<tr>
+							<td>
+								<strong><inp2:m_Phrase label="lu_Country"/> *:</strong></td>
+							<td>
+								<select name="<inp2:ord_InputName field="ShippingCountry"/>" style="width: 300px;">
+										<option value=""></option>
+										<inp2:ord_PredefinedOptions field="ShippingCountry" render_as="destination" selected_param="selected" selected="selected=\"selected\""/>
+								</select>
+							</td>
+							<td class="error"><inp2:ord_Error field="ShippingCountry"/></td>
+						</tr>
+						<tr>
+							<td><strong><inp2:m_Phrase label="lu_Phone"/>*:</strong></td>
+							<td>
+								<input type="text" name="<inp2:ord_InputName field="ShippingPhone"/>" value="<inp2:ord_Field name="ShippingPhone"/>" style="width: 150px;" />
+							</td>
+							<td class="error"><inp2:ord_Error field="ShippingPhone"/></td>
+						</tr>
+						<tr>
+							<td><strong><inp2:m_Phrase label="lu_Email"/>:</strong></td>
+							<td>
+								<input type="text" name="<inp2:ord_InputName field="ShippingEmail"/>" value="<inp2:ord_Field name="ShippingEmail"/>" style="width: 150px;" />
+							</td>
+							<td class="error"><inp2:ord_Error field="ShippingEmail"/></td>
+						</tr>
+					<inp2:m_else/>
+						<tr>
+							<td><strong><inp2:m_Phrase label="lu_comm_FullName"/>*:</strong></td>
+							<td>
+								<inp2:ord_Field name="ShippingTo"/>
+								<input type="hidden" name="<inp2:ord_InputName field="ShippingTo"/>" value="<inp2:ord_Field name="ShippingTo"/>" style="width: 300px;" />
+							</td>
+							<td width="170" class="error"><inp2:ord_Error field="ShippingTo"/></td>
+						</tr>
+						<tr>
+							<td><strong><inp2:m_Phrase label="lu_comm_Company"/>:</strong></td>
+							<td>
+								<inp2:ord_Field name="ShippingCompany"/>
+								<input type="hidden" name="<inp2:ord_InputName field="ShippingCompany"/>" value="<inp2:ord_Field name="ShippingCompany"/>" style="width: 300px;" />
+							</td>
+							<td width="170" class="error"><inp2:ord_Error field="ShippingCompany"/></td>
+						</tr>
+						<tr>
+							<td>
+								<strong><inp2:m_Phrase label="lu_comm_AddressLine"/> 1*:</strong></td>
+							<td>
+								<inp2:ord_Field name="ShippingAddress1"/>
+								<input type="hidden" name="<inp2:ord_InputName field="ShippingAddress1"/>" value="<inp2:ord_Field name="ShippingAddress1"/>" style="width: 300px;" />
+							</td>
+							<td class="error"><inp2:ord_Error field="ShippingAddress1"/></td>
+						</tr>
+						<tr>
+							<td>
+								<strong><inp2:m_Phrase label="lu_comm_AddressLine"/> 2:</strong></td>
+							<td>
+								<inp2:ord_Field name="ShippingAddress2"/>
+								<input type="hidden" name="<inp2:ord_InputName field="ShippingAddress2"/>" value="<inp2:ord_Field name="ShippingAddress2"/>" style="width: 300px;" />
+							</td>
+							<td class="error"><inp2:ord_Error field="ShippingAddress2"/></td>
+						</tr>
+						<tr>
+							<td>
+								<strong><inp2:m_Phrase label="lu_comm_City"/> *:</strong></td>
+							<td>
+								<inp2:ord_Field name="ShippingCity"/>
+								<input type="hidden" name="<inp2:ord_InputName field="ShippingCity"/>" value="<inp2:ord_Field name="ShippingCity"/>" style="width: 200px;" />
+							</td>
+							<td class="error"><inp2:ord_Error field="ShippingCity"/></td>
+						</tr>
+						<tr>
+							<td>
+								<strong><inp2:m_Phrase label="lu_State"/>*:</strong></td>
+							<td>
+								<inp2:ord_Field name="ShippingState"/>
+								<input type="hidden" name="<inp2:ord_InputName field="ShippingState"/>" value="<inp2:ord_Field name="ShippingState"/>" style="width: 200px;" />
+							</td>
+							<td class="error"><inp2:ord_Error field="ShippingState"/></td>
+						</tr>
+						<tr>
+							<td>
+								<strong><inp2:m_Phrase label="lu_comm_ZipCode"/> *:</strong></td>
+							<td>
+								<inp2:ord_Field name="ShippingZip"/>
+								<input type="hidden" name="<inp2:ord_InputName field="ShippingZip"/>" value="<inp2:ord_Field name="ShippingZip"/>" style="width: 100px;" />
+							</td>
+							<td class="error"><inp2:ord_Error field="ShippingZip"/></td>
+						</tr>
+						<tr>
+							<td>
+								<strong><inp2:m_Phrase label="lu_Country"/> *:</strong></td>
+							<td>
+								<inp2:ord_Field name="ShippingCountry"/>
+								<input type="hidden" name="<inp2:ord_InputName field="ShippingCountry"/>" value="<inp2:ord_Field name="ShippingCountry"/>" style="width: 100px;" />
+							</td>
+							<td class="error"><inp2:ord_Error field="ShippingCountry"/></td>
+						</tr>
+						<tr>
+							<td><strong><inp2:m_Phrase label="lu_Phone"/>*:</strong></td>
+							<td>
+								<inp2:ord_Field name="ShippingPhone"/>
+								<input type="hidden" name="<inp2:ord_InputName field="ShippingPhone"/>" value="<inp2:ord_Field name="ShippingPhone"/>" style="width: 150px;" />
+							</td>
+							<td class="error"><inp2:ord_Error field="ShippingPhone"/></td>
+						</tr>
+						<tr>
+							<td><strong><inp2:m_Phrase label="lu_Email"/>:</strong></td>
+							<td>
+								<inp2:ord_Field name="ShippingEmail"/>
+								<input type="hidden" name="<inp2:ord_InputName field="ShippingEmail"/>" value="<inp2:ord_Field name="ShippingEmail"/>" style="width: 150px;" />
+							</td>
+							<td class="error"><inp2:ord_Error field="ShippingEmail"/></td>
+						</tr>
+					</inp2:m_if>
+
+					<tr>
+						<td colspan="2" valign="bottom" height="35">
+							<input type="hidden" name="check_shipping_address" value="true"/>
+							<input class="button" type="submit" id="events[ord][OnUpdate]" name="events[ord][OnUpdate]" value="<inp2:m_Phrase label="lu_comm_UpdateAddress"/>"/>
+						</td>
+					</tr>
+				</table>
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/shipping_address.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.8
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/checkout_steps.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/checkout_steps.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/checkout_steps.tpl	(revision 12131)
@@ -0,0 +1,43 @@
+<table border="0" cellspacing="0" cellpadding="0" class="block">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_comm_CheckoutSteps"/></td>
+	</tr>
+	<tr>
+		<td class="block-data">
+				<inp2:m_DefineElement name="passed_checkout_step">
+					<inp2:m_param name="number"/>. <a href="<inp2:m_param name="template_link"/>"><inp2:m_param name="title"/></a><br/>
+				</inp2:m_DefineElement>
+
+				<inp2:m_DefineElement name="current_checkout_step">
+					<span class="nav-bar-current"><inp2:m_param name="number"/>. <inp2:m_param name="title"/></span><br/>
+				</inp2:m_DefineElement>
+
+				<inp2:m_DefineElement name="checkout_step">
+					<inp2:m_param name="number"/>. <inp2:m_param name="title"/><br/>
+				</inp2:m_DefineElement>
+
+				<inp2:m_if check="ord_OrderHasTangibleItems">
+
+					<inp2:ord_CheckoutSteps render_as="checkout_step" passed_step_render_as="passed_checkout_step"
+							 current_step_render_as="current_checkout_step"
+							 steps="lu_ShoppingCart,lu_comm_ShippingInfo,lu_comm_BillingInfo,lu_comm_OrderPreview,lu_comm_Confirmation"
+							 templates="in-commerce/checkout/shop_cart,
+							 			in-commerce/checkout/shipping,
+							 			in-commerce/checkout/billing,
+							 			in-commerce/checkout/preview,
+							 			in-commerce/checkout/confirmation" />
+
+				<inp2:m_else/>
+
+					<inp2:ord_CheckoutSteps render_as="checkout_step" passed_step_render_as="passed_checkout_step"
+							 current_step_render_as="current_checkout_step"
+							 steps="lu_ShoppingCart,lu_comm_BillingInfo,lu_comm_OrderPreview,lu_comm_Confirmation"
+							 templates="in-commerce/checkout/shop_cart,
+							 			in-commerce/checkout/billing,
+							 			in-commerce/checkout/preview,
+							 			in-commerce/checkout/confirmation" />
+
+				</inp2:m_if>
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/checkout_steps.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/billing_options.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/billing_options.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/billing_options.tpl	(revision 12131)
@@ -0,0 +1,220 @@
+<inp2:m_DefineElement name="order_payment_type">
+	<option <inp2:m_param name="selected"/> value="<inp2:m_param name="key"/>"><inp2:m_param name="option"/></option>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="order_option_item">
+	<option value="<inp2:m_param name="key"/>"<inp2:m_param name="selected"/>><inp2:m_param name="option"/></option>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="order_payment_credit_card">
+	<table class="block-no-border">
+		<tr class="cart-header">
+			<td>
+				<inp2:ord_PaymentTypeDescription/>
+			</td>
+		</tr>
+		<tr class="block-data">
+			<td>
+				<br/>
+				<inp2:m_if check="ord_HasGatewayError">
+					<table class="warning">
+						<tr>
+							<td valign="top" align="left" class="block-data">
+								<img src="img/message.gif" alt="" width="19" height="19" />
+								<span class="warning-text"><inp2:m_Phrase label="lu_Warning"/></span><br />
+								<inp2:ord_ShowGatewayError/>
+
+							</td>
+						</tr>
+					</table>
+				</inp2:m_if>
+				<inp2:ord_PaymentTypeInstructions/>
+				<br/>
+			</td>
+		</tr>
+
+		<tr class="form-data">
+			<td>
+				<table class="form-data">
+					<tr>
+						<td>
+							<strong><inp2:m_Phrase label="lu_billing_CardType" />:</strong>
+						</td>
+						<td>
+							<select name="<inp2:ord_InputName field="PaymentCardType"/>" style="width:150px;">
+								<inp2:ord_PredefinedOptions field="PaymentCardType" render_as="order_option_item" selected="selected"/>
+							</select>
+						</td>
+						<td class="error"><inp2:ord_Error field="PaymentCardType"/></td>
+					</tr>
+					<tr>
+						<td>
+							<strong><inp2:m_Phrase label="lu_billing_CreditCardNumber" />:</strong>
+						</td>
+						<td>
+							<input type="text" name="<inp2:ord_InputName field="PaymentAccount"/>" value="<inp2:ord_Field field="PaymentAccount"/>" style="width: 200px;">
+						</td>
+						<td class="error"><inp2:ord_Error field="PaymentAccount"/></td>
+					</tr>
+					<tr>
+						<td>
+							<strong><inp2:m_Phrase label="lu_billing_NameOnCard" />:</strong>
+						</td>
+						<td>
+							<input type="text" name="<inp2:ord_InputName field="PaymentNameOnCard"/>" value="<inp2:ord_Field field="PaymentNameOnCard"/>" style="width: 260px;">
+						</td>
+						<td class="error"><inp2:ord_Error field="PaymentNameOnCard"/></td>
+					</tr>
+					<tr>
+						<td>
+							<strong><inp2:m_Phrase label="lu_billing_CardExpiration" />:</strong>
+						</td>
+						<td>
+							<select name="<inp2:ord_InputName field="PaymentCCExpMonth"/>">
+								<inp2:ord_PredefinedOptions field="PaymentCCExpMonth" render_as="order_option_item" selected="selected"/>
+							</select>
+							/
+							<select name="<inp2:ord_InputName field="PaymentCCExpYear"/>">
+								<option value=''></option>
+								<inp2:ord_PrintYearOptions field="PaymentCCExpYear" render_as="order_option_item" selected="selected"/>
+							</select>
+						</td>
+						<td class="error"><inp2:ord_Error field="PaymentCCExpDate"/></td>
+					</tr>
+					<tr>
+						<td>
+							<strong><inp2:m_Phrase label="lu_billing_CVV2" />:</strong>
+						</td>
+						<td>
+							<input type="text" name="<inp2:ord_InputName field="PaymentCVV2"/>" style="width: 50px;">
+							&nbsp;&nbsp;<a href="javascript:showCVV2Help()"><inp2:m_Phrase label="lu_WhatIsThis" /></a>
+						</td>
+						<td class="error"><inp2:ord_Error field="PaymentCVV2"/></td>
+					</tr>
+				</table>
+			</td>
+		</tr>
+	</table>
+	<script language="JavaScript">
+	function showCVV2Help(){
+		window.open('<inp2:m_Link template="in-commerce/checkout/cvv2help" />', null, 'scrollbars=no,menubar=no,toolbars=no,width=300,height=150');
+	}
+	</script>
+	<br />
+	<input type="hidden" name="check_credit_card" value="true"/>
+	<input type="hidden" name="preview_template" value="in-commerce/checkout/preview">
+	<div style="text-align: right; width: 100%">
+		<input class="button" type="submit" name="events[ord][OnProceedToPreview]" value="<inp2:m_phrase label="lu_btn_ProceedToPreview"/>">
+	</div>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="order_payment_type_default">
+	<table>
+		<tr class="cart-header">
+			<td>
+				<inp2:ord_PaymentTypeDescription/>
+			</td>
+		</tr>
+		<tr class="form-data">
+			<td>
+				<inp2:m_if check="ord_HasGatewayError">
+					<table class="warning">
+						<tr>
+							<td valign="top" align="left" class="block-data">
+								<img src="img/message.gif" alt="" width="19" height="19" />
+								<span class="warning-text"><inp2:m_Phrase label="lu_Warning"/></span><br />
+								<inp2:ord_ShowGatewayError/>
+							</td>
+						</tr>
+					</table>
+				</inp2:m_if>
+				<br/>
+				<inp2:ord_PaymentTypeInstructions/>
+				<br/>
+			</td>
+		</tr>
+	</table>
+	<br/>
+	<input type="hidden" name="preview_template" value="in-commerce/checkout/preview">
+	<div style="text-align: right; width: 100%">
+		<input class="button" type="submit" name="events[ord][OnProceedToPreview]" value="<inp2:m_phrase label="lu_btn_ProceedToPreview"/>">
+	</div>
+</inp2:m_DefineElement>
+
+<table border="0" cellspacing="0" cellpadding="0" class="block-no-border">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_comm_BillingOptions"/></td>
+	</tr>
+	<tr>
+		<td class="block-data">
+
+			<table class="">
+				<tr class="cart-header">
+					<td>
+						Cost Summary
+					</td>
+				</tr>
+			</table>
+
+			<table class="form-data">
+				<inp2:m_DefineElement name="products_total">
+						<tr>
+							<td><inp2:m_Phrase label="lu_comm_ProductsTotal"/>:</td>
+							<td><inp2:ord_Field name="SubTotal" currency="selected"/></td>
+						</tr>
+				</inp2:m_DefineElement>
+
+				<inp2:m_DefineElement name="shipping_total">
+						<tr>
+							<td><inp2:m_Phrase label="lu_comm_ShippingCost"/> (<inp2:ord_ShippingType />):</td>
+							<td><inp2:ord_Field name="ShippingCost" currency="selected"/></td>
+						</tr>
+				</inp2:m_DefineElement>
+
+				<inp2:m_DefineElement name="processing_total">
+						<tr>
+							<td><inp2:m_Phrase label="lu_comm_ProcessingFee"/>: </td>
+							<td><inp2:ord_Field name="ProcessingFee" currency="selected"/></td>
+						</tr>
+				</inp2:m_DefineElement>
+
+				<inp2:m_DefineElement name="sub_total">
+					<tr>
+						<td><inp2:m_Phrase label="lu_comm_SubTotal"/>: </td>
+						<td><inp2:ord_Field name="AmountWithoutVAT" currency="selected"/></td>
+					</tr>
+				</inp2:m_DefineElement>
+
+				<inp2:m_DefineElement name="vat_total">
+						<tr>
+							<td><inp2:m_Phrase label="lu_comm_VAT"/> <inp2:ord_Field name="VATPercent"/>%: </td>
+							<td><inp2:ord_Field name="VAT" currency="selected"/></td>
+						</tr>
+				</inp2:m_DefineElement>
+
+				<inp2:ord_PrintTotals
+					products_render_as="products_total"
+					shipping_render_as="shipping_total"
+					processing_render_as="processing_total"
+					sub_total_render_as="sub_total"
+					vat_render_as="vat_total"/>
+
+				<tr>
+				  <td class="price3" ><strong><inp2:m_Phrase label="lu_comm_GrandTotal"/>:</strong></td>
+					<td class="price3" ><span class="price1"><inp2:ord_Field name="TotalAmount" currency="selected"/></span></td>
+				</tr>
+			</table>
+
+			<hr/>
+
+			<br />
+			<strong><inp2:m_Phrase label="lu_comm_PaymentType"/>:</strong>
+			<select name="<inp2:ord_InputName field="PaymentType"/>" onchange="document.getElementById('events[ord][OnUpdate]').click();">
+				<inp2:ord_PredefinedOptions render_as="order_payment_type" field="PaymentType" selected="selected"/>
+			</select>
+			&nbsp;<input class="button" type="submit" value="<inp2:m_Phrase label="lu_comm_Select"/>" name="events[ord][OnUpdate]" id="events[ord][OnUpdate]">
+			<br/><br/>
+			<inp2:ord_PaymentTypeForm cc_render_as="order_payment_credit_card" default_render_as="order_payment_type_default"/>
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/billing_options.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.13
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/form_register.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/form_register.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/form_register.tpl	(revision 12131)
@@ -0,0 +1,214 @@
+<inp2:m_DefineElement name="destination">
+	<option value="<inp2:m_param name="key"/>"<inp2:m_param name="selected"/>><inp2:m_param name="option"/></option>
+</inp2:m_DefineElement>
+
+<inp2:m_if check="u_SuggestRegister">
+	<form method="post" action="<inp2:m_FormAction />">
+	
+	<table class="block-no-border">
+		<tr>
+			<td class="block-header">
+				<inp2:m_Phrase label="lu_comm_Registration"/>
+			</td>
+		</tr>
+		<tr>
+			<td class="block-data">
+					<inp2:m_if check="u_HasError" field="any">
+						<table class="warning">
+							<tr>
+								<td valign="top" align="left" class="block-data">
+									<img src="img/message.gif" alt="" width="19" height="19" />
+									<span class="warning-text"><inp2:m_Phrase label="lu_Warning"/></span><br />
+									<inp2:m_Phrase label="lu_AProblemInForm"/>
+								</td>
+							</tr>
+						</table>
+					</inp2:m_if>
+					<inp2:m_Phrase label="lu_SuggestRegister"/>
+					<br>
+					<br>
+					<strong>* <inp2:m_Phrase label="lu_IndicatesRequired"/>.</strong> 	<br /><br />
+					<inp2:ord_PrefillRegistrationFields type="billing"/>
+					<table class="form-data">
+						<inp2:m_if check="u_UseUsernames">
+						<tr>
+							<td>
+								<strong><inp2:m_phrase label="lu_select_username"/>*:</strong>
+							</td>
+							<td>
+								<input type="text" name="<inp2:u_InputName field="Login"/>" value="<inp2:u_Field name="Login"/>" style="width: 300px;" />
+							</td>
+							<td class="error"><inp2:u_Error field="Login"/></td>
+						</tr>
+						</inp2:m_if>
+						<tr>
+							<td>
+								<strong><inp2:m_phrase label="lu_email"/>*:</strong>
+							</td>
+							<td>
+								<input type="text" name="<inp2:u_InputName field="Email"/>" value="<inp2:u_Field name="Email" />" style="width: 300px;" />
+							</td>
+							<td class="error"><inp2:u_Error field="Email"/></td>
+						</tr>
+						<tr>
+							<td>
+								<strong><inp2:m_phrase label="lu_create_password"/>*:</strong>
+							</td>
+							<td>
+								<input type="password" name="<inp2:u_InputName field="Password"/>" value="" style="width: 300px;" />
+							</td>
+							<td class="error"><inp2:u_Error field="Password"/></td>
+						</tr>
+						<tr>
+							<td>
+								<strong><inp2:m_phrase label="lu_repeat_password"/>*:</strong>
+							</td>
+							<td>
+								<input type="password" name="<inp2:u_InputName field="VerifyPassword"/>" value="" style="width: 300px;" />
+							</td>
+							<td class="error"><inp2:u_Error field="VerifyPassword"/></td>
+						</tr>
+					
+						<tr> 
+							<td class="block-data">
+								<strong><inp2:m_phrase label="lu_birth_date"/>*:</strong><br>
+							</td> 
+							<td class="block-data">
+								<script src="inc/calendar.js"></script>
+								<input type="text" name="<inp2:u_InputName field="dob_date"/>" id="<inp2:u_InputName field="dob_date"/>" value="<inp2:u_Field name="dob_date" format="_regional_InputDateFormat"/>" style="width: 100px;" datepickerIcon="img/calendar.gif"/>
+								<script type="text/javascript">
+									initCalendar('<inp2:u_InputName field="dob_date"/>', "<inp2:u_Format input_format="1" field="dob_date"/>");
+								</script>
+								(<inp2:u_Format field="dob_date" input_format="1" human="true"/>, ex. <inp2:u_Format field="dob_date" sample="true"/>)
+							</td>
+							<td class="error"><inp2:u_Error field="dob_date"/></td>
+						</tr>	
+						
+						<tr>
+							<td>
+								<strong><inp2:m_phrase label="lu_first_name"/>:</strong>
+							</td>
+							<td>
+								<input type="text" name="<inp2:u_InputName field="FirstName"/>" value="<inp2:u_Field name="FirstName"/>" style="width: 300px;" />
+							</td>
+							<td class="error"><inp2:u_Error field="FirstName"/></td>
+						</tr>
+						
+						<tr>
+							<td>
+								<strong><inp2:m_phrase label="lu_last_name"/>:</strong>
+							</td>
+							<td>
+								<input type="text" name="<inp2:u_InputName field="LastName"/>" value="<inp2:u_Field name="LastName"/>" style="width: 300px;" />
+							</td>
+							<td class="error"><inp2:u_Error field="LastName"/></td>
+						</tr>
+						
+						<tr>
+							<td>
+								<strong><inp2:m_phrase label="lu_company"/>:</strong>
+							</td>
+							<td>
+								<input type="text" name="<inp2:u_InputName field="Company"/>" value="<inp2:u_Field name="Company"/>" style="width: 300px;" />
+							</td>
+							<td class="error"><inp2:u_Error field="Company"/></td>
+						</tr>
+						
+						<tr>
+							<td>
+								<strong><inp2:m_phrase label="lu_address_line"/> 1:</strong>
+							</td>
+							<td>
+								<input type="text" name="<inp2:u_InputName field="Street"/>" value="<inp2:u_Field name="Street"/>" style="width: 300px;" />
+							</td>
+							<td class="error"><inp2:u_Error field="Street"/></td>
+						</tr>
+						
+						<tr>
+							<td>
+								<strong><inp2:m_phrase label="lu_address_line"/> 2:</strong>
+							</td>
+							<td>
+								<input type="text" name="<inp2:u_InputName field="Street2"/>" value="<inp2:u_Field name="Street2"/>" style="width: 300px;" />
+							</td>
+							<td class="error"><inp2:u_Error field="Street2"/></td>
+						</tr>
+						
+						<tr>
+							<td>
+								<strong><inp2:m_phrase label="lu_city"/>:</strong>
+							</td>
+							<td>
+								<input type="text" name="<inp2:u_InputName field="City"/>" value="<inp2:u_Field name="City"/>" style="width: 200px;" />
+							</td>
+							<td class="error"><inp2:u_Error field="City"/></td>
+						</tr>
+						<tr>
+							<td>
+								<strong><inp2:m_phrase label="lu_state"/>:</strong>
+							</td>
+							<td>
+								<input type="text" name="<inp2:u_InputName field="State"/>" value="<inp2:u_Field name="State"/>" style="width: 200px;" />
+							</td>
+							<td class="error"><inp2:u_Error field="State"/></td>
+						</tr>						
+						<tr>
+							<td>
+								<strong><inp2:m_phrase label="lu_zip_code"/>:</strong>
+							</td>
+							<td>
+								<input type="text" name="<inp2:u_InputName field="Zip"/>" value="<inp2:u_Field name="Zip"/>" style="width: 100px;" />
+							</td>
+							<td class="error"><inp2:u_Error field="Zip"/></td>
+						</tr>
+						<tr>
+							<td>
+								<strong><inp2:m_phrase label="lu_country"/>:</strong>
+							</td>
+							<td>
+								<select name="<inp2:u_InputName field="Country"/>" style="width: 300px;">
+									<option value=""></option>
+									<inp2:u_PredefinedOptions field="Country" render_as="destination" selected_param="selected" selected="selected=\"selected\""/>
+								</select>
+							</td>
+							<td class="error"><inp2:u_Error field="Country"/></td>
+						</tr>
+						
+						<tr>
+							<td>
+								<strong><inp2:m_phrase label="lu_phone"/>:</strong>
+							</td>
+							<td>
+								<input type="text" name="<inp2:u_InputName field="Phone"/>" value="<inp2:u_Field name="Phone"/>" style="width: 150px;" />
+							</td>
+							<td class="error"><inp2:u_Error field="Phone"/></td>
+						</tr>
+						
+						<tr>
+							<td>
+								<strong><inp2:m_phrase label="lu_fax"/>:</strong>
+							</td>
+							<td>
+								<input type="text" name="<inp2:u_InputName field="Fax"/>" value="<inp2:u_Field name="Fax"/>" style="width: 150px;" />
+							</td>
+							<td class="error"><inp2:u_Error field="Fax"/></td>
+						</tr>
+						
+						<tr>
+							<td colspan="3" valign="bottom" height="35">
+								<input type="hidden" name="next_template" value="<inp2:m_get var="next_template"/>">
+								<input type="hidden" name="registration_confirm_template" value="platform/login/register_confirm">
+								<input type="hidden" name="registration_confirm_pending_template" value="platform/login/register_confirm_pending">
+								
+								<input type="hidden" name="fields_prefilled" value="1" />
+								
+								<input class="button" type="submit" id="events[u][OnCreate]" name="events[u][OnCreate]" value="<inp2:m_phrase label="lu_Register"/>"/>
+							</td>
+						</tr>
+					</table>
+			</td>
+		</tr>
+	</table>
+	
+	</form>
+</inp2:m_if>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/form_register.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.10
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/thank_you.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/thank_you.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/thank_you.tpl	(revision 12131)
@@ -0,0 +1,14 @@
+<table class="block-no-border">
+	<tr>
+		<td class="block-header">
+			<inp2:m_Phrase label="lu_comm_OrderCompleted"/>
+		</td>
+	</tr>
+	<tr>
+		<td class="block-data">
+			<inp2:m_Phrase label="lu_comm_ThankYou"/>!<br/>
+			<br/>
+			<inp2:m_Phrase label="lu_comm_OrderSuccessfullyPlaced"/>
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/thank_you.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/register.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/register.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/register.tpl	(revision 12131)
@@ -0,0 +1,75 @@
+
+<form method="post" action="<inp2:m_FormAction />">
+<table class="block-no-border">
+	<tr>
+		<td class="block-header">
+			<inp2:m_Phrase label="lu_comm_NewCustomers"/>
+		</td>
+	</tr>
+	<tr>
+		<td class="block-data">
+				<inp2:m_if check="u_HasError" field="any">
+					<table class="warning">
+						<tr>
+							<td valign="top" align="left" class="block-data">
+								<img src="img/message.gif" alt="" width="19" height="19" />
+								<span class="warning-text"><inp2:m_Phrase label="lu_Warning"/></span><br />
+								<inp2:m_Phrase label="lu_AProblemWithForm"/>
+								
+							</td>
+						</tr>
+					</table>
+				</inp2:m_if>
+				<inp2:m_Phrase label="lu_comm_PleaseRegister"/>... <br />
+				<inp2:m_Phrase label="lu_comm_PleaseEnterFollowing"/>:<br />
+				<br />
+				<strong>* <inp2:m_Phrase label="lu_IndicatesRequired"/>.</strong> 	<br /><br />
+				<table class="form-data">
+					<inp2:m_if check="u_UseUsernames">
+					<tr>
+						<td>
+							<strong><inp2:m_phrase label="lu_select_username"/>*:</strong>
+						</td>
+						<td>
+							<input type="text" name="<inp2:u_InputName field="Login"/>" value="<inp2:u_Field name="Login"/>" style="width: 300px;" />
+						</td>
+						<td width="170" class="error"><inp2:u_Error field="Login"/></td>
+					</tr>
+					</inp2:m_if>
+					<tr>
+						<td>
+							<strong><inp2:m_phrase label="lu_your_email"/>*:</strong>
+						</td>
+						<td>
+							<input type="text" name="<inp2:u_InputName field="Email"/>" value="<inp2:u_Field name="Email"/>" style="width: 300px;" />
+						</td>
+						<td width="170" class="error"><inp2:u_Error field="Email"/></td>
+					</tr>
+					<tr>
+						<td>
+							<strong><inp2:m_phrase label="lu_create_password"/>*:</strong>
+						</td>
+						<td>
+							<input type="password" name="<inp2:u_InputName field="Password"/>" value="" style="width: 300px;" />
+						</td>
+						<td class="error"><inp2:u_Error field="Password"/></td>
+					</tr>
+					<tr>
+						<td>
+							<strong><inp2:m_phrase label="lu_repeat_password"/>*:</strong>
+						</td>
+						<td>
+							<input type="password" name="<inp2:u_InputName field="VerifyPassword"/>" value="" style="width: 300px;" />
+						</td>
+						<td class="error"><inp2:u_Error field="VerifyPassword"/></td>
+					</tr>
+					<tr>
+						<td colspan="3" valign="bottom" height="35">
+							<input class="button" type="submit" id="events[u][OnCreate]" name="events[u][OnCreate]" value="<inp2:m_phrase label="lu_Register"/>"/>
+						</td>
+					</tr>
+				</table>
+		</td>
+	</tr>
+</table>
+</form>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/checkout/register.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/product_details.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/product_details.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/product_details.tpl	(revision 12131)
@@ -0,0 +1,237 @@
+<inp2:m_DefineElement name="product_edpick_mark">
+	<img src="in-commerce/img/edpick.gif" alt="<inp2:m_Phrase label="lu_comm_EditorsPick"/>"> <inp2:m_Phrase label="lu_comm_EditorsPick"/>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="product_new_mark">
+	<img src="in-commerce/img/new.gif" alt="<inp2:m_Phrase label="lu_comm_New"/>"> <inp2:m_Phrase label="lu_comm_New"/>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="product_pop_mark">
+	<img src="in-commerce/img/toprated.gif" alt="<inp2:m_Phrase label="lu_comm_Pop"/>"> <inp2:m_Phrase label="lu_comm_Pop"/>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="product_topseller_mark">
+	<img src="in-commerce/img/topseller.gif" alt="<inp2:m_Phrase label="lu_comm_TopSeller"/>"> <inp2:m_Phrase label="lu_comm_TopSeller"/>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="product_star_on">
+	<img src="img/star_rate.gif" alt="">
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="product_star_off">
+	<img src="img/star.gif" alt="" width="11" height="11">
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="product_image">
+	<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" /><br/>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="imageLB"><inp2:m_param name="img_path" /></inp2:m_DefineElement>
+
+<table border="0" cellspacing="0" cellpadding="0" class="block-no-border">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_comm_ProductDetails"/></td>
+	</tr>
+	<tr>
+		<td class="block-data-single">
+			<table style="vertical-align: top; float: top;">
+				<tr>
+					<td style="text-align: center; width: 200px; padding-right: 10px;">
+						<inp2:m_if check="p_ImageSrc" MaxWidth="fullsize">
+							<a href="<inp2:p_Image render_as="imageLB" />" rel="lightbox" target="_blank"><inp2:p_Image render_as="product_image" DefaultImage="in-commerce/img/no_picture.gif" MaxWidth="250" DefaultWidth="250" /></a><br /><br />
+							<a href="<inp2:p_Image render_as="imageLB" />" rel="lightbox" target="_blank"><img src="img/zoom.gif" alt="" border="0"></a>
+							<a href="<inp2:p_Image render_as="imageLB" />" rel="lightbox" target="_blank"><inp2:m_Phrase label="lu_comm_ZoomImage"/></a>
+								<!--## Check if image exists ##-->
+						<inp2:m_else/>
+							<inp2:p_Image render_as="product_image" Primary="1" MaxWidth="thumbnail" DefaultWidth="150" DefaultImage="platform/img/no_picture.gif" align="center"/><br />
+						</inp2:m_if>
+						<inp2:m_if check="p_HasAdditionalImages">
+							&nbsp;&nbsp;&nbsp;
+							<a href="<inp2:p_ProductLink template="__default__" />#images"><img src="img/more_images.gif" alt="" border="0"></a>
+							<a href="<inp2:p_ProductLink template="__default__" />#images"><inp2:m_Phrase label="lu_comm_MoreImages"/></a>
+						</inp2:m_if>
+						<br /><br />
+						<span class="price2"><inp2:p_Field name="Price" currency="selected"/></span>
+						<inp2:m_if check="p_Available">
+							<inp2:m_if check="p_ShouldListOptions" required_only="1"><inp2:m_else/>
+								<a href="<inp2:p_AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>" class="price2"><inp2:m_Phrase label="lu_comm_BuyNow"/></a>
+								<a href="<inp2:p_AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>"><img src="in-commerce/img/buy.gif" alt="<inp2:m_Phrase label="lu_comm_BuyNow"/>" width="23" height="23" border="0" vspace="4" /></a>
+							</inp2:m_if>
+						<inp2:m_else />
+							<strong><inp2:m_phrase label="lu_comm_outofstock"/></strong>
+						</inp2:m_if>
+					</td>
+					<td>
+						<a href="<inp2:p_ProductLink template="__default__"/>" class="link-product1"><inp2:p_field name="Name"/></a><nobr><inp2:p_Rating star_on_render_as="product_star_on" star_off_render_as="product_star_off"/></nobr><br />
+
+						<inp2:p_EdPickMark render_as="product_edpick_mark"/>&nbsp;
+						<inp2:p_TopSellerMark render_as="product_topseller_mark"/>&nbsp;
+						<inp2:p_NewMark render_as="product_new_mark"/>&nbsp;
+						<inp2:p_PopMark render_as="product_pop_mark"/>&nbsp;
+						<br />
+
+						<inp2:m_if check="p_Field" name="ManufacturerId">
+							<strong><inp2:m_Phrase label="lu_comm_Manufacturer"/>:</strong> <inp2:p_field name="ManufacturerId"/> (<inp2:m_Phrase label="lu_comm_OtherProductsBy"/> <a href="<inp2:p_ManufacturerLink template="in-commerce/store/manufacturer_products" />"><inp2:p_Field name="ManufacturerId"/></a> <inp2:m_Phrase label="lu_comm_OtherProducts"/>) <br />
+						</inp2:m_if>
+						<br />
+						<strong><inp2:m_phrase label="lu_Added"/>:</strong> <inp2:p_field field="CreatedOn_date" format="_regional_DateFormat"/><br />
+						<strong><inp2:m_phrase label="lu_Rating"/>:</strong> <inp2:p_field field="CachedRating"/> (<inp2:p_field field="CachedVotesQty"/> votes) <a href="<inp2:p_ProductLink template="in-commerce/product/rate_product" />"><inp2:m_Phrase label="lu_comm_RateThisProduct"/></a><br />
+						<strong><inp2:m_phrase label="lu_Reviews"/>:</strong> <inp2:p_ReviewCount /> <a href="<inp2:p_ProductLink />#reviews"><inp2:m_Phrase label="lu_comm_ViewReviews"/></a> | <a href="<inp2:p_ProductLink template="in-commerce/product/review_product"/>"><inp2:m_Phrase label="lu_comm_ReviewThisProduct"/></a><br /><br />
+
+						<inp2:m_if check="p_Field" name="MSRP">
+						<strong><inp2:m_Phrase label="lu_comm_MSRP"/>:</strong> <span class="price-msrp"><inp2:p_Field name="MSRP" currency="selected"/></span> <br />
+						</inp2:m_if>
+
+						<strong><inp2:m_Phrase label="lu_comm_OurPrice"/>:</strong> <span class="price1"><inp2:p_Field name="Price" currency="selected"/></span> <br />
+
+						<inp2:m_if check="p_Savings">
+						<span class="listing-field-name">
+						<inp2:m_Phrase label="lu_fld_YouSave"/>: <inp2:p_Savings currency="selected" />  (<inp2:p_Savings type="percent"/>%)
+						</span><br/>
+						</inp2:m_if>
+						<br />
+
+						<inp2:m_if check="p_CustomField" name="Availability">
+							<strong><inp2:p_CustomFieldLabel field="Availability"/>:</strong>
+							<inp2:p_CustomField name="Availability"/>
+							<br />
+							<br />
+						</inp2:m_if>
+
+
+
+						<inp2:m_if check="p_HasQuantityPricing">
+							<inp2:m_if check="p_IsTangible">
+								<table>
+									<tr>
+										<td colspan="2" class="block-header">
+											<inp2:m_Phrase label="lu_comm_QuantityPricing"/>
+										</td>
+									</tr>
+									<tr class="cart-header">
+										<td>
+											<inp2:m_Phrase label="lu_comm_Quantity"/>
+										</td>
+										<td>
+											<inp2:m_Phrase label="lu_comm_Price"/>
+										</td>
+									</tr>
+									<inp2:m_DefineElement name="price_bracket">
+										<tr class="cart-item-small">
+											<td>
+												<inp2:Field name="MinQty"/> - <inp2:Field name="MaxQty"/>
+											</td>
+											<td>
+												<inp2:m_if check="Field" name="Negotiated">
+													<a href="mailto:<inp2:conf_ConfigValue name="Comm_Contacts_Email"/>"><inp2:conf_ConfigValue name="Comm_Contacts_Email"/></a>
+												<inp2:m_else/>
+													<inp2:Field name="Price" currency="selected"/>
+												</inp2:m_if>
+											</td>
+										</tr>
+									</inp2:m_DefineElement>
+									<inp2:p_ListPriceBrackets render_as="price_bracket"/>
+								</table>
+								<br />
+							</inp2:m_if>
+							<inp2:m_if check="p_IsSubscription">
+								<table>
+									<tr>
+										<td colspan="3" class="block-header">
+											<inp2:m_Phrase label="lu_comm_Pricing"/>
+										</td>
+									</tr>
+									<tr class="cart-header">
+										<td>
+											<inp2:m_Phrase label="lu_comm_AccessDuration"/>
+										</td>
+										<td>
+											<inp2:m_Phrase label="lu_comm_Price"/>
+										</td>
+										<td>
+											&nbsp;
+										</td>
+									</tr>
+									<inp2:m_DefineElement name="access_price_bracket">
+										<tr class="cart-item-small">
+											<td>
+												<inp2:Field name="AccessDuration"/> <inp2:Field name="AccessUnit"/>
+												<br />
+												<small><inp2:Field name="Description"/></small>
+											</td>
+											<td>
+												<inp2:Field name="Price" currency="selected"/>
+											</td>
+											<td>
+												<a href="<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>"><img src="in-commerce/img/buy2.gif" alt="<inp2:m_Phrase label="lu_comm_BuyNow"/>" width="15" height="17" border="0" /></a>
+											</td>
+										</tr>
+									</inp2:m_DefineElement>
+									<inp2:p_ListPriceBrackets render_as="access_price_bracket"/>
+								</table>
+								<br />
+							</inp2:m_if>
+
+						</inp2:m_if>
+						<br />
+
+						<inp2:m_include template="in-commerce/blocks/products/form_options"/>
+
+						<strong><inp2:m_Phrase label="lu_comm_Description"/>:</strong> <inp2:p_Field name="Description"/> <br />
+						<br />
+						<inp2:m_if check="p_CustomField" name="Features">
+							<strong><inp2:p_CustomFieldLabel field="Features"/>:</strong>
+							<inp2:p_CustomField name="Features"/>
+							<br />
+							<br />
+						</inp2:m_if>
+
+						<inp2:m_if check="p_HasAdditionalImages">
+							<a name="images"></a>
+							<strong><inp2:m_Phrase label="lu_comm_Images"/>:</strong><br />
+							<br />
+							<table>
+								<inp2:m_DefineElement name="image_elem">
+									<td>
+										<a href="<inp2:p_PictureLink template="in-commerce/product/picture_fullsize.tpl" picture_list="1" />" target="_blank"><inp2:p_Image render_as="product_image" thumbnail="1" DefaultImage="in-commerce/img/no_picture_list.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120" /></a>
+										<inp2:Field name="Name"/>
+									</td>
+								</inp2:m_DefineElement>
+								<inp2:m_DefineElement name="row_start_elem"><tr></inp2:m_DefineElement>
+								<inp2:m_DefineElement name="row_end_elem"></tr></inp2:m_DefineElement>
+								<inp2:m_DefineElement name="empty_cell_elem"><td>&nbsp;</td></inp2:m_DefineElement>
+								<inp2:p_ListImages 	render_as="image_elem" per_page="-1" types="additional"
+													row_start_render_as="row_start_elem"
+													row_end_render_as="row_end_elem"
+													empty_cell_render_as="empty_cell_elem"
+													direction="H" columns="3" main_special="" />
+							</table><br />
+						</inp2:m_if>
+
+						<a name="reviews"></a>
+						<strong><inp2:m_Phrase label="lu_comm_Reviews"/>:</strong><br />
+						<a href="<inp2:p_ProductLink template="in-commerce/product/review_product"/>"><inp2:m_Phrase label="lu_comm_ReviewThisProduct"/></a><br />
+						<br />
+						<table>
+							<inp2:m_DefineElement name="review_row">
+								<tr>
+									<td>
+										<strong><inp2:m_Phrase label="lu_comm_ReviewBy"/> <inp2:Field name="ReviewedBy"/></strong>, <inp2:Field name="CreatedOn" format="_regional_DateFormat"/><br />
+										<br />
+										<inp2:field field="ReviewText"/><br />
+										<hr />
+									</td>
+								</tr>
+							</inp2:m_DefineElement>
+							<inp2:p_ListReviews render_as="review_row" per_page="-1" main_special="" />
+						</table>
+
+						<a name="related"></a>
+						<inp2:m_include template="in-commerce/blocks/products/products_related.tpl" data_exists="1"/>
+
+					</td>
+				</tr>
+			</table>
+		</td>
+	</tr>
+</table>

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/product_details.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.22.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_new.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_new.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_new.tpl	(revision 12131)
@@ -0,0 +1,39 @@
+<inp2:p_InitList list_name="list_new" types="new" except="displayed" recursive="1" per_page="short_list"/>
+
+<inp2:m_DefineElement name="new_product_image">
+	<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> style="margin-top: 10px" border="0" /><br/>
+</inp2:m_DefineElement>
+
+<table border="0" cellspacing="0" cellpadding="0" class="new-products-block">
+	<tr>
+		<td class="new-products-block-header"><inp2:m_Phrase label="lu_comm_NewProducts"/></td>
+	</tr>
+	<tr>
+		<td class="block-data">
+			<table>
+				<inp2:m_DefineElement name="new_item">
+					<td width="33%" align="center" valign="top" class="block-data">
+						<a href="<inp2:ProductLink template="__default__"/>" class="link-product2"><strong><inp2:Field field="Name" /></strong></a><br />
+						<a href="<inp2:ProductLink template="__default__"/>"><inp2:Image render_as="new_product_image" Thumbnail="1" DefaultImage="in-commerce/img/no_picture_list.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120" /></a> <br />
+
+						<inp2:m_if check="Field" name="MSRP"><strong><inp2:m_Phrase label="lu_comm_MSRP"/>: </strong><span class="price-msrp"><inp2:Field name="MSRP" currency="selected" /></span><br /></inp2:m_if>
+						<strong><inp2:m_Phrase label="lu_comm_OurPrice"/>:</strong> <span class="price1"><inp2:Field name="Price" currency="selected"/></span><br />
+						<strong><inp2:m_Phrase label="lu_comm_Added"/>:</strong> <inp2:Field name="CreatedOn" format="_regional_DateFormat"/><br />
+						<inp2:m_if check="Available">
+							<a href="<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>" class="link-product2"><strong><inp2:m_Phrase label="lu_comm_BuyNow"/></strong></a>
+							<a href="<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>"><img src="in-commerce/img/buy2.gif" alt="<inp2:m_Phrase label="lu_comm_BuyNow"/>" width="15" height="17" border="0" vspace="4" style="vertical-align:middle" /></a>
+						<inp2:m_else />
+							<strong><inp2:m_phrase label="lu_comm_outofstock"/></strong>
+						</inp2:m_if>
+					</td>
+				</inp2:m_DefineElement>
+
+				<inp2:p_ListProducts list_name="list_new" render_as="new_item" columns="3" />
+			</table>
+			<inp2:m_DefineElement name="more_link">
+				<a href="<inp2:m_Link template="in-commerce/store/new_products" />"><inp2:m_Phrase label="lu_comm_MoreLink"/>...</a>
+			</inp2:m_DefineElement>
+			<inp2:p_MoreLink list_name="list_new" render_as="more_link" />
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_new.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.8.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_featured.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_featured.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_featured.tpl	(revision 12131)
@@ -0,0 +1,60 @@
+
+<inp2:p_InitList list_name="list_featured" types="featured" except="displayed" recursive="1" per_page="1" sort_by="random"/>
+
+<inp2:m_DefineElement name="product_image">
+	<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" /><br/>
+</inp2:m_DefineElement>
+
+<table border="0" cellspacing="0" cellpadding="0" class="featured-block">
+	<tr>
+		<td class="featured-block-header"><inp2:m_Phrase label="lu_comm_Featured"/></td>
+	</tr>
+	<tr>
+		<td>
+			<table class="featured-block-data">
+				<inp2:m_DefineElement name="featured_item">
+					<td width="30%" align="center" valign="top" class="block-data">
+						<a href="<inp2:ProductLink template="__default__"/>"><inp2:Image render_as="product_image" DefaultImage="in-commerce/img/no_picture.gif" MaxWidth="250" DefaultWidth="250" /></a><br />
+						<span class="price2"><inp2:Field name="Price" currency="selected"/></span>
+						<inp2:m_if check="Available">
+							<a href="<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>" class="price2"><inp2:m_Phrase label="lu_comm_BuyNow"/></a>
+							<a href="<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>"><img src="in-commerce/img/buy.gif" alt="<inp2:m_Phrase label="lu_comm_BuyNow"/>" width="23" height="23" border="0" vspace="4" /></a>
+						<inp2:m_else />
+							<strong><inp2:m_phrase label="lu_comm_outofstock"/></strong>
+						</inp2:m_if>
+					</td>
+					<td width="70%" class="block-data">
+						<a href="<inp2:ProductLink template="__default__"/>" class="link-product1"><inp2:field name="Name"/></a><br />
+
+						<inp2:m_if check="Field" name="ManufacturerId">
+							<strong><inp2:m_Phrase label="lu_comm_Manufacturer"/>:</strong> <inp2:field name="ManufacturerId"/> (<inp2:m_Phrase label="lu_comm_OtherProductsBy"/> <a href="<inp2:ManufacturerLink template="in-commerce/store/manufacturer_products" />"><inp2:Field name="ManufacturerId"/></a> <inp2:m_Phrase label="lu_comm_OtherProducts"/>) <br />
+						</inp2:m_if>
+						<br />
+						<inp2:m_if check="Field" name="MSRP"><strong><inp2:m_Phrase label="lu_comm_MSRP"/>:</strong> <span class="price-msrp"><strong><inp2:Field name="MSRP" currency="selected"/></strong></span><br /></inp2:m_if>
+						<strong><inp2:m_Phrase label="lu_comm_OurPrice"/>:</strong> <span class="price1"><inp2:Field name="Price" currency="selected"/></span> <br />
+						<strong><inp2:m_Phrase label="lu_comm_Description"/>:</strong> <inp2:Field name="DescriptionExcerpt"/> <br />
+						<br />
+						<inp2:m_if check="CustomField" name="Availability">
+							<strong><inp2:CustomFieldLabel field="Availability"/>:</strong>
+							<inp2:CustomField name="Availability"/>
+							<br />
+							<br />
+						</inp2:m_if>
+						<inp2:m_if check="CustomField" name="Features">
+							<strong><inp2:CustomFieldLabel field="Features"/>:</strong>
+							<inp2:CustomField name="Features"/>
+							<br />
+							<br />
+						</inp2:m_if>
+					</td>
+				</inp2:m_DefineElement>
+
+				<inp2:p_ListProducts list_name="list_featured" render_as="featured_item" columns="1" />
+			</table>
+			<inp2:m_DefineElement name="more_link">
+				<a href="<inp2:m_Link template="in-commerce/store/featured_products" />"><inp2:m_Phrase label="lu_comm_MoreLink"/>...</a><br />
+			</inp2:m_DefineElement>
+			<inp2:p_MoreLink list_name="list_featured" render_as="more_link" />
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_featured.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.10.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_recent_list.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_recent_list.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_recent_list.tpl	(revision 12131)
@@ -0,0 +1,62 @@
+<inp2:p_InitList list_name="list_recent" types="recent" parent_cat_id="any" recursive="true" per_page="default" except="in_cart" />
+
+<inp2:m_DefineElement name="product_image">
+	<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" /><br/>
+</inp2:m_DefineElement>
+
+<table border="0" cellspacing="0" cellpadding="0" class="block-no-border">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_comm_RecentlyViewed"/></td>
+	</tr>
+	<tr>
+		<td class="block-data">
+
+			<table>
+		  		<tr>
+		  			<td style="width: 300px">
+		  				<inp2:m_include template="in-commerce/blocks/products/products_sorting" list_name="list_recent" />
+		  			</td>
+		  			<td style="text-align: center;">
+		  				<inp2:m_include template="in-commerce/blocks/products/products_pagination" list_name="list_recent" />
+		  			</td>
+		  		</tr>
+		  	</table>
+
+		  	<br />
+
+	  		<table>
+				<inp2:m_DefineElement name="product_row_start">
+					<tr>
+				</inp2:m_DefineElement>
+
+				<inp2:m_DefineElement name="product_elem">
+				    <td style="width: 16%; text-align: center" class="block-data">
+				    	<a href="<inp2:ProductLink template="__default__"/>"><inp2:Image render_as="product_image" thumbnail="1" DefaultImage="in-commerce/img/no_picture_list.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120" /></a>
+				    </td>
+				    <td style="width: 84%;" class="block-data">
+				    <a href="<inp2:ProductLink template="__default__"/>" class="link-product2"><strong><inp2:Field field="Name" /></strong></a>
+			    	<inp2:m_if check="Available">
+					    <a href="<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>"><img src="in-commerce/img/buy2.gif" alt="" width="15" height="17" border="0" style="vertical-align:middle" /></a>
+			    	</inp2:m_if>
+				    <br />
+				    	<inp2:m_if check="Field" name="MSRP"><strong><inp2:m_Phrase label="lu_comm_MSRP"/>:</strong> <span class="price-msrp"><inp2:Field name="MSRP" currency="selected"/></span> <br /> </inp2:m_if>
+				    	<strong><inp2:m_Phrase label="lu_comm_OurPrice"/>:</strong> <span class="price1"><inp2:Field name="Price" currency="selected"/></span> <br />
+				    	<strong><inp2:m_Phrase label="lu_comm_Description"/>:</strong> <inp2:Field name="DescriptionExcerpt"/>
+				    </td>
+				</inp2:m_DefineElement>
+
+				<inp2:m_DefineElement name="product_row_end">
+			  		</tr>
+			  		<inp2:m_if check="NotLastItem">
+					  	<tr>
+					    	<td colspan="2" style="background: #CCCCCC; height: 1px; padding: 0px"><img src="img/s.gif" alt="" width="1" height="1" /></td>
+					  	</tr>
+				  	</inp2:m_if>
+				</inp2:m_DefineElement>
+
+				<inp2:p_ListProducts list_name="list_recent" columns="1" direction="V" render_as="product_elem" row_start_render_as="product_row_start" row_end_render_as="product_row_end" empty_cell_render_as="product_empty_cell" />
+			</table>
+
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_recent_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_new_list.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_new_list.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_new_list.tpl	(revision 12131)
@@ -0,0 +1,62 @@
+<inp2:p_InitList list_name="list_new" per_page="default" types="new" except="displayed" recursive="true" />
+
+<inp2:m_DefineElement name="product_image">
+	<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" /><br/>
+</inp2:m_DefineElement>
+
+<table border="0" cellspacing="0" cellpadding="0" class="block-no-border">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_comm_NewProducts"/></td>
+	</tr>
+	<tr>
+		<td class="block-data">
+
+			<table>
+		  		<tr>
+		  			<td style="width: 300px">
+		  				<inp2:m_include template="in-commerce/blocks/products/products_sorting" list_name="list_new" />
+		  			</td>
+		  			<td style="text-align: center;">
+		  				<inp2:m_include template="in-commerce/blocks/products/products_pagination" list_name="list_new" />
+		  			</td>
+		  		</tr>
+		  	</table>
+
+		  	<br />
+
+	  		<table>
+				<inp2:m_DefineElement name="product_row_start">
+					<tr>
+				</inp2:m_DefineElement>
+
+				<inp2:m_DefineElement name="product_elem">
+				    <td style="width: 16%; text-align: center" class="block-data">
+				    	<a href="<inp2:ProductLink template="__default__"/>"><inp2:Image render_as="product_image" thumbnail="1" DefaultImage="in-commerce/img/no_picture_list.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120" /></a>
+				    </td>
+				    <td style="width: 84%;" class="block-data">
+				    <a href="<inp2:ProductLink template="__default__"/>" class="link-product2"><strong><inp2:Field field="Name" /></strong></a>
+			    	<inp2:m_if check="Available">
+					    <a href="<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>"><img src="in-commerce/img/buy2.gif" alt="" width="15" height="17" border="0" style="vertical-align:middle" /></a>
+			    	</inp2:m_if>
+				    <br />
+				    	<inp2:m_if check="Field" name="MSRP"><strong><inp2:m_Phrase label="lu_comm_MSRP"/>:</strong> <span class="price-msrp"><inp2:Field name="MSRP" currency="selected"/></span> <br /> </inp2:m_if>
+				    	<strong><inp2:m_Phrase label="lu_comm_OurPrice"/>:</strong> <span class="price1"><inp2:Field name="Price" currency="selected"/></span> <br />
+				    	<strong><inp2:m_Phrase label="lu_comm_Description"/>:</strong> <inp2:Field name="DescriptionExcerpt"/>
+				    </td>
+				</inp2:m_DefineElement>
+
+				<inp2:m_DefineElement name="product_row_end">
+			  		</tr>
+			  		<inp2:m_if check="NotLastItem">
+					  	<tr>
+					    	<td colspan="2" style="background: #CCCCCC; height: 1px; padding: 0px"><img src="img/s.gif" alt="" width="1" height="1" /></td>
+					  	</tr>
+				  	</inp2:m_if>
+				</inp2:m_DefineElement>
+
+				<inp2:p_ListProducts list_name="list_new" columns="1" direction="V" render_as="product_elem" row_start_render_as="product_row_start" row_end_render_as="product_row_end" empty_cell_render_as="product_empty_cell" />
+			</table>
+
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_new_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_search_results.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_search_results.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_search_results.tpl	(revision 12131)
@@ -0,0 +1,143 @@
+<inp2:m_DefineElement name="product_image">
+	<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" style="margin: 2px;"/><br/>
+</inp2:m_DefineElement>
+
+<inp2:p_InitList list_name="search_results" types="search" parent_cat_id="any" recursive="true" per_page="default" />
+
+<table border="0" cellspacing="0" cellpadding="0" class="block-no-border">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_comm_SearchResults"/> (<inp2:p_TotalRecords list_name="search_results" />)</td>
+	</tr>
+	<tr>
+		<td class="block-data">
+				<span style="text-align: center">
+					<form name="subsearch_form" id="subsearch_form" method="POST" action="<inp2:m_link template="in-commerce/store/search_results" />">
+						<input type="text" name="keywords" id="keywords" style="width: 300px" value="<inp2:p_SearchKeywords />" />&nbsp;
+						<input type="hidden" name="search_type" value="subsearch" />
+						<input class="button" type="submit" value="<inp2:m_Phrase label="lu_comm_SearchInResults"/>" />
+					</form>
+				</span>
+				<br/>
+				<inp2:m_if check="m_ModuleEnabled" module="In-Edit">
+					<inp2:m_include template="in-edit/blocks/search_short_results"/>
+				</inp2:m_if>
+			<inp2:m_if check="p_TotalRecords" list_name="search_results">
+				<br />
+				<table>
+					<tr>
+						<td style="width: 300px">
+							<inp2:m_include template="in-commerce/blocks/products/products_sorting" list_name="search_results" />
+						</td>
+						<td style="text-align: center;">
+							<inp2:m_include template="in-commerce/blocks/products/products_pagination" list_name="search_results" />
+						</td>
+					</tr>
+				</table>
+				<br />
+
+				<table>
+					<inp2:m_DefineElement name="product_row_start">
+						<tr>
+					</inp2:m_DefineElement>
+
+					<inp2:m_DefineElement name="product_search_relevance_normal">
+						<small><inp2:m_Phrase label="lu_comm_Relevance"/>:</small><br/>
+						<table class="relevance-bar" width="70" height="5" align="right">
+							<tr>
+								<td width="<inp2:m_param name="percent_on" />%" bgcolor="<inp2:m_param name="on_color" />"><img src="img/s.gif"></td>
+								<td width="<inp2:m_param name="percent_off" />%" bgcolor="<inp2:m_param name="off_color" />"><img src="img/s.gif"></td>
+							</tr>
+						</table>
+					</inp2:m_DefineElement>
+
+					<inp2:m_DefineElement name="product_search_relevance_full">
+						<small>Relevance:</small><br/>
+						<table class="relevance-bar" width="70" height="5" align="right">
+							<tr>
+								<td width="100%" bgcolor="<inp2:m_param name="on_color" />"><img src="img/s.gif"></td>
+							</tr>
+						</table>
+					</inp2:m_DefineElement>
+
+					<inp2:m_DefineElement name="product_search_highlight_opening"><span style="background: yellow"></inp2:m_DefineElement>
+
+					<inp2:m_DefineElement name="product_search_highlight_closing"></span></inp2:m_DefineElement>
+
+					<inp2:m_DefineElement name="product_elem">
+						<td width="16%" align="center" valign="top" class="block-data">
+							<inp2:RelevanceIndicator on_color="Red" off_color="White" relevance_normal_render_as="product_search_relevance_normal" relevance_full_render_as="product_search_relevance_full" /><br/>
+							<a href="<inp2:ProductLink template="__default__"/>"><inp2:Image render_as="product_image" thumbnail="1" DefaultImage="in-commerce/img/no_picture_list.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120" /></a>
+						</td>
+						<td width="84%" class="block-data">
+							<a href="<inp2:ProductLink template="__default__"/>" class="link-product2"><strong><inp2:SearchResultField field="Name" highlight_opening_render_as="product_search_highlight_opening" highlight_closing_render_as="product_search_highlight_closing" /></strong></a>
+							<inp2:m_if check="Available">
+								<a href="<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>"><img src="in-commerce/img/buy2.gif" alt="" width="15" height="17" border="0" style="vertical-align:middle" /></a>
+							</inp2:m_if>
+							<br />
+							<inp2:m_if check="Field" name="MSRP"><strong><inp2:m_Phrase label="lu_comm_MSRP"/>:</strong> <span class="price-msrp"><inp2:Field name="MSRP" currency="selected"/></span> <br /> </inp2:m_if>
+							<strong><inp2:m_Phrase label="lu_comm_OurPrice"/>:</strong> <span class="price1"><inp2:Field name="Price" currency="selected"/></span> <br />
+							<strong><inp2:m_Phrase label="lu_comm_Description"/>:</strong> <inp2:SearchResultField field="DescriptionExcerpt" highlight_opening_render_as="product_search_highlight_opening" highlight_closing_render_as="product_search_highlight_closing" />
+						</td>
+					</inp2:m_DefineElement>
+
+				 	<inp2:m_DefineElement name="product_row_end">
+						</tr>
+						<inp2:m_if check="NotLastItem">
+							<tr>
+								<td colspan="2" style="background: #CCCCCC; height: 1px; padding: 0px"><img src="img/s.gif" alt="" width="1" height="1" /></td>
+							</tr>
+						</inp2:m_if>
+					</inp2:m_DefineElement>
+					<inp2:p_ListProducts list_name="search_results" columns="1" direction="V" render_as="product_elem" row_start_render_as="product_row_start" row_end_render_as="product_row_end" empty_cell_render_as="product_empty_cell" />
+				</table>
+			<inp2:m_else />
+
+				<inp2:m_DefineElement name="product_keywords_too_short">
+					<table class="warning">
+						<tr>
+							<td valign="top" align="left" class="block-data">
+								<img src="img/message.gif" alt="" width="19" height="19" />
+								<span class="warning-text"><inp2:m_Phrase label="lu_Warning"/></span><br />
+								<inp2:m_Phrase label="lu_comm_KeywordsTooShort"/>!!!
+							</td>
+						</tr>
+					</table>
+				</inp2:m_DefineElement>
+
+				<inp2:m_DefineElement name="product_no_found">
+					<table class="warning">
+						<tr>
+							<td valign="top" align="left" class="block-data">
+								<img src="img/message.gif" alt="" width="19" height="19" />
+								<span class="warning-text"><inp2:m_Phrase label="lu_Warning"/></span><br />
+								<inp2:m_Phrase label="lu_comm_NoProductsFound"/>!
+
+							</td>
+						</tr>
+					</table>
+				</inp2:m_DefineElement>
+
+				<inp2:m_DefineElement name="adv_search_error">
+					<table class="warning">
+						<tr>
+							<td valign="top" align="left" class="block-data">
+								<img src="img/message.gif" alt="" width="19" height="19" />
+								<span class="warning-text"><inp2:m_Phrase label="lu_Warning"/></span><br />
+								<inp2:m_Phrase label="lu_comm_NoCriteriaEntered"/>
+
+							</td>
+						</tr>
+					</table>
+				</inp2:m_DefineElement>
+				<tr>
+					<td>
+						<inp2:p_ErrorMessage keywords_too_short_render_as="product_keywords_too_short" adv_search_error_render_as="adv_search_error" no_found_render_as="product_no_found" /><br />
+						<inp2:m_Phrase label="lu_comm_TryRecomendedProductd"/>.
+						<br /><br />
+						<inp2:m_include template="in-commerce/blocks/products/products_picks" />
+					</td>
+				</tr>
+			</inp2:m_if>
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_search_results.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/form_options.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/form_options.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/form_options.tpl	(revision 12131)
@@ -0,0 +1,148 @@
+
+
+
+
+<inp2:m_if check="p_ShouldListOptions">
+		<form name="add_to_cart" method="post" id="add_to_cart" action="<inp2:m_link pass="all,p"/>">
+		<input type="hidden" name="events[ord]" id="events[ord]" value="OnAddToCart">
+		<input type="hidden" name="m_t" value="in-commerce/checkout/shop_cart">
+		<input type="hidden" name="p_id" value="<inp2:p_Field name="ProductId"/>">
+		<input type="hidden" name="product_details_template" value="<inp2:m_Get var="t"/>">
+		<input type="hidden" name="shop_cart_template" value="in-commerce/checkout/shop_cart">
+
+	<inp2:m_if check="p_OptionsHaveError">
+		<table class="warning">
+			<tr>
+				<td valign="top" align="left" class="block-data">
+					<img src="img/message.gif" alt="" width="19" height="19" />
+					<span class="warning-text"><inp2:m_Phrase label="lu_Warning"/></span><br />
+					<inp2:p_OptionsError required="lu_comm_OptionsRequired" not_available="lu_comm_OptionsNotAvailable"/>
+				</td>
+			</tr>
+		</table>
+	</inp2:m_if>
+
+	<inp2:m_if check="p_FieldEquals" field="OptionsSelectionMode" value="1"> <!-- Listable options (combinations) -->
+
+		<script type="text/javascript">
+			function BuyCombination(comb_id)
+			{
+				document.getElementById('qty[<inp2:p_Field name="ProductId"/>]['+comb_id+']').value = 1;
+				document.getElementById('add_to_cart').submit();
+			}
+		</script>
+
+		<inp2:m_DefineElement name="combination_option_element">
+			<strong><inp2:m_Param name="option_name" />: </strong>
+			<inp2:m_Param name="option_value" /><inp2:m_if check="m_ParamEquals" param="is_last" value="1"><inp2:m_else/>, </inp2:m_if>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="combination_element">
+			<tr class="cart-item-small">
+				<td>
+					<input type="hidden" id="qty[<inp2:p_Field name="ProductId"/>][<inp2:Field name="CombinationId"/>]" name="qty[<inp2:p_Field name="ProductId"/>][<inp2:Field name="CombinationId"/>]" value="0">
+					<inp2:ShowCombination render_as="combination_option_element"/>
+				</td>
+				<td>
+					<inp2:Field name="FinalPrice" currency="selected"/>
+				</td>
+				<td>
+					<a href="javascript:BuyCombination(<inp2:Field name="CombinationId"/>)"><inp2:m_Phrase label="lu_comm_BuyNow"/></a>
+				</td>
+			</tr>
+		</inp2:m_DefineElement>
+		<table style="margin: 0px;">
+			<tr class="cart-header">
+				<td><inp2:m_Phrase label="lu_comm_OptionsCombination"/></td>
+				<td><inp2:m_Phrase label="lu_comm_Price"/></td>
+				<td>&nbsp;</td>
+			</tr>
+
+			<inp2:poc_PrintList2 per_page="-1" render_as="combination_element" row_start_render_as="html:" row_end_render_as="html:"/>
+		</table>
+		<br/>
+	<inp2:m_else/> <!-- Selectable options -->
+		<script type="text/javascript">
+			function AddToCart()
+			{
+				document.getElementById('add_to_cart').submit();
+			}
+
+			function UpdateOptions()
+			{
+				document.getElementById('events[ord]').value = 'OnUpdateItemOptions';
+				document.getElementById('add_to_cart').submit();
+			}
+
+		</script>
+
+		<strong><inp2:m_Phrase label="lu_comm_SelectOptions"/>:</strong><br/>
+
+		<inp2:m_DefineElement name="option_select_element">
+				<option value="<inp2:m_param name="id"/>" <inp2:m_param name="selected"/>><inp2:m_param name="value"/><inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/>: (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if></option>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="option_cb_element">
+				<input type="checkbox" <inp2:m_param name="selected"/>
+							name="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>][]"
+							id="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]_<inp2:m_param name="id"/>"
+							value="<inp2:m_param name="id"/>" />
+					<label for="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]_<inp2:m_param name="id"/>">
+						<inp2:m_param name="value"/><inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/>: (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if>&nbsp;&nbsp;
+					</label>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="option_radio_element">
+				<input type="radio" <inp2:m_param name="selected"/>
+							name="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]"
+							id="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]_<inp2:m_param name="id"/>"
+							value="<inp2:m_param name="id"/>" />
+					<label for="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]_<inp2:m_param name="id"/>">
+						<inp2:m_param name="value"/><inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/>: (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if>&nbsp;&nbsp;
+					</label>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="option_element">
+			<tr>
+				<td style="padding-right: 10px">
+					<inp2:Field name="Name"/><inp2:m_if check="FieldEquals" field="Required" value="1"><span class="error">*</span></inp2:m_if> :
+				</td>
+				<td>
+					<inp2:m_if check="FieldEquals" field="OptionType" value="1"> <!-- drop-down -->
+						<select name="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]">
+							<option value=""></option>
+							<inp2:ShowOptions render_as="option_select_element" currency="selected"/>
+						</select>
+					</inp2:m_if>
+
+					<inp2:m_if check="FieldEquals" field="OptionType" value="5"> <!-- editbox -->
+						<input type="text" name="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]" value="<inp2:OptionData/>"/>
+					</inp2:m_if>
+
+					<inp2:m_if check="FieldEquals" field="OptionType" value="4"> <!-- textarea -->
+						<textarea cols="50" rows="5" name="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]"><inp2:OptionData/></textarea>
+					</inp2:m_if>
+
+					<inp2:m_if check="FieldEquals" field="OptionType" value="6"> <!-- checkboxeS -->
+						<inp2:ShowOptions render_as="option_cb_element" currency="selected"/>
+					</inp2:m_if>
+
+					<inp2:m_if check="FieldEquals" field="OptionType" value="3"> <!-- radio buttons -->
+						<inp2:ShowOptions render_as="option_radio_element" currency="selected"/>
+					</inp2:m_if>
+				</td>
+			</tr>
+		</inp2:m_DefineElement>
+
+		<table class="form-data" style="margin: 0px;" >
+			<inp2:p_ListOptions per_page="-1" render_as="option_element" row_start_render_as="html:" row_end_render_as="html:"/>
+		</table>
+		<inp2:m_if check="p_OptionsUpdateMode">
+			<a href="javascript:UpdateOptions()" class="price2"><inp2:m_Phrase label="lu_comm_UpdateCartItem"/></a><br/>
+		<inp2:m_else/>
+			<a href="javascript:AddToCart()" class="price2"><inp2:m_Phrase label="lu_comm_BuyNow"/></a><br/>
+		</inp2:m_if>
+		<br/>
+	</inp2:m_if>
+	</form>
+</inp2:m_if>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/form_options.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_wish_list.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_wish_list.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_wish_list.tpl	(revision 12131)
@@ -0,0 +1,75 @@
+<inp2:m_DefineElement name="product_image">
+	<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" /><br/>
+</inp2:m_DefineElement>
+
+<inp2:p_InitList list_name="wish_list" types="wish_list" parent_cat_id="any" recursive="true" per_page="default" />
+
+<table border="0" cellspacing="0" cellpadding="0" class="block-no-border">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_comm_YourWishList"/> (<inp2:p_TotalRecords list_name="wish_list" />)</td>
+	</tr>
+	<tr>
+		<td class="block-data">
+			<inp2:m_if check="p_TotalRecords" list_name="wish_list">
+				<table>
+					<tr>
+						<td style="width: 300px">
+							<inp2:m_include template="in-commerce/blocks/products/products_sorting" list_name="wish_list" />
+						</td>
+						<td style="text-align: center;">
+							<inp2:m_include template="in-commerce/blocks/products/products_pagination" list_name="wish_list" />
+						</td>
+					</tr>
+				</table>
+				<br />
+
+
+				<table>
+					<inp2:m_DefineElement name="product_row_start">
+						<tr>
+					</inp2:m_DefineElement>
+
+					<inp2:m_DefineElement name="product_elem">
+						<td width="16%" align="center" valign="top" class="block-data">
+							<a href="<inp2:ProductLink template="__default__"/>"><inp2:Image render_as="product_image" thumbnail="1" DefaultImage="in-commerce/img/no_picture_list.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120" /></a>
+						</td>
+						<td width="84%" class="block-data"> <a href="<inp2:ProductLink template="__default__"/>" class="link-product2"><strong><inp2:Field name="Name" /></strong></a>
+							<inp2:m_if check="p_Available">
+								<a href="<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>"><img src="in-commerce/img/buy2.gif" alt="" width="15" height="17" border="0" style="vertical-align:middle" /></a><br />
+							</inp2:m_if>
+							<inp2:m_if check="Field" name="MSRP"><strong><inp2:m_Phrase label="lu_comm_MSRP"/>:</strong> <span class="price-msrp"><inp2:Field name="MSRP" currency="selected"/></span> <br /> </inp2:m_if>
+							<strong><inp2:m_Phrase label="lu_comm_OurPrice"/>:</strong> <span class="price1"><inp2:Field name="Price" currency="selected"/></span> <br />
+							<inp2:m_DefineElement name="add_to_wish_list">
+								<a href="<inp2:m_param name="wish_list_toggle_link" />"><inp2:m_Phrase label="lu_comm_AddToFav"/></a><br />
+							</inp2:m_DefineElement>
+							<inp2:m_DefineElement name="remove_from_wish_list">
+								<a href="<inp2:m_param name="wish_list_toggle_link" />"><inp2:m_Phrase label="lu_comm_RemoveFromFav"/></a><br />
+							</inp2:m_DefineElement>
+							<inp2:WishListToggleLink add_to_wish_list_render_as="add_to_wish_list" remove_from_wish_list_render_as="remove_from_wish_list" /><br />
+							<strong><inp2:m_Phrase label="lu_comm_Description"/>:</strong> <inp2:Field name="DescriptionExcerpt" />
+						</td>
+					</inp2:m_DefineElement>
+
+				 	<inp2:m_DefineElement name="product_row_end">
+						</tr>
+						<inp2:m_if check="NotLastItem">
+							<tr>
+								<td colspan="2" style="background: #CCCCCC; height: 1px; padding: 0px"><img src="img/s.gif" alt="" width="1" height="1" /></td>
+							</tr>
+						</inp2:m_if>
+					</inp2:m_DefineElement>
+					<inp2:p_ListProducts list_name="wish_list" columns="1" direction="V" render_as="product_elem" row_start_render_as="product_row_start" row_end_render_as="product_row_end" empty_cell_render_as="product_empty_cell" />
+				</table>
+			<inp2:m_else />
+				<tr>
+					<td>
+						<inp2:m_Phrase label="lu_comm_YourWishListEmpty"/><br />
+						<inp2:m_Phrase label="lu_comm_TryRecomendedProductd"/>.
+						<br /><br />
+						<inp2:m_include template="in-commerce/blocks/products/products_picks" />
+					</td>
+				</tr>
+			</inp2:m_if>
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_wish_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/form_recommend_product.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/form_recommend_product.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/form_recommend_product.tpl	(revision 12131)
@@ -0,0 +1,93 @@
+
+
+<inp2:m_DefineElement name="product_image">
+	<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" /><br/>
+</inp2:m_DefineElement>
+
+<table class="block-no-border">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_comm_RecommendThisProduct"/></td>
+	</tr>
+	<tr>
+		<td class="block-data-single">
+
+			<table>
+				<tr>
+					<td width="16%" align="center" valign="top" class="block-data">
+					<a href="<inp2:p_ProductLink template="__default__"/>"><inp2:p_Image render_as="product_image" thumbnail="1" DefaultImage="in-commerce/img/no_picture_list.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120" /></a>
+					<inp2:m_if check="p_Available">
+						<a href="<inp2:p_AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>" class="link-product2"><strong><inp2:m_Phrase label="lu_comm_BuyNow"/></strong></a>
+						<a href="<inp2:p_AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>"><img src="in-commerce/img/buy2.gif" alt="<inp2:m_Phrase label="lu_comm_BuyNow"/>" width="15" height="17" border="0" vspace="4" style="vertical-align:middle" /></a>
+					<inp2:m_else />
+						<strong><inp2:m_phrase label="lu_comm_outofstock"/></strong>
+					</inp2:m_if>
+					</td>
+					<td width="84%" class="block-data">
+						<a href="<inp2:p_ProductLink template="__default__"/>" class="link-product2"><strong><inp2:p_Field field="Name" /></strong></a>
+						<inp2:m_if check="p_Available">
+							<a href="<inp2:p_AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>"><img src="in-commerce/img/buy2.gif" alt="" width="15" height="17" border="0" style="vertical-align:middle" /></a>
+						</inp2:m_if>
+						<br />
+						<inp2:m_if check="p_Field" name="MSRP"><strong><inp2:m_Phrase label="lu_comm_MSRP"/>:</strong> <span class="price-msrp"><inp2:p_Field name="MSRP" currency="selected"/></span> <br /> </inp2:m_if>
+						<strong><inp2:m_Phrase label="lu_comm_OurPrice"/>:</strong> <span class="price1"><inp2:p_Field name="Price" currency="selected"/></span> <br />
+						<strong><inp2:m_Phrase label="lu_comm_Description"/>:</strong> <inp2:p_Field name="DescriptionExcerpt"/><br />
+						<br />
+						
+						
+
+
+			<form method="POST" action="<inp2:m_FormAction />">
+				<table class="form-data">
+					<tr>
+						<td><strong><inp2:m_Phrase label="lu_comm_FriendName"/>:</strong></td>
+						<td><input type="text" name="friend_name"/></td>
+						<td>&nbsp;</td>
+					</tr>
+					<tr>
+						<td><strong><inp2:m_Phrase label="lu_comm_FriendEmail"/> *:</strong></td>
+						<td><input type="text" name="friend_email"/></td>
+						<td>
+							<inp2:m_if check="u_HasError" field="any">
+								<br />	
+								<span class="error"><inp2:u_Error field="Email" /></span>
+							</inp2:m_if>	
+						</td>
+					</tr>
+					<tr>
+						<td><strong><inp2:m_Phrase label="lu_comm_YourName"/>: </strong></td>
+						<td><input type="text" name="your_name" value="<inp2:u_Field name="FirstName" /> <inp2:u_Field name="LastName" />"/></td>
+						<td>&nbsp;</td>
+					</tr>
+					<tr>
+						<td><strong><inp2:m_Phrase label="lu_comm_YourEmail"/>:</strong></td>
+						<td><input type="text" name="your_email" value="<inp2:u_Field name="Email" />"/></td>
+						<td>&nbsp;</td>
+					</tr>
+					<tr>
+						<td><strong><inp2:m_Phrase label="lu_comm_Message"/>:</strong></td>
+						<td><textarea name="your_message" style="width: 300px; height: 150px"><inp2:m_Phrase label="lu_recommend_default_text" /></textarea></td>
+						<td>&nbsp;</td>
+					</tr>
+					<tr>
+						<td>&nbsp;</td>
+						<td><input type="submit" value="<inp2:m_Phrase label="lu_RecommendToFriend" />" name="events[p][OnRecommendProduct]" class="button" /> <input type="button" class="button" onclick="history.go(-1)" value="<inp2:m_phrase label="lu_Cancel"/>"></td>
+						<td>&nbsp;</td>
+					</tr>
+					
+				</table>
+			<input type="hidden" name="template_success" value="in-commerce/product/confirm_recommend.tpl" />
+			</form>							
+							
+							
+							
+
+					</td>
+				</tr>
+			</table>
+
+			<br />
+
+		</td>
+	</tr>
+</table>
+

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/form_recommend_product.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_recent.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_recent.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_recent.tpl	(revision 12131)
@@ -0,0 +1,32 @@
+<inp2:p_InitList list_name="list_recent" types="recent" parent_cat_id="any" recursive="true" per_page="short_list" except="in_cart" />
+
+<table class="block">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_comm_RecentlyViewed"/></td>
+	</tr>
+	<tr>
+		<td class="block-data-big">
+			<table>
+				<inp2:m_DefineElement name="recent_product">
+				<td>
+						<a href="<inp2:ProductLink template="__default__"/>"><strong><inp2:Field field="Name" /></strong></a><br />
+						<inp2:Field field="DescriptionExcerpt" first_chars="70" /><br />
+						<span class="price"><strong><inp2:Field name="Price" currency="selected" /></strong></span><br />
+						<br />
+				</td>
+				</inp2:m_DefineElement>
+
+				<inp2:p_ListProducts list_name="list_recent" render_as="recent_product" columns="1" />
+			</table>
+
+			<inp2:m_DefineElement name="more_link">
+				<a href="<inp2:m_Link template="in-commerce/store/recent" />"><inp2:m_Phrase label="lu_comm_MoreLink"/>...</a><br />
+			</inp2:m_DefineElement>
+			<inp2:p_MoreLink list_name="list_recent" render_as="more_link" />
+			<img src="img/s.gif" alt="" width="5" height="10" border="0" /><br />
+			<form method="post" action="<inp2:m_FormAction />">
+				<input class="button" type="submit" name="events[p][OnClearRecent]" value="<inp2:m_Phrase label="lu_comm_Clear"/>"/>
+			</form>
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_recent.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/form_review_product.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/form_review_product.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/form_review_product.tpl	(revision 12131)
@@ -0,0 +1,90 @@
+<inp2:m_DefineElement name="product_star_on">
+	<img src="img/star_rate.gif" alt="">
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="product_image">
+	<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" /><br/>
+</inp2:m_DefineElement>
+
+<table class="block-no-border">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_comm_ReviewProduct"/></td>
+	</tr>
+	<tr>
+		<td class="block-data-single">
+
+			<table>
+				<tr>
+					<td width="16%" align="center" valign="top" class="block-data">
+						<a href="<inp2:p_ProductLink template="__default__"/>"><inp2:p_Image render_as="product_image" thumbnail="1" DefaultImage="in-commerce/img/no_picture_list.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120" /></a>
+						<inp2:m_if check="p_Available">
+							<a href="<inp2:p_AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>" class="link-product2"><strong><inp2:m_Phrase label="lu_comm_BuyNow"/></strong></a>
+							<a href="<inp2:p_AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>"><img src="in-commerce/img/buy2.gif" alt="<inp2:m_Phrase label="lu_comm_BuyNow"/>" width="15" height="17" border="0" vspace="4" style="vertical-align:middle" /></a>
+						<inp2:m_else />
+							<strong><inp2:m_phrase label="lu_comm_outofstock"/></strong>
+						</inp2:m_if>
+					</td>
+					<td width="84%" class="block-data">
+						<a href="<inp2:p_ProductLink template="__default__"/>" class="link-product2"><strong><inp2:p_Field field="Name" /></strong></a>
+						<inp2:m_if check="p_Available">
+							<a href="<inp2:p_AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>"><img src="in-commerce/img/buy2.gif" alt="" width="15" height="17" border="0" style="vertical-align:middle" /></a>
+						</inp2:m_if>
+						<br />
+						<inp2:m_if check="p_Field" name="MSRP"><strong><inp2:m_Phrase label="lu_comm_MSRP"/>:</strong> <span class="price-msrp"><inp2:p_Field name="MSRP" currency="selected"/></span> <br /> </inp2:m_if>
+						<strong><inp2:m_Phrase label="lu_comm_OurPrice"/>:</strong> <span class="price1"><inp2:p_Field name="Price" currency="selected"/></span> <br />
+						<strong><inp2:m_Phrase label="lu_comm_Description"/>:</strong> <inp2:p_Field name="DescriptionExcerpt"/><br />
+						<br />
+
+						<inp2:m_if check="p_AlreadyReviewed">
+							<table class="warning">
+								<tr>
+									<td valign="top" align="left" class="block-data">
+										<img src="img/message.gif" alt="" width="19" height="19" />
+										<span class="warning-text"><inp2:m_Phrase label="lu_Warning"/></span><br />
+										<inp2:m_Phrase label="lu_comm_ErrorAlreadyReviewed"/>.
+									</td>
+								</tr>
+							</table>
+							<table>
+								<inp2:m_DefineElement name="review_row">
+									<td>
+										<strong><inp2:m_Phrase label="lu_comm_ReviewBy"/> <inp2:Field name="ReviewedBy"/></strong>, <inp2:Field name="CreatedOn" format="_regional_DateFormat"/><br />
+										<br />
+										<inp2:field field="ReviewText"/><br />
+										<hr />
+									</td>
+								</inp2:m_DefineElement>
+								<inp2:p_ListReviews type="current_user" render_as="review_row" per_page="-1" main_special=""/>
+							</table>
+						<inp2:m_else />
+
+							<inp2:m_if check="rev.product_HasError" field="ReviewText">
+								<table class="warning">
+									<tr>
+										<td valign="top" align="left" class="block-data">
+											<img src="img/message.gif" alt="" width="19" height="19" />
+											<span class="warning-text"><inp2:m_Phrase label="lu_Warning"/></span><br />
+											<inp2:rev.product_Error field="ReviewText" />
+										</td>
+									</tr>
+								</table>
+							</inp2:m_if>
+							<form method="POST" action="<inp2:m_FormAction />">
+								<strong><inp2:m_Phrase label="lu_comm_YourReviewText"/>:</strong><br />
+								<textarea name="<inp2:rev.product_InputName field="ReviewText"/>" cols="60" rows="15"><inp2:rev.product_field field="ReviewText"/></textarea><br />
+								<br />
+								<input type="hidden" name="success_template" value="__default__" />
+								<input type="hidden" name="cancel_template" value="__default__" />
+								<input type="submit" name="events[rev.product][OnAddReview]" class="button" value="<inp2:m_phrase label="lu_add_review"/>">
+								<input type="submit" name="events[p][OnCancelAction]" class="button" value="<inp2:m_phrase label="lu_Cancel"/>">
+							</form>
+						</inp2:m_if>
+					</td>
+				</tr>
+			</table>
+
+			<br />
+
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/form_review_product.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.8
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_sorting.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_sorting.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_sorting.tpl	(revision 12131)
@@ -0,0 +1,16 @@
+<form method="post" action="<inp2:m_FormAction />">
+	<strong><inp2:m_Phrase label="lu_comm_SortBy"/></strong>
+
+	<select name="<inp2:p_CombinedSortingDropDownName/>">
+		<option value="Name|asc" <inp2:p_SortingSelected sorting="l1_Name|asc" selected='selected="selected"'/>> <inp2:m_Phrase label="lu_comm_NameAZ"/></option>
+		<option value="Name|desc" <inp2:p_SortingSelected sorting="l1_Name|desc" selected='selected="selected"'/>> <inp2:m_Phrase label="lu_comm_NameZA"/></option>
+		<option value="Manufacturer|asc" <inp2:p_SortingSelected sorting="Manufacturer|asc" selected='selected="selected"'/>> <inp2:m_Phrase label="lu_comm_ManufAZ"/></option>
+		<option value="Manufacturer|desc" <inp2:p_SortingSelected sorting="Manufacturer|desc" selected='selected="selected"'/>> <inp2:m_Phrase label="lu_comm_ManufZA"/></option>
+		<option value="Price|asc" <inp2:p_SortingSelected sorting="Price|asc" selected='selected="selected"'/>> <inp2:m_Phrase label="lu_comm_PriceLH"/></option>
+		<option value="Price|desc" <inp2:p_SortingSelected sorting="Price|desc" selected='selected="selected"'/>> <inp2:m_Phrase label="lu_comm_PriceHL"/></option>
+		<option value="CreatedOn|asc" <inp2:p_SortingSelected sorting="CreatedOn|asc" selected='selected="selected"'/>> <inp2:m_Phrase label="lu_comm_RecentToOld"/></option>
+		<option value="CreatedOn|desc" <inp2:p_SortingSelected sorting="CreatedOn|desc" selected='selected="selected"'/>> <inp2:m_Phrase label="lu_comm_OldToRecent"/></option>
+	</select>
+
+	<input type="submit" class="button" name="<inp2:p_SubmitName event="OnSetSortingDirect"/>" value="<inp2:m_Phrase label="lu_comm_Sort"/>" />
+</form>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_sorting.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/form_rate_product.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/form_rate_product.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/form_rate_product.tpl	(revision 12131)
@@ -0,0 +1,77 @@
+<inp2:m_DefineElement name="product_image">
+	<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" /><br/>
+</inp2:m_DefineElement>
+
+<table class="block-no-border">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_comm_RateProduct"/></td>
+	</tr>
+	<tr>
+		<td class="block-data-single">
+
+			<table>
+				<tr>
+					<td width="16%" align="center" valign="top" class="block-data">
+						<a href="<inp2:p_ProductLink template="__default__"/>"><inp2:p_Image render_as="product_image" thumbnail="1" DefaultImage="in-commerce/img/no_picture_list.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120" /></a>
+						<inp2:m_if check="p_Available">
+							<a href="<inp2:p_AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>" class="link-product2"><strong><inp2:m_Phrase label="lu_comm_BuyNow"/></strong></a>
+							<a href="<inp2:p_AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>"><img src="in-commerce/img/buy2.gif" alt="<inp2:m_Phrase label="lu_comm_BuyNow"/>" width="15" height="17" border="0" vspace="4" style="vertical-align:middle" /></a>
+						<inp2:m_else />
+							<strong><inp2:m_phrase label="lu_comm_outofstock"/></strong>
+						</inp2:m_if>
+					</td>
+					<td width="84%" class="block-data">
+						<a href="<inp2:p_ProductLink template="__default__"/>" class="link-product2"><strong><inp2:p_Field field="Name" /></strong></a>
+						<inp2:m_if check="p_Available">
+							<a href="<inp2:p_AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>"><img src="in-commerce/img/buy2.gif" alt="" width="15" height="17" border="0" style="vertical-align:middle" /></a>
+						</inp2:m_if>
+						<br />
+						<inp2:m_if check="p_Field" name="MSRP"><strong><inp2:m_Phrase label="lu_comm_MSRP"/>:</strong> <span class="price-msrp"><inp2:p_Field name="MSRP" currency="selected"/></span> <br /> </inp2:m_if>
+						<strong><inp2:m_Phrase label="lu_comm_OurPrice"/>:</strong> <span class="price1"><inp2:p_Field name="Price" currency="selected"/></span> <br />
+						<strong><inp2:m_Phrase label="lu_comm_Description"/>:</strong> <inp2:p_Field name="DescriptionExcerpt"/><br />
+						<br />
+
+						<inp2:m_if check="p_HasError" field="CachedRating">
+							<table class="warning">
+								<tr>
+									<td valign="top" align="left" class="block-data">
+										<img src="img/message.gif" alt="" width="19" height="19" />
+										<span class="warning-text"><inp2:m_Phrase label="lu_Warning"/></span><br />
+										<inp2:p_Error field="CachedRating" />
+									</td>
+								</tr>
+							</table>
+						</inp2:m_if>
+
+						<strong><inp2:m_Phrase label="lu_comm_RateThisProduct"/></strong>
+						<form method="POST" action="<inp2:m_FormAction />">
+							<table style="width: 60%;">
+								<inp2:m_DefineElement name="product_star_on">
+									<img src="img/star_rate.gif" alt="" width="11" height="11">
+								</inp2:m_DefineElement>
+
+								<inp2:m_DefineElement name="product_rate_row">
+									<tr>
+										<td>&nbsp;</td>
+										<td>
+											<input type="radio" name="rating" value="<inp2:m_param name="rating"/>">
+											<inp2:m_param name="stars"/>
+										</td>
+										<td><inp2:m_param name="label"/></td>
+									</tr>
+								</inp2:m_DefineElement>
+								<inp2:p_RateForm render_as="product_rate_row" labels="lu_comm_RateExcellent,lu_comm_RateVeryGood,lu_comm_RateGood,lu_comm_RateAverage,lu_comm_RateFair,lu_comm_RatePoor" star_render_as="product_star_on"/>
+							</table>
+							<br />
+							<input type="hidden" name="success_template" value="__default__" />
+							<input type="hidden" name="cancel_template" value="__default__" />
+							<input type="submit" name="events[p][OnRateProduct]" class="button" value="<inp2:m_phrase label="lu_btn_RateProduct"/>">
+							<input type="submit" name="events[p][OnCancelAction]" class="button" value="<inp2:m_phrase label="lu_Cancel"/>">
+						</form>
+
+					</td>
+				</tr>
+			</table>
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/form_rate_product.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/confirm_recommend.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/confirm_recommend.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/confirm_recommend.tpl	(revision 12131)
@@ -0,0 +1,20 @@
+<table border="0" cellspacing="0" cellpadding="0" class="block-no-border">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_recommend_title" /></td>
+	</tr>
+	<tr> 
+  		<td class="block-data">
+
+  			<br />
+			<br />
+			<strong><inp2:m_Phrase label="lu_recommend_confirm" /></strong>
+			<br />
+			<br />
+			<inp2:m_Phrase label="lu_recommend_product_confirm_text" />
+			<br />
+			<br />
+			<button onClick="window.location.href='<inp2:p_ProductLink template="__default__" />';" class="button" /><inp2:m_Phrase label="lu_comm_Ok"/></button>
+
+		</td>			
+	</tr>
+</table>

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/confirm_recommend.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_picks.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_picks.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_picks.tpl	(revision 12131)
@@ -0,0 +1,57 @@
+<inp2:p_InitList list_name="list_picks" types="pick" except="displayed" recursive="true" per_page="short_list" />
+
+<inp2:m_DefineElement name="product_image">
+	<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" /><br/>
+</inp2:m_DefineElement>
+
+<table border="0" cellspacing="0" cellpadding="0" class="pick-products-block">
+	<tr>
+		<td class="pick-products-block-header"><inp2:m_Phrase label="lu_comm_EditorsPick"/></td>
+	</tr>
+	<tr>
+		<td class="block-data">
+			<table>
+				<inp2:m_DefineElement name="product_row_start">
+					<tr>
+				</inp2:m_DefineElement>
+
+				<inp2:m_DefineElement name="product_elem">
+					<td width="16%" align="center" valign="top" class="block-data">
+						<a href="<inp2:ProductLink template="__default__"/>"><inp2:Image render_as="product_image" thumbnail="1" DefaultImage="in-commerce/img/no_picture_list.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120" /></a><br />
+						<inp2:m_if check="Available">
+							<a href="<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>" class="link-product2"><strong><inp2:m_Phrase label="lu_comm_BuyNow"/></strong></a>
+							<a href="<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>"><img src="in-commerce/img/buy2.gif" alt="<inp2:m_Phrase label="lu_comm_BuyNow"/>" width="15" height="17" border="0" vspace="4" style="vertical-align:middle" /></a>
+						<inp2:m_else />
+							<strong><inp2:m_phrase label="lu_comm_outofstock"/></strong>
+						</inp2:m_if>
+					</td>
+					<td width="84%" class="block-data"> 
+						<a href="<inp2:ProductLink template="__default__"/>" class="link-product2"><strong><inp2:Field field="Name" /></strong></a>
+						<inp2:m_if check="Available">
+							<a href="<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>"><img src="in-commerce/img/buy2.gif" alt="" width="15" height="17" border="0" style="vertical-align:middle" /></a>
+						</inp2:m_if>
+						<br />
+						<inp2:m_if check="Field" name="MSRP"><strong><inp2:m_Phrase label="lu_comm_MSRP"/>:</strong> <span class="price-msrp"><inp2:Field name="MSRP" currency="selected"/></span> <br /> </inp2:m_if>
+						<strong><inp2:m_Phrase label="lu_comm_OurPrice"/>:</strong> <span class="price1"><inp2:Field name="Price" currency="selected"/></span> <br />
+						<strong><inp2:m_Phrase label="lu_comm_Description"/>:</strong> <inp2:Field name="DescriptionExcerpt"/>
+					</td>
+				</inp2:m_DefineElement>
+
+				<inp2:m_DefineElement name="product_row_end">
+					</tr>
+					<inp2:m_if check="NotLastItem">
+						<tr class="separator">
+							<td colspan="2" ><img src="img/s.gif" alt="" width="1" height="1" /></td>
+						</tr>
+					</inp2:m_if>
+				</inp2:m_DefineElement>
+
+				<inp2:p_ListProducts list_name="list_picks" columns="1" direction="V" render_as="product_elem" row_start_render_as="product_row_start" row_end_render_as="product_row_end" empty_cell_render_as="product_empty_cell" />
+			</table>
+			<inp2:m_DefineElement name="more_link">
+				<a href="<inp2:m_Link template="in-commerce/store/editor_pick_products" />"><inp2:m_Phrase label="lu_comm_MoreLink"/>...</a>
+			</inp2:m_DefineElement>
+			<inp2:p_MoreLink list_name="list_picks"	render_as="more_link"/>
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_picks.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_current_cat.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_current_cat.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_current_cat.tpl	(revision 12131)
@@ -0,0 +1,62 @@
+<inp2:m_DefineElement name="product_image">
+	<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" /><br/>
+</inp2:m_DefineElement>
+
+<inp2:p_InitList list_name="products_in_current_cat" per_page="default" except="displayed"	/>
+
+<table class="block-no-border">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_comm_Products"/></td>
+	</tr>
+	<tr>
+		<td class="block-data">
+			<table>
+				<tr>
+					<td style="width: 50%">
+			 			<inp2:m_include template="in-commerce/blocks/products/products_sorting" list_name="products_in_current_cat" />
+					</td>
+					<td style="text-align: center;">
+						<inp2:m_include template="in-commerce/blocks/products/products_pagination" list_name="products_in_current_cat" />
+					</td>
+				</tr>
+			</table>
+
+			<table>
+				<inp2:m_DefineElement name="product_row_start">
+					<tr>
+				</inp2:m_DefineElement>
+
+				<inp2:m_DefineElement name="product_elem">
+					<td width="16%" align="center" valign="top" class="block-data">
+						<a href="<inp2:ProductLink template="__default__"/>"><inp2:Image render_as="product_image" Thumbnail="1" DefaultImage="in-commerce/img/no_picture_list.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120" /></a>
+					</td>
+					<td width="84%" class="block-data">
+						<a href="<inp2:ProductLink template="__default__"/>" class="link-product2"><strong><inp2:Field field="Name" /></strong></a>
+						<inp2:m_if check="Available">
+							<a href="<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>"><img src="in-commerce/img/buy2.gif" alt="" width="15" height="17" border="0" style="vertical-align:middle" /></a>
+						</inp2:m_if>
+						<br />
+						<inp2:m_if check="Field" name="MSRP"><strong><inp2:m_Phrase label="lu_comm_MSRP"/>:</strong> <span class="price-msrp"><inp2:Field name="MSRP" currency="selected"/></span> <br /> </inp2:m_if>
+						<strong><inp2:m_Phrase label="lu_comm_OurPrice"/>:</strong> <span class="price1"><inp2:Field name="Price" currency="selected"/></span><br />
+						<strong><inp2:m_Phrase label="lu_comm_Description"/>:</strong> <inp2:Field name="DescriptionExcerpt"/>
+					</td>
+				</inp2:m_DefineElement>
+
+				<inp2:m_DefineElement name="product_row_end">
+						</tr>
+						<inp2:m_if check="NotLastItem">
+							<tr>
+								<td colspan="2" style="background: #CCCCCC; height: 1px; padding: 0px"><img src="img/s.gif" alt="" width="1" height="1" /></td>
+							</tr>
+						</inp2:m_if>
+				</inp2:m_DefineElement>
+
+				<inp2:p_ListProducts list_name="products_in_current_cat"
+						render_as="product_elem" row_start_render_as="product_row_start"
+						row_end_render_as="product_row_end" empty_cell_render_as="product_empty_cell"
+						columns="1" direction="V" />
+			</table>
+			<inp2:m_include template="in-commerce/blocks/products/products_pagination" list_name="products_in_current_cat" />
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_current_cat.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/product_actions.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/product_actions.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/product_actions.tpl	(revision 12131)
@@ -0,0 +1,29 @@
+	<table border="0" cellspacing="0" cellpadding="0" class="actions-block">
+		<tr>
+			<td class="actions-block-header"><inp2:m_Phrase label="lu_comm_Actions"/></td>
+		</tr>
+		<tr>
+			<td class="block-data">
+				<inp2:m_if check="p_Available">
+					<inp2:m_if check="p_ShouldListOptions" required_only="1"><inp2:m_else/>
+						<a href="<inp2:p_AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>"><inp2:m_Phrase label="lu_comm_BuyThisProduct"/></a><br />
+					</inp2:m_if>
+				<inp2:m_else />
+					<strong><inp2:m_phrase label="lu_comm_outofstock"/></strong><br />
+				</inp2:m_if>
+				<inp2:m_DefineElement name="add_to_wish_list">
+					<a href="<inp2:m_param name="wish_list_toggle_link" />"><inp2:m_Phrase label="lu_comm_AddToFavourites"/></a><br />
+				</inp2:m_DefineElement>
+				<inp2:m_DefineElement name="remove_from_wish_list">
+					<a href="<inp2:m_param name="wish_list_toggle_link" />"><inp2:m_Phrase label="lu_comm_RemoveFromFav"/></a><br />
+				</inp2:m_DefineElement>
+				<inp2:p_WishListToggleLink add_to_wish_list_render_as="add_to_wish_list" template_on_add="in-commerce/my_account/wishlist.tpl" remove_from_wish_list_render_as="remove_from_wish_list" />
+				<br />
+				<a href="<inp2:p_ProductLink template="__default__" />#reviews"><inp2:m_Phrase label="lu_comm_ViewReviews"/></a><br />
+				<a href="<inp2:p_ProductLink template="__default__" />#related"><inp2:m_Phrase label="lu_comm_ViewRelatedProducts"/></a><br />
+				<a href="<inp2:p_ProductLink template="in-commerce/product/review_product"/>"><inp2:m_Phrase label="lu_comm_ReviewThisProduct"/></a><br />
+				<a href="<inp2:p_ProductLink template="in-commerce/product/rate_product" />"><inp2:m_Phrase label="lu_comm_RateThisProduct"/></a><br />
+				<a href="<inp2:p_ProductLink template="in-commerce/product/recommend_product" />"><inp2:m_Phrase label="lu_comm_RecommendThisProduct"/></a><br />
+			</td>
+		</tr>
+	</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/product_actions.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_editor_picks.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_editor_picks.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_editor_picks.tpl	(revision 12131)
@@ -0,0 +1,62 @@
+<inp2:p_InitList list_name="list_editors_picks" per_page="default" types="pick" except="displayed" recursive="true" />
+
+<inp2:m_DefineElement name="product_image">
+	<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" /><br/>
+</inp2:m_DefineElement>
+
+<table border="0" cellspacing="0" cellpadding="0" class="block-no-border">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_comm_EditorsPicks"/></td>
+	</tr>
+	<tr>
+		<td class="block-data">
+	
+			<table>
+		  		<tr>
+		  			<td style="width: 300px">
+		  				<inp2:m_include template="in-commerce/blocks/products/products_sorting" list_name="list_editors_picks" />
+		  			</td>
+		  			<td style="text-align: center;">
+		  				<inp2:m_include template="in-commerce/blocks/products/products_pagination" list_name="list_editors_picks" />
+		  			</td>
+		  		</tr>
+		  	</table>
+
+		  	<br />
+	
+	  		<table>
+				<inp2:m_DefineElement name="product_row_start">
+					<tr>
+				</inp2:m_DefineElement>
+				
+				<inp2:m_DefineElement name="product_elem">
+					<td width="16%" align="center" valign="top" class="block-data">
+						<a href="<inp2:ProductLink template="__default__"/>"><inp2:Image render_as="product_image" thumbnail="1" DefaultImage="in-commerce/img/no_picture_list.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120" /></a>
+					</td>
+					<td width="84%" class="block-data">
+						<a href="<inp2:ProductLink template="__default__"/>" class="link-product2"><strong><inp2:Field field="Name" /></strong></a>
+						<inp2:m_if check="Available">
+							<a href="<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>"><img src="in-commerce/img/buy2.gif" alt="" width="15" height="17" border="0" style="vertical-align:middle" /></a>
+						</inp2:m_if>							
+						<br />
+						<inp2:m_if check="Field" name="MSRP"><strong><inp2:m_Phrase label="lu_comm_MSRP"/>:</strong> <span class="price-msrp"><inp2:Field name="MSRP" currency="selected"/></span> <br /> </inp2:m_if>
+						<strong><inp2:m_Phrase label="lu_comm_OurPrice"/>:</strong> <span class="price1"><inp2:Field name="Price" currency="selected"/></span> <br />
+						<strong><inp2:m_Phrase label="lu_comm_Description"/>:</strong> <inp2:Field name="DescriptionExcerpt"/>
+					</td>
+				</inp2:m_DefineElement>
+					
+				<inp2:m_DefineElement name="product_row_end">
+					</tr>
+					<inp2:m_if check="NotLastItem">
+					  	<tr> 
+							<td colspan="2" style="background: #CCCCCC; height: 1px; padding: 0px"><img src="img/s.gif" alt="" width="1" height="1" /></td> 
+					  	</tr>
+					</inp2:m_if>
+				</inp2:m_DefineElement>
+					
+  				<inp2:p_ListProducts list_name="list_editors_picks" columns="1" direction="V" render_as="product_elem" row_start_render_as="product_row_start" row_end_render_as="product_row_end" empty_cell_render_as="product_empty_cell" />
+			</table>
+
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_editor_picks.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_related.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_related.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_related.tpl	(revision 12131)
@@ -0,0 +1,53 @@
+<inp2:p_InitList list_name="list_related" types="related" except="displayed" parent_cat_id="any" per_page="-1" />
+
+<inp2:m_DefineElement name="product_image">
+	<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" /><br/>
+</inp2:m_DefineElement>
+
+<table border="0" cellspacing="0" cellpadding="0" class="block-no-border">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_comm_RelatedProducts"/></td>
+	</tr>
+	<tr>
+		<td class="block-data">
+			<table>
+				<inp2:m_DefineElement name="product_row_start">
+					<tr>
+				</inp2:m_DefineElement>
+
+				<inp2:m_DefineElement name="product_elem">
+					<td width="16%" align="center" valign="top" class="block-data">
+						<a href="<inp2:ProductLink template="__default__"/>"><inp2:Image render_as="product_image" thumbnail="1" DefaultImage="in-commerce/img/no_picture_list.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120" /></a><br />
+						<inp2:m_if check="Available">
+							<a href="<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>" class="link-product2"><strong><inp2:m_Phrase label="lu_comm_BuyNow"/></strong></a>
+							<a href="<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>"><img src="in-commerce/img/buy2.gif" alt="<inp2:m_Phrase label="lu_comm_BuyNow"/>" width="15" height="17" border="0" vspace="4" style="vertical-align:middle" /></a>
+						<inp2:m_else />
+							<strong><inp2:m_phrase label="lu_comm_outofstock"/></strong>
+						</inp2:m_if>
+					</td>
+					<td width="84%" class="block-data">
+						<a href="<inp2:ProductLink template="__default__"/>" class="link-product2"><strong><inp2:Field field="Name" /></strong></a>
+						<inp2:m_if check="Available">
+							<a href="<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>"><img src="in-commerce/img/buy2.gif" alt="" width="15" height="17" border="0" style="vertical-align:middle" /></a>
+						</inp2:m_if>
+						<br />
+						<inp2:m_if check="Field" name="MSRP"><strong><inp2:m_Phrase label="lu_comm_MSRP"/>:</strong> <span class="price-msrp"><inp2:Field name="MSRP" currency="selected"/></span> <br /> </inp2:m_if>
+						<strong><inp2:m_Phrase label="lu_comm_OurPrice"/>:</strong> <span class="price1"><inp2:Field name="Price" currency="selected"/></span> <br />
+						<strong><inp2:m_Phrase label="lu_comm_Description"/>:</strong> <inp2:Field name="DescriptionExcerpt"/>
+					</td>
+				</inp2:m_DefineElement>
+
+				<inp2:m_DefineElement name="product_row_end">
+					</tr>
+					<inp2:m_if check="NotLastItem">
+						<tr class="separator">
+							<td colspan="2" ><img src="img/s.gif" alt="" width="1" height="1" /></td>
+						</tr>
+					</inp2:m_if>
+				</inp2:m_DefineElement>
+
+				<inp2:p_ListRelatedProducts list_name="list_related" columns="1" direction="V" render_as="product_elem" row_start_render_as="product_row_start" row_end_render_as="product_row_end" empty_cell_render_as="product_empty_cell" />
+			</table>
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_related.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_topsellers_list.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_topsellers_list.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_topsellers_list.tpl	(revision 12131)
@@ -0,0 +1,62 @@
+<inp2:p_InitList list_name="list_top_sellers" per_page="default" types="hot" except="displayed" recursive="true" />
+
+<inp2:m_DefineElement name="product_image">
+	<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" /><br/>
+</inp2:m_DefineElement>
+
+<table border="0" cellspacing="0" cellpadding="0" class="block-no-border"> 
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_comm_TopSellers"/></td>
+	</tr>
+	<tr>
+		<td class="block-data">
+	
+			<table>
+				<tr>
+		  			<td style="width: 300px">
+		  				<inp2:m_include template="in-commerce/blocks/products/products_sorting" list_name="list_top_sellers" />
+		  			</td>
+		  			<td style="text-align: center;">
+		  				<inp2:m_include template="in-commerce/blocks/products/products_pagination" list_name="list_top_sellers" />
+		  			</td>
+		  		</tr>
+		  	</table>
+	
+		  	<br />
+	  	
+	  		<table>
+				<inp2:m_DefineElement name="product_row_start">
+					<tr>
+				</inp2:m_DefineElement>
+				
+				<inp2:m_DefineElement name="product_elem">
+					<td width="16%" align="center" valign="top" class="block-data">
+						<a href="<inp2:ProductLink template="__default__"/>"><inp2:Image render_as="product_image" thumbnail="1" DefaultImage="in-commerce/img/no_picture_list.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120" /></a>
+					</td>
+					<td width="84%" class="block-data">
+						<a href="<inp2:ProductLink template="__default__"/>" class="link-product2"><strong><inp2:Field field="Name" /></strong></a>
+						<inp2:m_if check="Available">
+							<a href="<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>"><img src="in-commerce/img/buy2.gif" alt="" width="15" height="17" border="0" style="vertical-align:middle" /></a>
+						</inp2:m_if>
+						<br />
+						<inp2:m_if check="Field" name="MSRP"><strong><inp2:m_Phrase label="lu_comm_MSRP"/>:</strong> <span class="price-msrp"><inp2:Field name="MSRP" currency="selected"/></span> <br /> </inp2:m_if>
+						<strong><inp2:m_Phrase label="lu_comm_OurPrice"/>:</strong> <span class="price1"><inp2:Field name="Price" currency="selected"/></span> <br />
+						<strong><inp2:m_Phrase label="lu_comm_Description"/>:</strong> <inp2:Field name="DescriptionExcerpt"/>
+					</td>
+				</inp2:m_DefineElement>
+			  
+				<inp2:m_DefineElement name="product_row_end">
+					</tr>
+				  	<inp2:m_if check="NotLastItem">
+					  	<tr>
+							<td colspan="2" style="background: #CCCCCC; height: 1px; padding: 0px"><img src="img/s.gif" alt="" width="1" height="1" /></td>
+					  	</tr>
+					</inp2:m_if>
+				</inp2:m_DefineElement>
+				
+				<inp2:p_ListProducts list_name="list_top_sellers" columns="1" direction="V" render_as="product_elem" row_start_render_as="product_row_start" row_end_render_as="product_row_end" empty_cell_render_as="product_empty_cell" />
+			</table>
+			
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_topsellers_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_featured_list.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_featured_list.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_featured_list.tpl	(revision 12131)
@@ -0,0 +1,61 @@
+<inp2:p_InitList list_name="list_featured" per_page="default" types="featured" except="displayed" recursive="true" />
+
+<inp2:m_DefineElement name="product_image">
+	<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" /><br/>
+</inp2:m_DefineElement>
+
+<table border="0" cellspacing="0" cellpadding="0" class="block-no-border">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_comm_FeaturedProducts"/></td>
+	</tr>
+	<tr>
+		<td class="block-data">
+
+			<table>
+		  		<tr>
+		  			<td style="width: 300px">
+		  				<inp2:m_include template="in-commerce/blocks/products/products_sorting" list_name="list_featured" />
+		  			</td>
+		  			<td style="text-align: center;">
+		  				<inp2:m_include template="in-commerce/blocks/products/products_pagination" list_name="list_featured" />
+		  			</td>
+		  		</tr>
+		  	</table>
+  	
+  			<br />
+
+	  		<table>
+				<inp2:m_DefineElement name="product_row_start">
+					<tr>
+				</inp2:m_DefineElement>
+				
+				<inp2:m_DefineElement name="product_elem">
+				    <td width="16%" align="center" valign="top" class="block-data">
+				    	<a href="<inp2:ProductLink template="__default__"/>"><inp2:Image render_as="product_image" thumbnail="1" DefaultImage="in-commerce/img/no_picture_list.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120" /></a>
+				    </td>
+				    <td width="84%" class="block-data"> 
+				    	<a href="<inp2:ProductLink template="__default__"/>" class="link-product2"><strong><inp2:Field field="Name" /></strong></a>
+				    	<inp2:m_if check="Available">
+				    		<a href="<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>"><img src="in-commerce/img/buy2.gif" alt="" width="15" height="17" border="0" style="vertical-align:middle" /></a><br />
+				    	</inp2:m_if>
+				    	<inp2:m_if check="Field" name="MSRP"><strong><inp2:m_Phrase label="lu_comm_MSRP"/>:</strong> <span class="price-msrp"><inp2:Field name="MSRP" currency="selected"/></span> <br /> </inp2:m_if>
+					    <strong><inp2:m_Phrase label="lu_comm_OurPrice"/>:</strong> <span class="price1"><inp2:Field name="Price" currency="selected"/></span> <br />
+					    <strong><inp2:m_Phrase label="lu_comm_Description"/>:</strong> <inp2:Field name="DescriptionExcerpt"/>
+				    </td>
+				</inp2:m_DefineElement>
+			  
+				<inp2:m_DefineElement name="product_row_end">
+					</tr>
+				  	<inp2:m_if check="NotLastItem">
+						<tr>
+						   	<td colspan="2" style="background: #CCCCCC; height: 1px; padding: 0px"><img src="img/s.gif" alt="" width="1" height="1" /></td>
+						</tr>
+					</inp2:m_if>
+				</inp2:m_DefineElement>
+				
+				<inp2:p_ListProducts list_name="list_featured" columns="1" direction="V" render_as="product_elem" row_start_render_as="product_row_start" row_end_render_as="product_row_end" empty_cell_render_as="product_empty_cell" />
+			</table>
+			
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_featured_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_top_sellers.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_top_sellers.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_top_sellers.tpl	(revision 12131)
@@ -0,0 +1,33 @@
+<inp2:m_DefineElement name="more_link">
+	<a href="<inp2:m_Link template="in-commerce/store/top_seller_products" />"><inp2:m_Phrase label="lu_comm_MoreLink"/>...</a>
+</inp2:m_DefineElement>
+
+<inp2:p_InitList list_name="list_hot" types="pick" types="hot" except="displayed" recursive="1" per_page="short_list" />
+
+<table border="0" cellspacing="0" cellpadding="0" class="block">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_comm_TopSellers"/></td>
+	</tr>
+	<tr>
+		<td class="block-data-big">
+
+			<inp2:m_DefineElement name="top_seller">
+				<td>
+					<a href="<inp2:ProductLink template="__default__"/>"><strong><inp2:Field field="Name" /></strong></a><br />
+				 	<inp2:Field field="DescriptionExcerpt" first_chars="70"/><br />
+					<span class="price"><strong><inp2:Field name="Price" currency="selected"/></strong></span><br />
+					<br />
+				</td>
+			</inp2:m_DefineElement>
+
+			<table>
+				<inp2:p_ListProducts list_name="list_hot" render_as="top_seller" columns="1" />
+			</table>
+
+			<inp2:m_DefineElement name="more_link">
+				<a href="<inp2:m_Link template="in-commerce/store/top_seller_products" />"><inp2:m_Phrase label="lu_comm_MoreLink"/>...</a>
+			</inp2:m_DefineElement>
+			<inp2:p_MoreLink list_name="list_hot" render_as="more_link" />
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_top_sellers.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/product_fullsize_image.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/product_fullsize_image.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/product_fullsize_image.tpl	(revision 12131)
@@ -0,0 +1,6 @@
+<inp2:m_DefineElement name="product_image">
+	<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" /><br/>
+	<br /><br />
+</inp2:m_DefineElement>
+
+<div align="center"><inp2:p_Image render_as="product_image" DefaultImage="in-commerce/img/no_product.gif"/></div>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/product_fullsize_image.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/form_advanced_search.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/form_advanced_search.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/form_advanced_search.tpl	(revision 12131)
@@ -0,0 +1,107 @@
+<table border="0" cellspacing="0" cellpadding="0" class="block-no-border">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_comm_AdvancedSearch"/></td>
+	</tr>
+	<tr> 
+  		<td class="block-data">
+			<form method="POST" enctype="multipart/form-data" action="<inp2:m_link template="in-commerce/store/search_results" search_type="advanced" />">
+				<table class="adv-search-form">
+					<inp2:m_DefineElement name="adv_search_text">
+						<tr>
+							<td>
+								<strong><inp2:m_param name="caption" /></strong>
+							</td>
+							<td style="text-align: center">
+					  	  	<nobr>
+					  	  		<select name="verb[<inp2:m_param name="field" />]">
+											<option value="contains"><inp2:m_Phrase label="lu_comm_Contains"/></option>
+											<option value="notcontains"><inp2:m_Phrase label="lu_comm_DoesntContain"/></option>
+						  	  				<option value="is"><inp2:m_Phrase label="lu_comm_ExactlyIs"/></option>
+											<option value="isnot"><inp2:m_Phrase label="lu_comm_IsNot"/></option>
+										</select>
+										&nbsp;&nbsp;
+										<input type="text" name="value[<inp2:m_param name="field" />]">
+								</nobr>
+							</td>
+							<td style="text-align: right">
+								&nbsp;<inp2:m_param name="andor" />&nbsp;
+							</td>
+						</tr>
+					</inp2:m_DefineElement>
+					<inp2:m_DefineElement name="adv_search_boolean">
+						<tr>
+							<td>
+								<strong><inp2:m_param name="caption" /></strong>
+							</td>
+							<td style="text-align: center">
+								<input type="radio" name="value[<inp2:m_param name="field" />]" id="value[<inp2:m_param name="field" />]_true" value="1">
+								<label for="value[<inp2:m_param name="field" />]_true"><inp2:m_Phrase label="lu_comm_Yes"/></label>
+								&nbsp;
+								<input type="radio" name="value[<inp2:m_param name="field" />]" id="value[<inp2:m_param name="field" />]_false" value="0">
+								<label for="value[<inp2:m_param name="field" />]_false"><inp2:m_Phrase label="lu_comm_No"/></label>
+								&nbsp;
+								<input type="radio" name="value[<inp2:m_param name="field" />]" id="value[<inp2:m_param name="field" />]_any" value="-1" checked>
+								<label for="value[<inp2:m_param name="field" />]_any"><inp2:m_Phrase label="lu_comm_Both"/></label>	  	  	
+							</td>
+							<td style="text-align: right">
+								&nbsp;<inp2:m_param name="andor" />&nbsp;
+							</td>
+						</tr>
+					</inp2:m_DefineElement>
+					<inp2:m_DefineElement name="adv_search_range">
+						<tr>
+							<td>
+								<strong><inp2:m_param name="caption" /></strong>
+							</td>
+							<td style="text-align: center">
+								<nobr><inp2:m_Phrase label="lu_comm_From"/>: <input type="text" name="value[<inp2:m_param name="field" />_from]" style="width:60px">&nbsp;&nbsp;
+								<inp2:m_Phrase label="lu_comm_To"/>: <input type="text" name="value[<inp2:m_param name="field" />_to]" style="width:60px"></nobr>  	
+							</td>
+							<td style="text-align: right">
+								&nbsp;<inp2:m_param name="andor" />&nbsp;
+							</td>
+						</tr>
+					</inp2:m_DefineElement>
+					<inp2:m_DefineElement name="adv_search_date">
+						<tr>
+							<td>
+								<strong><inp2:m_param name="caption" /></strong>
+							</td>
+							<td style="text-align: center">
+								<select name="value[<inp2:m_param name="field" />]">
+									<option value="0" selected><inp2:m_Phrase label="lu_comm_Any"/></option>
+									<option value="today"><inp2:m_Phrase label="lu_comm_Today"/></option>
+									<option value="yesterday"><inp2:m_Phrase label="lu_comm_Yesterday"/></option>
+									<option value="last_week"><inp2:m_Phrase label="lu_comm_LastWeek"/></option>
+									<option value="last_month"><inp2:m_Phrase label="lu_comm_LastMonth"/></option>
+									<option value="last_3_months"><inp2:m_Phrase label="lu_comm_Last3Months"/></option>
+									<option value="last_6_months"><inp2:m_Phrase label="lu_comm_Last6Months"/></option>
+									<option value="last_year"><inp2:m_Phrase label="lu_comm_LastYear"/></option>
+								</select>
+							</td>
+							<td style="text-align: right">
+								&nbsp;<inp2:m_param name="andor" />&nbsp;
+							</td>
+						</tr>
+					</inp2:m_DefineElement>
+					<inp2:m_DefineElement name="adv_search_andor">
+						<span style="color: #555">
+						<nobr><input type="radio" id="andor[<inp2:m_param name="field" />]_1" name="andor[<inp2:m_param name="field" />]" value="1" checked>
+						<label for="andor[<inp2:m_param name="field" />]_1"><inp2:m_Phrase label="lu_comm_And"/></label>
+						&nbsp;
+						<input type="radio" id="andor[<inp2:m_param name="field" />]_0" name="andor[<inp2:m_param name="field" />]" value="0">
+						<label for="andor[<inp2:m_param name="field" />]_0"><inp2:m_Phrase label="lu_comm_Or"/></label></nobr>
+						</span>
+					</inp2:m_DefineElement>
+					<inp2:p_AdvancedSearchForm text_render_as="adv_search_text" boolean_render_as="adv_search_boolean" range_render_as="adv_search_range" date_render_as="adv_search_date" and_or_render_as="adv_search_andor" />
+					<tr>
+						<td colspan="3" style="text-align: center">
+							<input type="submit" value="<inp2:m_Phrase label="lu_comm_Go"/>!" class="button"><br />
+							<br />
+						</td>
+					</tr>
+				</table>
+			</form>
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/form_advanced_search.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_pagination.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_pagination.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_pagination.tpl	(revision 12131)
@@ -0,0 +1,40 @@
+<inp2:m_DefineElement name="prev_page">
+		<a class="pagination-bar" href="<inp2:PageLink/>">&lt;&lt;</a>&nbsp;
+	</td>
+	<td>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="no_prev_page">
+	</td>
+	<td>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="page_current">
+	<strong><inp2:m_param name="page"/></strong>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="page_separator">
+	|
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="page_link">
+	<a class="pagination-bar" href="<inp2:PageLink/>"><inp2:m_param name="page"/></a>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="page_next">
+	<a class="pagination-bar" href="<inp2:PageLink/>">&gt;&gt;</a>
+</inp2:m_DefineElement>
+
+<table style="width: 100%; text-align: left;">
+	<tr>
+		<td style="width: 45%; text-align: right; ">
+			<strong><inp2:m_Phrase label="lu_comm_Page"/>:&nbsp;</strong>
+
+			<inp2:p_PaginationBar
+					current_render_as="page_current" separator_render_as="page_separator" link_render_as="page_link"
+					prev_page_render_as="prev_page" no_prev_page_render_as="no_prev_page"
+					next_page_render_as="page_next" />
+		</td>
+		<td>&nbsp;</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/products/products_pagination.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/all_downloads.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/all_downloads.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/all_downloads.tpl	(revision 12131)
@@ -0,0 +1,70 @@
+<inp2:m_DefineElement name="product_image">
+	<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" /><br/>
+</inp2:m_DefineElement>
+
+<table border="0" cellspacing="0" cellpadding="0" class="block-no-border">
+	<tr>
+		<td class="block-header"><inp2:p_Field name="Name" /> - <inp2:m_Phrase label="lu_comm_ProductFiles"/></td>
+	</tr>
+	<tr>
+		<td class="block-data-single">
+			<table style="vertical-align: top; float: top;">
+				<tr>
+					<td style="text-align: center; width: 200px; padding-right: 10px;">
+						<a href="<inp2:m_Link template="in-commerce/product/picture_fullsize.tpl" pass="all,p" />" target="_blank"><inp2:p_Image render_as="product_image" DefaultImage="in-commerce/img/no_picture.gif" MaxWidth="250" DefaultWidth="250" /></a><br />
+					</td>
+					<td>
+						<a href="<inp2:p_ProductLink template="__default__"/>" class="link-product1"><inp2:p_field name="Name"/></a><br />
+
+						<inp2:m_if check="p_Field" name="ManufacturerId">
+							<strong><inp2:m_Phrase label="lu_comm_Manufacturer"/>:</strong> <inp2:p_field name="ManufacturerId"/> (<inp2:m_Phrase label="lu_comm_OtherProductsBy"/> <a href="<inp2:p_ManufacturerLink template="in-commerce/store/manufacturer_products" />"><inp2:p_Field name="ManufacturerId"/></a> <inp2:m_Phrase label="lu_comm_OtherProducts"/>) <br />
+						</inp2:m_if>
+						<br />
+
+						<strong><inp2:m_Phrase label="lu_comm_Description"/>:</strong> <inp2:p_Field name="Description"/> <br /><br />
+
+						<inp2:m_if check="p_CustomField" name="Features">
+							<strong><inp2:p_CustomFieldLabel field="Features"/>:</strong>
+							<inp2:p_CustomField name="Features"/>
+							<br />
+							<br />
+						</inp2:m_if>
+
+						<strong><inp2:m_Phrase label="lu_comm_Files"/>:</strong><br /><br />
+						<table>
+							<inp2:m_DefineElement name="file_row">
+								<inp2:m_if check="p_UniqueFileName">
+									<tr>
+										<td><inp2:m_Phrase label="lu_comm_Name"/>:</td><td><inp2:Field name="Name"/>&nbsp;</td>
+									</tr>
+								</inp2:m_if>
+								<tr>
+									<td><inp2:m_Phrase label="lu_comm_FileName"/>:</td><td><a href="<inp2:p_ProductFileLink template="in-commerce/my_account/download" />"><inp2:Field name="FilePath"/></a>&nbsp;</td>
+								</tr>
+								<inp2:m_if check="Field" name="Version">
+									<tr>
+										<td><inp2:m_Phrase label="lu_comm_Version"/>:</td><td><inp2:Field name="Version"/>&nbsp;</td>
+									</tr>
+								</inp2:m_if>
+								<tr>
+									<td><inp2:m_Phrase label="lu_comm_Size"/>:</td><td><inp2:Field name="Size" />&nbsp;</td>
+								</tr>
+								<tr>
+									<td><inp2:m_Phrase label="lu_comm_AddedOn"/>:</td><td><inp2:Field name="AddedOn" format="_regional_DateFormat"/>&nbsp;</td>
+								</tr>
+								<tr>
+									<td><inp2:m_Phrase label="lu_comm_DownloadLink"/>:</td><td><strong><a href="<inp2:p_ProductFileLink template="in-commerce/my_account/download" />"><inp2:m_Phrase label="lu_comm_DownloadNow" /></a></strong></td>
+								</tr>
+								<tr>
+									<td colspan="2"><hr /></td>
+								</tr>
+							</inp2:m_DefineElement>
+							<inp2:p_ListFiles render_as="file_row" per_page="-1" main_special="" />
+						</table>
+
+					</td>
+				</tr>
+			</table>
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/all_downloads.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate.tpl	(revision 12131)
@@ -0,0 +1,158 @@
+<script language="JavaScript">
+	function showAffiliateAgreement()
+	{
+		window.open('<inp2:m_Link template="in-commerce/my_account/affiliate_agreement" />', null, 'menubar=no,toolbars=no,width=500,height=300');
+	}
+</script>
+<inp2:m_if check="u_IsAffiliate">
+	<table class="block-no-border">
+		<tr>
+			<td class="block-header" colspan="2"><inp2:m_Phrase label="lu_comm_AffiliateStatistics"/></td>
+		</tr>
+		<inp2:m_if check="u_AffiliateIsNotActive">
+			<tr>
+				<td class="block-data" colspan="2">
+					<table class="warning">
+						<tr>
+							<td valign="top" align="left" class="block-data">
+								<img src="img/message.gif" alt="" width="19" height="19" />
+								<span class="warning-text"><inp2:m_Phrase label="lu_Warning"/></span><br />
+								<inp2:m_Phrase label="lu_comm_AffiliateIsPendingOrDisabled"/>
+							</td>
+						</tr>
+					</table>
+				</td>
+			</tr>
+		</inp2:m_if>
+		<tr>
+			<td class="block-data">
+				<a href="<inp2:m_Link template="in-commerce/my_account/affiliate_stat"/>"><strong><inp2:m_Phrase label="lu_comm_AffiliateStat"/></strong></a><br />
+				<inp2:m_Phrase label="lu_comm_AffiliateStatText"/>
+
+			</td>
+		</tr>
+		<tr>
+			<td class="block-data">
+				<a href="<inp2:m_Link template="in-commerce/my_account/affiliate_payments"/>"><strong><inp2:m_Phrase label="lu_comm_AffiliatePayments"/></strong></a><br />
+				<inp2:m_Phrase label="lu_comm_AffiliatePaymentsText"/>
+
+			</td>
+		</tr>
+		<tr>
+			<td class="block-data">
+				<a href="<inp2:m_Link template="in-commerce/my_account/affiliate_materials"/>"><strong><inp2:m_Phrase label="lu_comm_AffiliateMaterials"/></strong></a><br />
+				<inp2:m_Phrase label="lu_comm_AffiliateMaterialsText"/>
+
+			</td>
+		</tr>
+		<tr>
+			<td class="block-data">
+				<a href="<inp2:m_Link template="in-commerce/my_account/affiliate_payment_type"/>"><strong><inp2:m_Phrase label="lu_comm_ChangeAffiliatePaymentType"/></strong></a><br />
+				<inp2:m_Phrase label="lu_comm_ChangeAffiliatePaymentTypeText"/>
+
+			</td>
+		</tr>
+		<tr>
+			<td class="block-data">
+				<a href="javascript:showAffiliateAgreement()"><strong><inp2:m_Phrase label="lu_comm_TermsAndConditionsLink"/></strong></a><br />
+				<inp2:m_Phrase label="lu_comm_TermsAndConditionsText"/>
+
+			</td>
+		</tr>
+	</table>
+<inp2:m_else />
+	<form method="POST" enctype="multipart/form-data" action="<inp2:m_FormAction />">
+		<table class="block-no-border">
+			<tr>
+				<td class="block-header" colspan="3"><inp2:m_Phrase label="lu_comm_AffiliateRegistration"/></td>
+			</tr>
+
+			<tr>
+				<td class="block-data" colspan="3"><inp2:m_Phrase label="lu_comm_BecomeAnAffiliateDescription"/></td>
+			</tr>
+
+			<tr>
+				<td class="block-data">
+					<strong><inp2:m_phrase label="lu_comm_SSNField"/>*:</strong>
+				</td>
+				<td class="block-data">
+					<input type="text" name="SSN" id="SSN" value="<inp2:m_get var="SSN" />" />
+				</td>
+				<td class="error">
+					<inp2:m_if check="m_getequals" var="SSNRequiredError" value="1">
+						<inp2:m_Phrase label="lu_comm_FieldIsRequired" />
+					</inp2:m_if>&nbsp;
+				</td>
+			</tr>
+
+			<inp2:m_DefineElement name="affiliate_payment_type_elem">
+				<tr>
+					<td style="padding: 3px">
+						<input type="radio" name="PaymentTypeId" id="PaymentTypeId_<inp2:Field name="PaymentTypeId" />" value="<inp2:Field name="PaymentTypeId" />" <inp2:m_if check="u_AffiliatePaymentTypeChecked">checked</inp2:m_if> />
+					</td>
+					<td style="padding: 3px">
+						<label for="PaymentTypeId_<inp2:Field name="PaymentTypeId" />"><inp2:Field name="Name" /></label>
+					</td>
+				</tr>
+				<inp2:m_if check="Field" name="Description">
+					<tr>
+						<td style="padding: 3px">&nbsp;</td>
+						<td style="padding: 3px"><inp2:Field name="Description" />&nbsp;</td>
+					</tr>
+				</inp2:m_if>
+			</inp2:m_DefineElement>
+
+			<tr>
+				<td style="vertical-align: top;" class="block-data">
+					<strong><inp2:m_phrase label="lu_comm_ChooseAffiliatePaymentType"/>:</strong>
+				</td>
+				<td class="block-data">
+					<table class="block-no-border">
+						<inp2:u_ListAffiliatesPaymentTypes render_as="affiliate_payment_type_elem" />
+						<tr><td colspan="2" style="padding: 0px">&nbsp;</td></tr>
+					</table>
+				</td>
+				<td class="error">&nbsp;</td>
+			</tr>
+
+			<tr>
+				<td class="block-data">
+					<strong><inp2:m_phrase label="lu_comm_Comments"/>:</strong>
+				</td>
+				<td class="block-data">
+					<textarea name="Comments" id="Comments" cols="35" rows="5"><inp2:m_get var="Comments" /></textarea>
+				</td>
+				<td class="error">&nbsp;</td>
+			</tr>
+
+			<tr>
+				<td colspan="2" class="block-data">
+					<input type="checkbox" name="AgreeToAffiliateTerms" id="AgreeToAffiliateTerms" />
+					<strong><inp2:m_Phrase label="lu_comm_IAgreeTo" />
+					<a href="javascript:showAffiliateAgreement()"><inp2:m_Phrase label="lu_comm_AffiliateAgreement" /></a>
+					<inp2:m_Phrase label="lu_comm_TermsAndConditions" /></strong>
+					<script type="text/javascript">
+						function showAffiliateAgreement()
+						{
+							window.open('<inp2:m_Link template="in-commerce/my_account/affiliate_agreement" />', null, 'menubar=no,toolbars=no,width=500,height=300');
+						}
+					</script>
+				</td>
+				<td class="error">
+					<inp2:m_if check="m_getequals" var="MustAgreeToTerms" value="1">
+						<inp2:m_Phrase label="lu_comm_MustAgreeAffiliateTermsError" />
+					</inp2:m_if>&nbsp;
+				</td>
+			</tr>
+
+			<tr>
+				<td class="block-data" colspan="2" style="padding-top: 0px">
+					<input type="hidden" name="next_template" value="in-commerce/my_account/affiliate_thankyou" />
+					<input type="submit" class="button" name="events[affil][OnBecomeAffiliate]" id="events[affil][OnBecomeAffiliate]" value="<inp2:m_Phrase label="lu_comm_BecomeAnAffiliate"/>" />
+				</td>
+				<td class="error">&nbsp;</td>
+			</tr>
+
+		</table>
+	</form>
+</inp2:m_if>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.8.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_date_filter.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_date_filter.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_date_filter.tpl	(revision 12131)
@@ -0,0 +1,45 @@
+<form method="POST" action="<inp2:m_FormAction />">
+<table class="adv-search-form">
+	<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
+		<inp2:m_inc param="tab_index" by="1"/>
+		<td class="text">
+			<strong><inp2:m_phrase label="la_from_date"/></strong>
+		</td>
+		
+		<td>
+			<script src="inc/calendar.js"></script>				
+			<input type="text" name="<inp2:{$prefix}_SearchInputName field="$field" filter_type="date_range" type="from" grid="$grid_name"/>" id="<inp2:{$prefix}_SearchInputName field="$field" filter_type="date_range" type="from" grid="$grid_name"/>" value="<inp2:{$prefix}_SearchField field="$field" filter_type="date_range" type="from" grid="$grid_name"/>" size="<inp2:{$prefix}_SearchFormat field="{$field}_date" input_format="1" edit_size="1"/>" datepickerIcon="img/calendar.gif"/>
+				<span class="small">(<inp2:{$prefix}_SearchFormat field="{$field}_date" input_format="1" human="true"/>)</span>
+			<script type="text/javascript">
+				initCalendar("<inp2:{$prefix}_SearchInputName field="$field" filter_type="date_range" type="from" grid="$grid_name"/>", "<inp2:{$prefix}_SearchFormat field="{$field}_date" input_format="1"/>");
+			</script>
+			
+		</td>
+		
+		<td class="error"><inp2:{$prefix}_SearchError field="$field"/>&nbsp;</td>
+	</tr>
+	<tr>
+		<td class="text">
+			<strong><inp2:m_phrase label="la_to_date"/></strong>
+		</td>
+		
+		<td>
+			<input type="text" class="input-text" name="<inp2:{$prefix}_SearchInputName field="$field" filter_type="date_range" type="to" grid="$grid_name"/>" id="<inp2:{$prefix}_SearchInputName field="$field" filter_type="date_range" type="to" grid="$grid_name"/>" value="<inp2:{$prefix}_SearchField field="$field" filter_type="date_range" type="to" grid="$grid_name"/>" size="<inp2:{$prefix}_SearchFormat field="{$field}_date" input_format="1" edit_size="1"/>" datepickerIcon="img/calendar.gif"/>
+				<span class="small">(<inp2:{$prefix}_SearchFormat field="{$field}_date" input_format="1" human="true"/>)</span>
+			<script type="text/javascript">
+				initCalendar("<inp2:{$prefix}_SearchInputName field="$field" filter_type="date_range" type="to" grid="$grid_name"/>", "<inp2:{$prefix}_SearchFormat field="{$field}_date" input_format="1"/>");
+			</script>
+			
+		</td>
+		
+		<td class="error"><inp2:{$prefix}_SearchError field="$field"/>&nbsp;</td>
+	</tr>
+	<tr>
+		<td colspan="3" style="text-align: center;">
+			<input class="button" type="submit" name="events[<inp2:m_param name="prefix"/>][OnSearch]" value="<inp2:m_phrase label="lu_search" />">
+			<input class="button" type="submit" name="events[<inp2:m_param name="prefix"/>][OnSearchReset]" value="<inp2:m_phrase label="lu_reset" />">
+		</td>
+	</tr>
+</table>
+<input type="hidden" name="grid_name" value="<inp2:m_param name="grid_name"/>" />
+</form>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_date_filter.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_stat_orders_list.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_stat_orders_list.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_stat_orders_list.tpl	(revision 12131)
@@ -0,0 +1,81 @@
+<inp2:visits_InitList list_name="visitors_orders_list" types="myvisitororders" grid="visitsincommerce" per_page="5" />
+
+<table class="block-no-border">
+	<tr>
+		<td class="block-header">
+			<inp2:m_Phrase label="lu_comm_TotalOrders"/>
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="in-commerce/blocks/my_account/affiliate_date_filter" prefix="visits.incommerce" field="VisitDate" grid_name="visitsincommerce"/>
+<br />
+
+<table>
+	<tr>
+		<td style="text-align: center;">
+			<inp2:m_include template="in-commerce/blocks/my_account/affiliate_visitors_pagination" list_name="visitors_orders_list" data_exists="1"/>
+		</td>
+	</tr>
+</table>
+<br />
+
+<table>
+	<inp2:m_DefineElement name="myvisitors_header">
+		<tr class="cart-header">
+			<td style="width: 30%"><inp2:m_Phrase label="lu_comm_Date"/></td>
+			<td style="width: 30%"><inp2:m_Phrase label="lu_comm_OrderNumber"/></td>
+
+			<td style="text-align: center; width: 15%"><inp2:m_Phrase label="lu_comm_OrderTotalAmount"/></td>
+			<td style="text-align: center; width: 15%"><inp2:m_Phrase label="lu_comm_OrderCommissionEarned"/></td>
+
+		</tr>
+	</inp2:m_DefineElement>
+
+	<inp2:m_DefineElement name="myvisitors_item">
+		<tr class="cart-item">
+			<td ><inp2:Field field="VisitDate" format="_regional_DateFormat"/></td>
+			<td ><inp2:Field field="OrderNumber"/></td>
+			<td style="text-align: right">
+				<strong><inp2:Field field="OrderTotalAmount" currency="selected"/></strong>
+			</td>
+			<td style="text-align: right">
+				<strong><inp2:Field field="OrderAffiliateCommission" currency="selected"/></strong>
+			</td>
+
+		</tr>
+	</inp2:m_DefineElement>
+
+	<inp2:m_DefineElement name="myvisitors_empty">
+		<tr class="block-data">
+			<td>
+				<strong><inp2:m_Phrase label="lu_comm_DontHaveOrders"/></strong>
+			</td>
+		</tr>
+	</inp2:m_DefineElement>
+
+	<inp2:m_DefineElement name="affiliate_info" >
+		<tr>
+			<td class="block-data">&nbsp;</td>
+			<td class="block-data">&nbsp;</td>
+			<td class="block-data" style="text-align: right">
+				<inp2:m_Phrase label="lu_comm_Total"/>:
+				<inp2:m_param name="OrderTotalAmount" />
+			</td>
+			<td class="block-data" style="text-align: right">
+				<inp2:m_Phrase label="lu_comm_Total"/>:
+				<inp2:m_param name="OrderAffiliateCommission" />
+			</td>
+		</tr>
+	</inp2:m_DefineElement>
+
+	<inp2:m_DefineElement name="myvisitors_footer">
+		<inp2:AffiliateOrderInfo list_name="visitors_orders_list" types="myvisitororders" render_as="affiliate_info" currency="selected" />
+	</inp2:m_DefineElement>
+
+	<inp2:visits_ListVisitors list_name="visitors_orders_list" item_render_as="myvisitors_item" header_render_as="myvisitors_header" footer_render_as="myvisitors_footer" empty_myvisitors_render_as="myvisitors_empty" />
+
+
+
+
+</table>

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_stat_orders_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3.16.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_stat_visits_list.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_stat_visits_list.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_stat_visits_list.tpl	(revision 12131)
@@ -0,0 +1,85 @@
+<inp2:visits_InitList list_name="visitors_list" types="myvisitors" grid="visitsincommerce" per_page="5" />
+
+<table class="block-no-border">
+	<tr>
+		<td class="block-header">
+			<inp2:m_Phrase label="lu_comm_TotalVisitors"/>
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="in-commerce/blocks/my_account/affiliate_date_filter" prefix="visits.incommerce" field="VisitDate" grid_name="visitsincommerce"/>
+<br />
+
+<table>
+	<tr>
+		<td style="text-align: center;">
+			<inp2:m_include template="in-commerce/blocks/my_account/affiliate_visitors_pagination" list_name="visitors_list" data_exists="1"/>
+		</td>
+	</tr>
+</table>
+<br />
+
+<table>
+	<inp2:m_DefineElement name="myvisitors_header">
+		<tr class="cart-header">
+			<td style="width: 30%"><inp2:m_Phrase label="lu_comm_Date"/></td>
+			<td style="width: 30%"><inp2:m_Phrase label="lu_comm_Referer"/></td>
+			<td ><inp2:m_Phrase label="lu_comm_OrderCount"/></td>
+			<td style="text-align: center; width: 15%"><inp2:m_Phrase label="lu_comm_OrderTotalAmount"/></td>
+			<td style="text-align: center; width: 15%"><inp2:m_Phrase label="lu_comm_OrderCommissionEarned"/></td>
+
+		</tr>
+	</inp2:m_DefineElement>
+
+	<inp2:m_DefineElement name="affiliate_info" >
+		<tr>
+			<td class="block-data">&nbsp;</td>
+			<td class="block-data">&nbsp;</td>
+			<td class="block-data">&nbsp;</td>
+			<td class="block-data" style="text-align: right">
+				<inp2:m_Phrase label="lu_comm_Total"/>:
+				<inp2:m_param name="OrderTotalAmount" />
+			</td>
+			<td class="block-data" style="text-align: right">
+				<inp2:m_Phrase label="lu_comm_Total"/>:
+				<inp2:m_param name="OrderAffiliateCommission" />
+			</td>
+		</tr>
+	</inp2:m_DefineElement>
+
+	<inp2:m_DefineElement name="myvisitors_footer">
+		<inp2:AffiliateOrderInfo list_name="visitors_list" types="myvisitors" render_as="affiliate_info" currency="selected" />
+	</inp2:m_DefineElement>
+
+	<inp2:m_DefineElement name="myvisitors_item">
+		<tr class="cart-item">
+			<td ><inp2:Field field="VisitDate" format="_regional_DateFormat"/></td>
+			<td >
+			<inp2:m_if check="FieldEquals" field="Referer" value="">
+				<inp2:m_Phrase label="lu_visit_DirectReferer"/>
+			<inp2:m_else/>
+				<div style="overflow: hidden"><a href="<inp2:Field field="Referer"/>"><inp2:Field field="Referer"/></a></div>
+			</inp2:m_if>
+			</td>
+			<td ><inp2:Field field="OrderCountByVisit" /></td>
+			<td style="text-align: right">
+				<strong><inp2:Field field="OrderTotalAmountSum" currency="selected"/> </strong>
+			</td>
+			<td style="text-align: right">
+				<strong><inp2:Field field="OrderAffiliateCommissionSum" currency="selected"/></strong>
+			</td>
+
+		</tr>
+	</inp2:m_DefineElement>
+
+	<inp2:m_DefineElement name="myvisitors_empty">
+		<tr class="block-data">
+			<td>
+				<strong><inp2:m_Phrase label="lu_comm_DontHaveVisitors"/></strong>
+			</td>
+		</tr>
+	</inp2:m_DefineElement>
+
+	<inp2:visits_ListVisitors list_name="visitors_list" item_render_as="myvisitors_item" header_render_as="myvisitors_header" footer_render_as="myvisitors_footer" empty_myvisitors_render_as="myvisitors_empty" />
+</table>

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_stat_visits_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.26.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_stat.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_stat.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_stat.tpl	(revision 12131)
@@ -0,0 +1,67 @@
+<inp2:visits_InitList list_name="visitors_list" types="myvisitors" grid="visitsincommerce" per_page="5" />
+<table class="block-no-border">
+	<tr>
+		<td class="block-header">
+			<inp2:m_Phrase label="lu_comm_AffiliateStatistics"/>
+		</td>
+	</tr>
+</table>
+
+
+
+
+<inp2:m_DefineElement name="affiliate_info" >
+
+	<table class="adv-search-form" style="width: 50%">
+		<tr>
+			<td class="block-data">
+				<inp2:m_Phrase label="lu_comm_TotalVisitors"/>
+			</td>
+			<td class="block-data">
+				<inp2:m_param name="TotalVisitors" />
+			</td>
+			<td class="block-data">
+				<a href="<inp2:m_Link template="in-commerce/my_account/affiliate_stat_visits_list"/>"><inp2:m_Phrase label="lu_comm_details"/></a>
+			</td>
+		</tr>
+		<tr>
+			<td class="block-data">
+				<inp2:m_Phrase label="lu_comm_TotalOrders"/>
+			</td>
+			<td class="block-data">
+				<inp2:m_param name="OrderCount" />
+			</td>
+			<td class="block-data">
+				<a href="<inp2:m_Link template="in-commerce/my_account/affiliate_stat_orders_list"/>"><inp2:m_Phrase label="lu_comm_details"/></a>
+			</td>
+		</tr>
+		<tr>
+			<td class="block-data">
+				<inp2:m_Phrase label="lu_comm_TotalOrderAmount"/>
+			</td>
+			<td class="block-data">
+				<inp2:m_param name="OrderTotalAmount" />
+			</td>
+			<td class="block-data">
+				<a href="<inp2:m_Link template="in-commerce/my_account/affiliate_stat_orders_list"/>"><inp2:m_Phrase label="lu_comm_details"/></a>
+			</td>
+		</tr>
+		<tr>
+			<td class="block-data">
+				<inp2:m_Phrase label="lu_comm_TotalCommissionEarned"/>
+			</td>
+			<td class="block-data">
+				<inp2:m_param name="OrderAffiliateCommission" />
+			</td>
+			<td class="block-data">
+				<a href="<inp2:m_Link template="in-commerce/my_account/affiliate_stat_orders_list"/>"><inp2:m_Phrase label="lu_comm_details"/></a>
+			</td>
+		</tr>
+	</table>
+</inp2:m_DefineElement>
+
+<inp2:m_include template="in-commerce/blocks/my_account/affiliate_date_filter" prefix="visits.incommerce" field="VisitDate" grid_name="visitsincommerce"/>
+<br />
+
+<inp2:visits_AffiliateOrderInfo list_name="visitors_list" types="myvisitors" render_as="affiliate_info" currency="selected" />
+

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_stat.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5.22.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/address_edit.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/address_edit.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/address_edit.tpl	(revision 12131)
@@ -0,0 +1,182 @@
+<inp2:m_DefineElement name="destination">
+	<option value="<inp2:m_param name="key"/>"<inp2:m_param name="selected"/>><inp2:m_param name="option"/></option>
+</inp2:m_DefineElement>
+
+<form method="post" action="<inp2:m_FormAction />">
+
+<table class="block-no-border">
+	<tr>
+		<td class="block-header" colspan="2">
+			<inp2:m_Phrase label="lu_comm_MyAddresses"/>
+
+		</td>
+	</tr>
+	<tr>
+		<td class="block-data">
+			<inp2:m_if check="addr_HasError" field="any">
+				<table class="warning">
+					<tr>
+						<td valign="top" align="left" class="block-data">
+							<img src="img/message.gif" alt="" width="19" height="19" />
+							<span class="warning-text"><inp2:m_Phrase label="lu_Warning"/></span><br />
+							<inp2:m_Phrase label="lu_AProblemWithForm"/>
+
+						</td>
+					</tr>
+				</table>
+			</inp2:m_if>
+			<inp2:m_if check="u.current_Field" name="cust_shipping_addr_block">
+
+				<strong><inp2:m_Phrase label="lu_AddressModificationBlocked"/></strong>
+
+			<inp2:m_else/>
+				<strong>* <inp2:m_Phrase label="lu_IndicatesRequired"/>.</strong> 	<br /><br />
+
+				<table class="form-data">
+					<tr>
+						<td class="block-data">
+							<strong><inp2:m_Phrase label="lu_comm_FullName"/> *:</strong>
+						</td>
+						<td class="block-data">
+							<input type="text" name="<inp2:addr_InputName field="To"/>" value="<inp2:addr_Field name="To"/>" style="width: 200px;" />
+						</td>
+						<td width="170" class="error"><inp2:addr_Error field="To"/></td>
+					</tr>
+
+					<tr>
+						<td class="block-data">
+							<strong><inp2:m_Phrase label="lu_comm_Company"/>:</strong>
+						</td>
+						<td class="block-data">
+							<input type="text" name="<inp2:addr_InputName field="Company"/>" value="<inp2:addr_Field name="Company"/>" style="width: 200px;" />
+						</td>
+						<td width="170" class="error"><inp2:addr_Error field="Company"/></td>
+					</tr>
+
+					<tr>
+						<td class="block-data">
+							<strong><inp2:m_Phrase label="lu_comm_AddressLine"/> 1 *:</strong>
+						</td>
+						<td class="block-data">
+							<input type="text" name="<inp2:addr_InputName field="Address1"/>" value="<inp2:addr_Field name="Address1"/>" style="width: 300px;" />
+						</td>
+						<td width="170" class="error"><inp2:addr_Error field="Address1"/></td>
+					</tr>
+
+					<tr>
+						<td class="block-data">
+							<strong><inp2:m_Phrase label="lu_comm_AddressLine"/> 2:</strong>
+						</td>
+						<td class="block-data">
+							<input type="text" name="<inp2:addr_InputName field="Address2"/>" value="<inp2:addr_Field name="Address2"/>" style="width: 300px;" />
+						</td>
+						<td width="170" class="error"><inp2:addr_Error field="Address2"/></td>
+					</tr>
+
+					<tr>
+						<td class="block-data">
+							<strong><inp2:m_Phrase label="lu_City"/> *:</strong>
+						</td>
+						<td class="block-data">
+							<input type="text" name="<inp2:addr_InputName field="City"/>" value="<inp2:addr_Field name="City"/>" style="width: 100px;" />
+						</td>
+						<td width="170" class="error"><inp2:addr_Error field="City"/></td>
+					</tr>
+
+					<tr>
+						<td>
+							<strong><inp2:m_phrase label="lu_state"/> *:</strong></td>
+						<td>
+							<input type="text" name="<inp2:addr_InputName field="State"/>" value="<inp2:addr_Field name="State"/>" style="width: 200px;" />
+						</td>
+						<td class="error"><inp2:addr_Error field="State"/></td>
+					</tr>
+
+					<tr>
+						<td class="block-data">
+							<strong><inp2:m_Phrase label="lu_comm_ZipCode"/> *:</strong>
+						</td>
+						<td class="block-data">
+							<input type="text" name="<inp2:addr_InputName field="Zip"/>" value="<inp2:addr_Field name="Zip"/>" style="width: 60px;" />
+						</td>
+						<td width="170" class="error"><inp2:addr_Error field="Zip"/></td>
+					</tr>
+
+					<tr>
+						<td>
+							<strong><inp2:m_phrase label="lu_country"/> *:</strong></td>
+						<td>
+							<select name="<inp2:addr_InputName field="Country"/>" style="width: 300px;">
+								<option value=""></option>
+								<inp2:addr_PredefinedOptions field="Country" render_as="destination" selected_param="selected" selected="selected=\"selected\""/>
+							</select>
+						</td>
+						<td class="error"><inp2:addr_Error field="Country"/></td>
+					</tr>
+
+					<tr>
+						<td class="block-data">
+							<strong><inp2:m_Phrase label="lu_Phone"/> *:</strong>
+						</td>
+						<td class="block-data">
+							<input type="text" name="<inp2:addr_InputName field="Phone"/>" value="<inp2:addr_Field name="Phone"/>" style="width: 150px;" />
+						</td>
+						<td width="170" class="error"><inp2:addr_Error field="Phone"/></td>
+					</tr>
+
+					<tr>
+						<td class="block-data">
+							<strong><inp2:m_Phrase label="lu_Fax"/>:</strong>
+						</td>
+						<td class="block-data">
+							<input type="text" name="<inp2:addr_InputName field="Fax"/>" value="<inp2:addr_Field name="Fax"/>" style="width: 150px;" />
+						</td>
+						<td width="170" class="error"><inp2:addr_Error field="Fax"/></td>
+					</tr>
+
+					<tr>
+						<td class="block-data">
+							<strong><inp2:m_Phrase label="lu_Email"/>:</strong>
+						</td>
+						<td class="block-data">
+							<input type="text" name="<inp2:addr_InputName field="Email"/>" value="<inp2:addr_Field field="Email"/>" style="width: 200px;" />
+						</td>
+						<td width="170" class="error"><inp2:addr_Error field="Email"/></td>
+					</tr>
+
+					<tr>
+						<td class="block-data">
+							<strong><inp2:m_Phrase label="lu_LastUsedAsShipping"/>:</strong>
+						</td>
+						<td class="block-data">
+							<input type="checkbox" name="<inp2:addr_InputName field="LastUsedAsShipping"/>" value="1"<inp2:m_if check="addr_Field" field="LastUsedAsShipping" value="1"> checked</inp2:m_if> />
+						</td>
+						<td width="170" class="error"><inp2:addr_Error field="LastUsedAsShipping"/></td>
+					</tr>
+
+					<tr>
+						<td class="block-data">
+							<strong><inp2:m_Phrase label="lu_LastUsedAsBilling"/>:</strong>
+						</td>
+						<td class="block-data">
+							<input type="checkbox" name="<inp2:addr_InputName field="LastUsedAsBilling"/>" value="1"<inp2:m_if check="addr_Field" field="LastUsedAsBilling" value="1"> checked</inp2:m_if> />
+						</td>
+						<td width="170" class="error"><inp2:addr_Error field="LastUsedAsBilling"/></td>
+					</tr>
+
+					<tr>
+						<td colspan="3" valign="bottom" height="35">
+							<input class="button" type="submit" name="events[addr][<inp2:addr_SaveEvent/>]" value="<inp2:m_if check="addr_IsNewMode"><inp2:m_Phrase label="lu_comm_Create"/><inp2:m_else/><inp2:m_Phrase label="lu_comm_Update"/></inp2:m_if>"/>
+							<input type="hidden" name="<inp2:addr_InputName field="PortalUserId"/>" value="<inp2:addr_Field field="PortalUserId"/>" />
+							<input type="hidden" name="next_template" value="in-commerce/my_account/address"/>
+						</td>
+					</tr>
+				</table>
+
+			</inp2:m_if>
+
+		</td>
+	</tr>
+
+</table>
+</form>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/address_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/address_list.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/address_list.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/address_list.tpl	(revision 12131)
@@ -0,0 +1,87 @@
+<inp2:addr_InitList list_name="my_addresses_list" types="myaddresses" per_page="10" />
+
+<table class="block-no-border">
+	<tr>
+		<td class="block-header">
+			<inp2:m_Phrase label="lu_comm_MyAddresses"/>
+		</td>
+	</tr>
+</table>
+
+<table>
+	<tr>
+		<td style="text-align: center;">
+			<inp2:m_include template="in-commerce/blocks/my_account/address_pagination" list_name="my_addresses_list" data_exists="1"/>
+		</td>
+	</tr>
+</table>
+<br />
+	<inp2:m_DefineElement name="myaddress_item_tr">
+		<tr class="cart-item">
+			<td>
+				<strong><inp2:Field field="To"/></strong><br />
+				<inp2:m_if check="Field" name="Company">
+					<inp2:Field field="Company"/><br />
+				</inp2:m_if>
+				<inp2:m_if check="FieldEquals" field="Address1" value="" inverse="inverse">
+					<inp2:Field field="Address1"/><br />
+				</inp2:m_if>
+
+				<inp2:m_if check="FieldEquals" field="Address2" value="" inverse="inverse">
+					<inp2:Field field="Address2"/><br />
+				</inp2:m_if>
+				<inp2:PrintLocation/><br />
+			</td>
+			<td>
+				<inp2:m_if check="Field" name="Email">
+					<inp2:Field field="Email"/><br />
+				</inp2:m_if>
+
+				<inp2:m_if check="Field" name="Phone">
+					<inp2:m_Phrase name="lu_Phone"/>: <inp2:Field field="Phone"/><br />
+				</inp2:m_if>
+
+				<inp2:m_if check="Field" name="Fax">
+					<inp2:m_Phrase name="lu_Fax"/>: <inp2:Field field="Fax"/><br />
+				</inp2:m_if>
+			</td>
+			<td>
+				<inp2:m_if check="Field" field="LastUsedAsShipping" value="1"><inp2:m_Phrase label="lu_LastUsedAsShipping"/><br/></inp2:m_if>
+				<inp2:m_if check="Field" field="LastUsedAsBilling" value="1"><inp2:m_Phrase label="lu_LastUsedAsBilling"/></inp2:m_if>
+				<br />
+			</td>
+			<td>
+				<inp2:m_if check="u.current_Field" name="cust_shipping_addr_block" inverse="1">
+					<inp2:m_if check="IsProfileAddress">
+						<a href="<inp2:m_Link template="in-commerce/my_account/profile"/>"><inp2:m_Phrase label="lu_Edit"/></a>
+					<inp2:m_else />
+					<a href="<inp2:EditLink template="in-commerce/my_account/address_edit"/>"><inp2:m_Phrase label="lu_Edit"/></a>
+					<a href="javascript:if(confirm('<inp2:m_Phrase name="lu_comm_DeleteAddress" escape="1"/> ?')) window.location.href = '<inp2:DeleteLink escape="1"/>';"><inp2:m_Phrase label="lu_Delete"/></a>
+					</inp2:m_if>
+				</inp2:m_if>
+				<br /><br />
+			</td>
+		</tr>
+	</inp2:m_DefineElement>
+
+	<inp2:m_DefineElement name="myaddress_empty">
+		<td>
+			<strong><inp2:m_Phrase label="lu_comm_DontHaveAddresses"/></strong>
+		</td>
+	</inp2:m_DefineElement>
+
+	<inp2:m_if check="ord_AllowAddAddress">
+		<div style="margin: 10px; display: inline;">
+			<a href="<inp2:addr_NewLink template="in-commerce/my_account/address_edit"/>"><inp2:m_Phrase label="lu_Comm_NewAddress"/></a> <br /><br />
+		</div>
+	</inp2:m_if>
+
+	<table>
+		<tr class="cart-header">
+			<td><inp2:m_Phrase label="lu_Address"/></td>
+			<td><inp2:m_Phrase label="lu_ContactInfo"/></td>
+			<td><inp2:m_Phrase label="lu_AddressUsedAs"/></td>
+			<td>&nbsp;</td>
+		</tr>
+		<inp2:addr_ListAddresses list_name="my_addresses_list" columns="1" direction="H" render_as="myaddress_item_tr" empty_myaddresses_render_as="myaddress_empty" row_start_render_as="html:" row_end_render_as="html:"/>
+	</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/address_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_payment_type.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_payment_type.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_payment_type.tpl	(revision 12131)
@@ -0,0 +1,71 @@
+<form method="POST" enctype="multipart/form-data" action="<inp2:m_FormAction />">
+	<table class="block-no-border">
+		<tr>
+			<td class="block-header" colspan="3"><inp2:m_Phrase label="lu_comm_AffiliatePaymentType"/></td>
+		</tr>
+
+		<tr>
+			<td class="block-data">
+				<strong><inp2:m_Phrase label="lu_comm_CurrentAffiliatePaymentType" />:</strong>
+			</td>
+			<td class="block-data" colspan="2">
+				<inp2:u_AffiliateField name="PaymentTypeId" />
+			</td>
+		</tr>
+
+		<tr>
+			<td class="block-data" colspan="3">
+				<inp2:m_Phrase label="lu_comm_ChangeAffiliatePaymentTypeDescription"/>
+			</td>
+		</tr>
+
+		<inp2:m_DefineElement name="affiliate_payment_type_elem">
+			<tr>
+				<td style="padding: 3px">
+					<input type="radio" name="PaymentTypeId" id="PaymentTypeId_<inp2:Field name="PaymentTypeId" />" value="<inp2:Field name="PaymentTypeId" />" <inp2:m_if check="u_AffiliatePaymentTypeChecked">checked</inp2:m_if> />
+				</td>
+				<td style="padding: 3px">
+					<label for="PaymentTypeId_<inp2:Field name="PaymentTypeId" />"><inp2:Field name="Name" /></label>
+				</td>
+			</tr>
+			<inp2:m_if check="Field" name="Description">
+				<tr>
+					<td style="padding: 3px">&nbsp;</td>
+					<td style="padding: 3px"><inp2:Field name="Description" />&nbsp;</td>
+				</tr>
+			</inp2:m_if>
+		</inp2:m_DefineElement>
+
+		<tr>
+			<td style="vertical-align: top;" class="block-data">
+				<strong><inp2:m_phrase label="lu_comm_ChooseAffiliatePaymentType"/>:</strong>
+			</td>
+			<td class="block-data" style="padding-bottom: 0px">
+				<table class="block-no-border">
+					<inp2:u_ListAffiliatesPaymentTypes render_as="affiliate_payment_type_elem" />
+					<tr><td colspan="2" style="padding: 0px">&nbsp;</td></tr>
+				</table>
+			</td>
+			<td class="error">&nbsp;</td>
+		</tr>
+
+		<tr>
+			<td class="block-data">
+				<strong><inp2:m_phrase label="lu_comm_Comments"/>:</strong>
+			</td>
+			<td class="block-data">
+				<textarea name="Comments" id="Comments" cols="35" rows="5"><inp2:u_AffiliateField name="Comments" /></textarea>
+			</td>
+			<td class="error">&nbsp;</td>
+		</tr>
+
+		<tr>
+			<td class="block-data" colspan="2" style="padding-top: 0px">
+				<input type="hidden" name="next_template" value="in-commerce/my_account/affiliate_payment_type_changed" />
+				<input type="submit" class="button" name="events[affil][OnChangePaymentType]" id="events[affil][OnChangePaymentType]" value="<inp2:m_Phrase label="lu_comm_ChangePaymentType"/>" />
+			</td>
+			<td class="error">&nbsp;</td>
+		</tr>
+
+	</table>
+</form>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_payment_type.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/my_account.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/my_account.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/my_account.tpl	(revision 12131)
@@ -0,0 +1,60 @@
+<table class="block-no-border">
+	<tr>
+		<td class="block-header" colspan="2"><inp2:m_Phrase label="lu_comm_MyAccount"/></td>
+	</tr>
+	<tr>
+		<td class="block-data">
+			<a href="<inp2:m_Link template="in-commerce/my_account/profile"/>"><strong><inp2:m_Phrase label="lu_comm_PersonalInfo"/></strong></a><br />
+			<inp2:m_Phrase label="lu_comm_PersonalInfoText"/>
+
+		</td>
+	</tr>
+	<tr>
+		<td class="block-data">
+			<a href="<inp2:m_Link template="in-commerce/my_account/address"/>"><strong><inp2:m_Phrase label="lu_comm_AddressList"/></strong></a><br />
+			<inp2:m_Phrase label="lu_commAddressListText"/>
+
+		</td>
+	</tr>
+	<tr>
+		<td class="block-data">
+			<a href="<inp2:m_Link template="in-commerce/my_account/wishlist"/>"><strong><inp2:m_Phrase label="lu_comm_WishList"/></strong></a><br />
+			<inp2:m_Phrase label="lu_comm_WishListText"/>
+
+		</td>
+	</tr>
+	<tr>
+		<td class="block-data">
+			<a href="<inp2:m_Link template="in-commerce/my_account/orders"/>"><strong><inp2:m_Phrase label="lu_comm_Orders"/></strong></a><br />
+			<inp2:m_Phrase label="lu_comm_OrdersText"/>
+
+		</td>
+	</tr>
+	<tr>
+		<td class="block-data">
+			<a href="<inp2:m_Link template="in-commerce/my_account/downloads"/>"><strong><inp2:m_Phrase label="lu_comm_Downloads"/></strong></a><br />
+			<inp2:m_Phrase label="lu_comm_DownloadsText"/>
+
+		</td>
+	</tr>
+
+	<inp2:m_if check="u_IsAffiliateOrRegisterAsAffiliateAllowed">
+		<tr>
+			<td class="block-data">
+				<a href="<inp2:m_Link template="in-commerce/my_account/affiliate"/>"><strong><inp2:m_Phrase label="lu_comm_Affiliate"/></strong></a><br />
+				<inp2:m_Phrase label="lu_comm_AffiliateText"/>
+
+			</td>
+		</tr>
+	</inp2:m_if>
+
+	<inp2:m_if check="m_LoggedIn">
+		<tr>
+			<td class="block-data">
+				<a href="<inp2:u_LogoutLink />"><strong><inp2:m_Phrase label="lu_Logout"/></strong></a><br />
+				<inp2:m_Phrase label="lu_LogoutText"/>
+
+			</td>
+		</tr>
+	</inp2:m_if>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/my_account.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/my_profile.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/my_profile.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/my_profile.tpl	(revision 12131)
@@ -0,0 +1,194 @@
+<inp2:m_DefineElement name="destination">
+	<option value="<inp2:m_param name="key"/>"<inp2:m_param name="selected"/>><inp2:m_param name="option"/></option>
+</inp2:m_DefineElement>
+
+<form method="post" action="<inp2:m_FormAction />">
+
+<table class="block-no-border"> 
+	<tr> 
+		<td class="block-header" colspan="2">
+			<inp2:m_Phrase label="lu_comm_PersonalInfo"/>
+			
+		</td> 
+	</tr> 
+	<tr>
+		<td class="block-data">
+			<inp2:m_if check="u_HasError" field="any">
+				<table class="warning">
+					<tr>
+						<td valign="top" align="left" class="block-data">
+							<img src="img/message.gif" alt="" width="19" height="19" />
+							<span class="warning-text"><inp2:m_Phrase label="lu_Warning"/></span><br />
+							<inp2:m_Phrase label="lu_AProblemWithForm"/>
+							
+						</td>
+					</tr>
+				</table>
+			</inp2:m_if>
+			<strong>* <inp2:m_Phrase label="lu_IndicatesRequired"/>.</strong> 	<br /><br />
+	
+			<table class="form-data">
+				<tr> 
+					<td class="block-data">
+						<strong><inp2:m_Phrase label="lu_Password"/>:</strong>
+					</td> 
+					<td class="block-data">
+						<input type="password" name="<inp2:u_InputName field="Password"/>" value="" style="width: 100px;" />
+					</td>
+					<td width="170" class="error"><inp2:u_Error field="Password"/></td>
+				</tr>
+		
+				<tr> 
+					<td class="block-data">
+						<strong><inp2:m_Phrase label="lu_VerifyPassword"/>:</strong>
+					</td> 
+					<td class="block-data">
+						<input type="password" name="<inp2:u_InputName field="VerifyPassword"/>" value="" style="width: 100px;" />
+					</td>
+					<td width="170" class="error"><inp2:u_Error field="VerifyPassword"/></td>
+				</tr>
+
+				<tr>
+					<td class="block-data">
+						<strong><inp2:m_Phrase label="lu_comm_FirstName"/>:</strong>
+					</td>
+					<td class="block-data">
+						<input type="text" name="<inp2:u_InputName field="FirstName"/>" value="<inp2:u_Field name="FirstName"/>" style="width: 200px;" />
+					</td>
+					<td width="170" class="error"><inp2:u_Error field="FirstName"/></td>
+				</tr>
+					
+				<tr>
+					<td class="block-data">
+						<strong><inp2:m_Phrase label="lu_comm_LastName"/>:</strong>
+					</td>
+					<td class="block-data">
+						<input type="text" name="<inp2:u_InputName field="LastName"/>" value="<inp2:u_Field name="LastName"/>" style="width: 200px;" />
+					</td>
+					<td width="170" class="error"><inp2:u_Error field="LastName"/></td>
+				</tr>
+				
+				<tr>
+					<td class="block-data">
+						<strong><inp2:m_Phrase label="lu_company"/>:</strong>
+					</td>
+					<td class="block-data">
+						<input type="text" name="<inp2:u_InputName field="Company"/>" value="<inp2:u_Field name="Company"/>" style="width: 200px;" />
+					</td>
+					<td width="170" class="error"><inp2:u_Error field="Company"/></td>
+				</tr>
+					
+				<tr> 
+					<td class="block-data">
+						<strong><inp2:m_Phrase label="lu_Phone"/>:</strong>
+					</td> 
+					<td class="block-data">
+						<input type="text" name="<inp2:u_InputName field="Phone"/>" value="<inp2:u_Field name="Phone"/>" style="width: 150px;" />
+					</td>
+					<td width="170" class="error"><inp2:u_Error field="Phone"/></td>
+				</tr>
+				
+				<tr> 
+					<td class="block-data">
+						<strong><inp2:m_Phrase label="lu_Fax"/>:</strong>
+					</td> 
+					<td class="block-data">
+						<input type="text" name="<inp2:u_InputName field="Fax"/>" value="<inp2:u_Field name="Fax"/>" style="width: 150px;" />
+					</td>
+					<td width="170" class="error"><inp2:u_Error field="Fax"/></td>
+				</tr>
+
+				<tr> 
+					<td class="block-data">
+						<strong><inp2:m_Phrase label="lu_comm_BirthDate"/> *:</strong><br>
+					</td> 
+					<td class="block-data">
+						<script src="inc/calendar.js"></script>
+						<input type="text" name="<inp2:u_InputName field="dob_date"/>" id="<inp2:u_InputName field="dob_date"/>" value="<inp2:u_Field name="dob_date" format="_regional_InputDateFormat"/>" style="width: 100px;" datepickerIcon="img/calendar.gif"/>
+						<script type="text/javascript">
+							initCalendar('<inp2:u_InputName field="dob_date"/>', "<inp2:u_Format field="dob_date" input_format="1"/>");
+						</script>
+						(<inp2:u_Format field="dob_date" input_format="1" human="true"/>, ex. <inp2:u_Format field="dob_date" sample="true"/>)
+					</td>
+					<td width="170" class="error"><inp2:u_Error field="dob_date"/></td>
+				</tr>
+					
+				<tr> 
+					<td class="block-data">
+						<strong><inp2:m_Phrase label="lu_Email"/> *:</strong>
+					</td> 
+					<td class="block-data">
+						<input type="text" name="<inp2:u_InputName field="Email"/>" value="<inp2:u_Field field="Email"/>" style="width: 200px;" />
+					</td>
+					<td width="170" class="error"><inp2:u_Error field="Email"/></td>
+				</tr>	
+						
+				<tr> 
+					<td class="block-data">
+						<strong><inp2:m_Phrase label="lu_comm_AddressLine"/> 1:</strong>
+					</td> 
+					<td class="block-data">
+						<input type="text" name="<inp2:u_InputName field="Street"/>" value="<inp2:u_Field name="Street"/>" style="width: 300px;" />
+					</td>
+					<td width="170" class="error"><inp2:u_Error field="Street"/></td>
+				</tr>
+				
+				<tr> 
+					<td class="block-data">
+						<strong><inp2:m_Phrase label="lu_comm_AddressLine"/> 2:</strong>
+					</td> 
+					<td class="block-data">
+						<input type="text" name="<inp2:u_InputName field="Street2"/>" value="<inp2:u_Field name="Street2"/>" style="width: 300px;" />
+					</td>
+					<td width="170" class="error"><inp2:u_Error field="Street2"/></td>
+				</tr>
+					
+				<tr> 
+					<td class="block-data">
+						<strong><inp2:m_Phrase label="lu_City"/>:</strong>
+					</td> 
+					<td class="block-data">
+						<input type="text" name="<inp2:u_InputName field="City"/>" value="<inp2:u_Field name="City"/>" style="width: 100px;" />
+					</td>
+					<td width="170" class="error"><inp2:u_Error field="City"/></td>
+				</tr>	
+				<tr>
+					<td>
+						<strong><inp2:m_phrase label="lu_state"/>:</strong></td>
+					<td>
+						<input type="text" name="<inp2:u_InputName field="State"/>" value="<inp2:u_Field name="State"/>" style="width: 200px;" />
+					</td>
+					<td class="error"><inp2:u_Error field="State"/></td>
+				</tr>
+				<tr> 
+					<td class="block-data">
+						<strong><inp2:m_Phrase label="lu_comm_ZipCode"/>:</strong>
+					</td> 
+					<td class="block-data">
+						<input type="text" name="<inp2:u_InputName field="Zip"/>" value="<inp2:u_Field name="Zip"/>" style="width: 60px;" />
+					</td>
+					<td width="170" class="error"><inp2:u_Error field="Zip"/></td>
+				</tr>	
+				<tr>
+					<td>
+						<strong><inp2:m_phrase label="lu_country"/>:</strong></td>
+					<td>
+						<select name="<inp2:u_InputName field="Country"/>" style="width: 300px;">
+							<option value=""></option>
+							<inp2:u_PredefinedOptions field="Country" render_as="destination" selected_param="selected" selected="selected=\"selected\""/>
+						</select>
+					</td>
+					<td class="error"><inp2:u_Error field="Country"/></td>
+				</tr>
+				<tr>
+					<td colspan="3" valign="bottom" height="35">
+						<input class="button" type="submit" id="events[u][OnUpdate]" name="events[u][OnUpdate]" value="<inp2:m_Phrase label="lu_comm_Update"/>"/>
+						<input type="hidden" name="next_template" value="in-commerce/my_account/account"/>
+					</td>
+				</tr>	
+			</table>
+		</td>
+	</tr>
+	
+</table>
+</form>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/my_profile.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/my_downloads.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/my_downloads.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/my_downloads.tpl	(revision 12131)
@@ -0,0 +1,74 @@
+<inp2:m_DefineElement name="product_image">
+	<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" /><br/>
+</inp2:m_DefineElement>
+
+<inp2:p_InitList list_name="my_downloads" types="my_downloads" parent_cat_id="any" recursive="true" per_page="default" />
+
+<table border="0" cellspacing="0" cellpadding="0" class="block-no-border">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_comm_YourDownloads"/> (<inp2:p_TotalRecords list_name="my_downloads" />)</td>
+	</tr>
+	<tr>
+		<td class="block-data">
+			<inp2:m_if check="p_TotalRecords" list_name="my_downloads">				
+				<table>
+					<tr>
+						<td style="width: 300px">
+							<inp2:m_include template="in-commerce/blocks/products/products_sorting" list_name="my_downloads" />
+						</td>
+						<td style="text-align: center;">
+							<inp2:m_include template="in-commerce/blocks/products/products_pagination" list_name="my_downloads" />
+						</td>
+					</tr>
+				</table>
+				<br />
+
+
+				<table>
+					<inp2:m_DefineElement name="product_row_start">
+						<tr>
+					</inp2:m_DefineElement>
+	
+					<inp2:m_DefineElement name="product_elem">
+						<td width="16%" align="center" valign="top" class="block-data">
+							<a href="<inp2:ProductLink template="__default__"/>"><inp2:Image render_as="product_image" thumbnail="1" DefaultImage="in-commerce/img/no_picture_list.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120" /></a>
+						</td>
+						<td width="84%" class="block-data">
+							<inp2:m_if check="p_HasFiles">
+								<a href="<inp2:ProductLink template="in-commerce/my_account/downloads_more"/>" class="link-product2"><strong><inp2:Field name="Name" /></strong></a><br />
+							<inp2:m_else />
+								<strong><inp2:Field name="Name" /></strong><br />
+							</inp2:m_if>
+							<strong><inp2:m_Phrase label="lu_comm_Description"/>:</strong> <inp2:Field name="DescriptionExcerpt" /><br /><br />
+							<inp2:m_if check="p_HasFiles">
+								<a href="<inp2:ProductFileLink template="in-commerce/my_account/download"/>" class="link-product2"><strong><inp2:m_Phrase label="lu_comm_DownloadNow" /></strong></a><br />
+								<a href="<inp2:ProductLink template="in-commerce/my_account/downloads_more"/>" class="link-product2"><strong><inp2:m_Phrase label="lu_comm_MoreFiles" />...</strong></a><br />
+							<inp2:m_else />
+								<inp2:m_Phrase label="lu_comm_NoFilesForThisProduct" />
+							</inp2:m_if>
+						</td>
+					</inp2:m_DefineElement>
+	
+				 	<inp2:m_DefineElement name="product_row_end">
+						</tr>
+						<inp2:m_if check="NotLastItem">
+							<tr>
+								<td colspan="2" style="background: #CCCCCC; height: 1px; padding: 0px"><img src="img/s.gif" alt="" width="1" height="1" /></td>
+							</tr>
+						</inp2:m_if>
+					</inp2:m_DefineElement>
+					<inp2:p_ListProducts list_name="my_downloads" columns="1" direction="V" render_as="product_elem" row_start_render_as="product_row_start" row_end_render_as="product_row_end" empty_cell_render_as="product_empty_cell" />
+				</table>
+			<inp2:m_else />
+				<tr>
+					<td>	
+						<inp2:m_Phrase label="lu_comm_YourDownloadListEmpty"/><br />
+						<inp2:m_Phrase label="lu_comm_TryRecommendedProducts"/>.
+						<br /><br />
+						<inp2:m_include template="in-commerce/blocks/products/products_picks" />
+					</td>
+				</tr>
+			</inp2:m_if>
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/my_downloads.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/myaccount_navigation.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/myaccount_navigation.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/myaccount_navigation.tpl	(revision 12131)
@@ -0,0 +1,52 @@
+<table class="block">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_YourAccount"/></td>
+	</tr>
+	<tr>
+		<td class="block-data-big">
+			<ul class="list-no-squares">
+				<inp2:m_if check="m_IsActive" template="in-commerce/my_account/profile">
+					<li><strong><inp2:m_phrase label="lu_comm_PersonalInfo" /></strong></li>
+				<inp2:m_else />
+					<li><a href="<inp2:m_Link template="in-commerce/my_account/profile" m_cat_id="0"/>"><inp2:m_phrase label="lu_comm_PersonalInfo" /></a></li>
+				</inp2:m_if>
+
+				<inp2:m_if check="m_IsActive" template="in-commerce/my_account/address">
+					<li><strong><inp2:m_phrase label="lu_comm_AddressList" /></strong></li>
+				<inp2:m_else />
+					<li><a href="<inp2:m_Link template="in-commerce/my_account/address" m_cat_id="0"/>"><inp2:m_phrase label="lu_comm_AddressList" /></a></li>
+				</inp2:m_if>
+
+				<inp2:m_if check="m_IsActive" template="in-commerce/my_account/wishlist">
+					<li><strong><inp2:m_phrase label="lu_comm_WishList" /></strong></li>
+				<inp2:m_else />
+					<li><a href="<inp2:m_Link template="in-commerce/my_account/wishlist" m_cat_id="0"/>"><inp2:m_phrase label="lu_comm_WishList" /></a></li>
+				</inp2:m_if>
+
+				<inp2:m_if check="m_IsActive" template="in-commerce/my_account/orders">
+					<li><a href="<inp2:m_Link template="in-commerce/my_account/orders" m_cat_id="0"/>"><strong><inp2:m_phrase label="lu_comm_Orders" /></strong></a></li>
+				<inp2:m_else />
+					<li><a href="<inp2:m_Link template="in-commerce/my_account/orders" m_cat_id="0"/>"><inp2:m_phrase label="lu_comm_Orders" /></a></li>
+				</inp2:m_if>
+
+				<inp2:m_if check="m_IsActive" template="in-commerce/my_account/downloads">
+					<li><a href="<inp2:m_Link template="in-commerce/my_account/downloads" m_cat_id="0"/>"><strong><inp2:m_phrase label="lu_comm_Downloads" /></strong></a></li>
+				<inp2:m_else />
+					<li><a href="<inp2:m_Link template="in-commerce/my_account/downloads" m_cat_id="0"/>"><inp2:m_phrase label="lu_comm_Downloads" /></a></li>
+				</inp2:m_if>
+
+				<inp2:m_if check="u_IsAffiliateOrRegisterAsAffiliateAllowed">
+					<inp2:m_if check="m_IsActive" template="in-commerce/my_account/affiliate">
+						<li><a href="<inp2:m_Link template="in-commerce/my_account/affiliate" m_cat_id="0"/>"><strong><inp2:m_phrase label="lu_comm_Affiliate" /></strong></a></li>
+					<inp2:m_else />
+						<li><a href="<inp2:m_Link template="in-commerce/my_account/affiliate" m_cat_id="0"/>"><inp2:m_phrase label="lu_comm_Affiliate" /></a></li>
+					</inp2:m_if>
+				</inp2:m_if>
+
+				<inp2:m_if check="m_LoggedIn">
+					<li><a href="<inp2:u_LogoutLink />"><inp2:m_phrase label="lu_Logout" /></a></li>
+				</inp2:m_if>
+			</ul>
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/myaccount_navigation.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/address_pagination.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/address_pagination.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/address_pagination.tpl	(revision 12131)
@@ -0,0 +1,40 @@
+<inp2:m_DefineElement name="prev_page">
+		<a class="pagination-bar" href="<inp2:PageLink/>">&lt;&lt;</a>&nbsp;
+	</td>
+	<td>
+</inp2:m_DefineElement >
+
+<inp2:m_DefineElement name="no_prev_page">
+	</td>
+	<td>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="page_current">
+	<strong><inp2:m_param name="page"/></strong>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="page_separator">
+	|
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="page_link">
+	<a class="pagination-bar" href="<inp2:PageLink/>"><inp2:m_param name="page"/></a>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="page_next">
+		<a class="pagination-bar" href="<inp2:PageLink/>">&gt;&gt;</a>
+</inp2:m_DefineElement>
+
+<table style="width: 100%; text-align: left;">
+	<tr>
+		<td style="width: 45%; text-align: right; ">
+			<strong><inp2:m_Phrase label="lu_comm_Page"/>:&nbsp;</strong>
+
+			<inp2:addr_PaginationBar
+					current_render_as="page_current" separator_render_as="page_separator" link_render_as="page_link"
+					prev_page_render_as="prev_page" no_prev_page_render_as="no_prev_page"
+					next_page_render_as="page_next" />
+		</td>
+		<td>&nbsp;</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/address_pagination.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_navigation.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_navigation.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_navigation.tpl	(revision 12131)
@@ -0,0 +1,45 @@
+<inp2:m_if check="u_IsAffiliate">
+	<table class="block">
+		<tr>
+			<td class="block-header"><inp2:m_Phrase label="lu_comm_Affiliate"/></td>
+		</tr>
+		<tr>
+			<td class="block-data-big">
+				<ul class="list-no-squares">
+					
+					<inp2:m_if check="m_IsActive" template="in-commerce/my_account/affiliate_stat">
+						<li><a href="<inp2:m_Link template="in-commerce/my_account/affiliate_stat"/>"><strong><inp2:m_phrase label="lu_comm_AffiliateStat" /></strong></a></li>
+					<inp2:m_else />
+						<li><a href="<inp2:m_Link template="in-commerce/my_account/affiliate_stat"/>"><inp2:m_phrase label="lu_comm_AffiliateStat" /></a></li>
+					</inp2:m_if>
+					
+					<inp2:m_if check="m_IsActive" template="in-commerce/my_account/affiliate_payments">
+						<li><strong><inp2:m_phrase label="lu_comm_AffiliatePayments" /></strong></li>
+					<inp2:m_else />
+						<li><a href="<inp2:m_Link template="in-commerce/my_account/affiliate_payments"/>"><inp2:m_phrase label="lu_comm_AffiliatePayments" /></a></li>
+					</inp2:m_if>
+					
+					<inp2:m_if check="m_IsActive" template="in-commerce/my_account/affiliate_materials">
+						<li><strong><inp2:m_phrase label="lu_comm_AffiliateMaterials" /></strong></li>
+					<inp2:m_else />
+						<li><a href="<inp2:m_Link template="in-commerce/my_account/affiliate_materials"/>"><inp2:m_phrase label="lu_comm_AffiliateMaterials" /></a></li>
+					</inp2:m_if>
+					
+					<inp2:m_if check="m_IsActive" template="in-commerce/my_account/affiliate_payment_type">
+						<li><strong><inp2:m_phrase label="lu_comm_ChangeAffiliatePaymentType" /></strong></li>
+					<inp2:m_else />
+						<li><a href="<inp2:m_Link template="in-commerce/my_account/affiliate_payment_type"/>"><inp2:m_phrase label="lu_comm_ChangeAffiliatePaymentType" /></a></li>
+					</inp2:m_if>
+					
+					<li><a href="javascript:showAffiliateAgreement()"><inp2:m_phrase label="lu_comm_TermsAndConditionsLink" /></a></li>
+				</ul>
+				<script type="text/javascript">
+					function showAffiliateAgreement()
+					{
+						window.open('<inp2:m_Link template="in-commerce/my_account/affiliate_agreement" />', null, 'menubar=no,toolbars=no,width=500,height=300');
+					}
+				</script>
+			</td>
+		</tr>
+	</table>
+</inp2:m_if>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_navigation.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/my_payments_pagination.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/my_payments_pagination.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/my_payments_pagination.tpl	(revision 12131)
@@ -0,0 +1,40 @@
+<inp2:m_DefineElement name="prev_page">
+		<a class="pagination-bar" href="<inp2:PageLink/>">&lt;&lt;</a>&nbsp;
+	</td>
+	<td>
+</inp2:m_DefineElement >
+
+<inp2:m_DefineElement name="no_prev_page">
+	</td>
+	<td>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="page_current">
+	<strong><inp2:m_param name="page"/></strong>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="page_separator">
+	|
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="page_link">
+	<a class="pagination-bar" href="<inp2:PageLink/>"><inp2:m_param name="page"/></a>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="page_next">
+	<a class="pagination-bar" href="<inp2:PageLink/>">&gt;&gt;</a>
+</inp2:m_DefineElement>
+
+<table style="width: 500px; text-align: left;">
+	<tr>
+		<td style="width: 45%; text-align: right; ">
+			<strong><inp2:m_Phrase label="lu_comm_Page"/>:&nbsp;</strong>
+
+			<inp2:ord_PaymentsPaginationBar
+					current_render_as="page_current" separator_render_as="page_separator" link_render_as="page_link"
+					prev_page_render_as="prev_page" no_prev_page_render_as="no_prev_page"
+					next_page_render_as="page_next" />
+		</td>
+		<td>&nbsp;</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/my_payments_pagination.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_payments_list.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_payments_list.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_payments_list.tpl	(revision 12131)
@@ -0,0 +1,49 @@
+<inp2:ord_InitPaymentsList list_name="my_payments_list" types="my_payments" per_page="10" />
+
+<table class="block-no-border">
+	<tr> 
+		<td class="block-header">
+			<inp2:m_Phrase label="lu_comm_ComissionPayments"/> (<inp2:ord_PaymentsCount list_name="my_payments_list" />)
+		</td> 
+	</tr> 
+</table>
+
+<table>
+	<tr>
+		<td style="text-align: center;">
+			<inp2:m_include template="in-commerce/blocks/my_account/my_payments_pagination" list_name="my_payments_list" data_exists="1"/>
+		</td>
+	</tr>
+</table>
+<br />
+	
+<table style="width: 500px;">
+	<inp2:m_DefineElement name="mypayments_header">
+		<tr class="cart-header">
+			<td><inp2:m_Phrase label="lu_comm_Date"/></td>
+			<td><inp2:m_Phrase label="lu_comm_PaymentReference"/></td>
+			<td style="text-align: center"><inp2:m_Phrase label="lu_comm_PaymentAmount"/></td>
+		</tr>
+	</inp2:m_DefineElement>
+	
+	<inp2:m_DefineElement name="mypayment_item">
+		<tr class="cart-item"> 
+			<td ><inp2:Field field="PaymentDate" /></td> 
+			<td ><inp2:Field field="PaymentReference" /></td>
+			<td style="text-align: right">
+				<strong><inp2:Field field="Amount" currency="selected"/></strong>
+			</td>
+		</tr>
+	</inp2:m_DefineElement>
+	
+	<inp2:m_DefineElement name="mypayments_empty">
+		<tr class="block-data"> 
+			<td>
+				<strong><inp2:m_Phrase label="lu_comm_DontHavePayments"/></strong>
+			</td>
+		</tr>
+	</inp2:m_DefineElement>		
+	
+	<inp2:ord_ListPayments list_name="my_payments_list" item_render_as="mypayment_item" header_render_as="mypayments_header" empty_mypayments_render_as="mypayments_empty" />
+
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_payments_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_materials.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_materials.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_materials.tpl	(revision 12131)
@@ -0,0 +1,27 @@
+<inp2:m_if check="u_IsAffiliate">
+	<table class="block-no-border">
+		<tr> 
+			<td class="block-header" colspan="2"><inp2:m_Phrase label="lu_comm_AffiliateMaterials"/></td> 
+		</tr>
+		<tr> 
+			<td class="block-data">
+				<inp2:m_Phrase label="lu_comm_AffilliateMaterialsToRefer"/>:
+				<br /><br />
+				 <a href="<inp2:affil_GetUserAffiliateLink template="index"/>"><inp2:affil_GetUserAffiliateLink template="index"/></a>
+			</td> 
+		</tr>
+		<tr> 
+			<td class="block-data">
+				<inp2:m_Phrase label="lu_comm_AffilliateMaterialsCode"/>:
+				<blockquote style="border: 1px dashed #cccccc; background-color: #f3f3f3; padding: 8px">
+				<small>
+				&lt;a href="<inp2:affil_GetUserAffiliateLink template="index"/>"&gt;
+					<inp2:conf_ConfigValue name="Site_Name"/>
+				&lt;/a&gt;
+				</small>
+				</blockquote>
+				<inp2:m_Phrase label="lu_comm_AffilliateMaterialsCopy"/>
+			</td> 
+		</tr>
+	</table>
+</inp2:m_if>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_materials.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_payment_type_changed.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_payment_type_changed.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_payment_type_changed.tpl	(revision 12131)
@@ -0,0 +1,8 @@
+<table class="block-no-border">
+	<tr> 
+		<td class="block-header"><inp2:m_Phrase label="lu_comm_AffiliatePaymentType"/></td> 
+	</tr>
+	<tr> 
+		<td class="block-data"><inp2:m_Phrase label="lu_comm_AffiliatePaymentTypeChangedMessage"/></td> 
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_payment_type_changed.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_thankyou.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_thankyou.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_thankyou.tpl	(revision 12131)
@@ -0,0 +1,8 @@
+<table class="block-no-border">
+	<tr> 
+		<td class="block-header"><inp2:m_Phrase label="lu_comm_AffiliateRegistration"/></td> 
+	</tr>
+	<tr> 
+		<td class="block-data"><inp2:m_Phrase label="lu_comm_ThankYouForBecomingAffiliate"/></td> 
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_thankyou.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_visitors_pagination.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_visitors_pagination.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_visitors_pagination.tpl	(revision 12131)
@@ -0,0 +1,40 @@
+<inp2:m_DefineElement name="prev_page">
+		<a class="pagination-bar" href="<inp2:PageLink/>">&lt;&lt;</a>&nbsp;
+	</td>
+	<td>
+</inp2:m_DefineElement >
+
+<inp2:m_DefineElement name="no_prev_page">
+	</td>
+	<td>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="page_current">
+	<strong><inp2:m_param name="page"/></strong>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="page_separator">
+	|
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="page_link">
+	<a class="pagination-bar" href="<inp2:PageLink/>"><inp2:m_param name="page"/></a>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="page_next">
+		<a class="pagination-bar" href="<inp2:PageLink/>">&gt;&gt;</a>
+</inp2:m_DefineElement>
+
+<table style="width: 100%; text-align: left;">
+	<tr>
+		<td style="width: 45%; text-align: right; ">
+			<strong><inp2:m_Phrase label="lu_comm_Page"/>:&nbsp;</strong>
+
+			<inp2:visits_PaginationBar
+					current_render_as="page_current" separator_render_as="page_separator" link_render_as="page_link"
+					prev_page_render_as="prev_page" no_prev_page_render_as="no_prev_page"
+					next_page_render_as="page_next" />
+		</td>
+		<td>&nbsp;</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/my_account/affiliate_visitors_pagination.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/orders/order_details.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/orders/order_details.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/orders/order_details.tpl	(revision 12131)
@@ -0,0 +1,334 @@
+<inp2:m_DefineElement name="option_value_element">
+	<inp2:m_param name="value"/> <inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/> (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if>
+	<inp2:m_if check="m_ParamEquals" name="is_last" value="1"><inp2:m_else/>, </inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="option_element">
+	<inp2:m_if check="m_ParamEquals" param="type" value="6"> <!-- checkboxes - multiple -->
+		<strong><inp2:m_param name="option"/>:</strong>
+			<inp2:PrintOptionValues render_as="option_value_element"/>
+	<inp2:m_else/>
+			<strong><inp2:m_param name="option"/>:</strong> <inp2:m_param name="value"/>
+				<inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/> (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if>
+	</inp2:m_if><br/>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="option_value_element_no_price">
+	<inp2:m_param name="value"/>
+	<inp2:m_if check="m_ParamEquals" name="is_last" value="1"><inp2:m_else/>, </inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="option_element_no_price">
+	<inp2:m_if check="m_ParamEquals" param="type" value="6"> <!-- checkboxes - multiple -->
+		<strong><inp2:m_param name="option"/>:</strong>
+			<inp2:PrintOptionValues render_as="option_value_element_no_price"/>
+	<inp2:m_else/>
+			<strong><inp2:m_param name="option"/>:</strong> <inp2:m_param name="value"/>
+	</inp2:m_if><br/>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="product_image">
+	<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" /><br/>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="orderitem_elem">
+	<tr class="cart-item">
+		<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">
+			<td width="120">
+				<inp2:p_Image render_as="product_image" thumbnail="1" DefaultImage="in-commerce/img/no_picture_list.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120" />
+			</td>
+		</inp2:m_if>
+
+		<td>
+			<inp2:m_if check="ProductExists">
+				<a href="<inp2:ProductLink template="__default__" />"><inp2:Field field="ProductName"/></a>
+			<inp2:m_else/>
+				<inp2:Field field="ProductName"/>
+			</inp2:m_if>
+			<inp2:m_if check="HasOptions">
+				<br/>
+				<span style="font-size: 8pt">
+				<inp2:m_if check="DisplayOptionsPricing"> <!-- selectable options or overriding combination -->
+					<inp2:PrintOptions render_as="option_element" currency="selected"/>
+				<inp2:m_else/> <!-- listed combinations -->
+					<inp2:PrintOptions render_as="option_element_no_price"/>
+				</inp2:m_if>
+				</span>
+				<br/>
+			</inp2:m_if>
+			<inp2:m_if check="HasDiscount">
+				<br />
+				<inp2:m_Phrase label="lu_comm_RegularPrice" />: <inp2:Field name="FlatPrice" currency="selected"/><br />
+				<inp2:m_Phrase label="lu_comm_Discount" />: <span class="price1">- <inp2:Field name="ItemDiscount" currency="selected" negative="1"/></span>
+			</inp2:m_if>
+		</td>
+		<td><strong><inp2:Field field="Price" currency="selected"/></strong></td>
+		<td><inp2:Field field="Quantity"/></td>
+		<td><strong><inp2:Field field="ExtendedPrice" currency="selected"/></strong></td>
+	</tr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="order_form_shipping">
+	<!-- shipping -->
+	<table width="100%" cellpadding="0" cellspacing="0">
+		<tr class="cart-header">
+			<td colspan="2"><inp2:m_Phrase label="lu_comm_ShipmentInfo"/></td>
+		</tr>
+		<tr class="block-data2">
+			<td><strong><inp2:m_Phrase label="lu_Name"/></strong>:</td>
+			<td style="text-align: right;"><inp2:Field field="ShippingTo"/></td>
+		</tr>
+		<inp2:m_if check="Field" name="ShippingCompany">
+		<tr class="block-data2">
+			<td><strong><inp2:m_Phrase label="lu_comm_Company"/></strong>:</td>
+			<td style="text-align: right;"><inp2:Field field="ShippingCompany"/></td>
+		</tr>
+		</inp2:m_if>
+		<inp2:m_if check="Field" name="ShippingEmail">
+		<tr class="block-data2">
+			<td><strong><inp2:m_Phrase label="lu_comm_EmailAddress"/></strong>:</td>
+			<td style="text-align: right;"><inp2:Field field="ShippingEmail"/></td>
+		</tr>
+		</inp2:m_if>
+		<tr class="block-data2">
+			<td><strong><inp2:m_Phrase label="lu_comm_PhoneNumber"/></strong>:</td>
+			<td style="text-align: right;"><inp2:Field field="ShippingPhone"/></td>
+		</tr>
+		<tr class="block-data2">
+			<td><strong><inp2:m_Phrase label="lu_comm_FaxNumber"/></strong>:</td>
+			<td style="text-align: right;"><inp2:Field field="ShippingFax"/></td>
+		</tr>
+		<tr class="block-data2">
+			<td style="vertical-align: top;"><strong><inp2:m_Phrase label="lu_comm_Address"/></strong>:</td>
+			<td style="text-align: right;">
+				<inp2:m_if check="FieldEquals" field="ShippingAddress1" value="" inverse="inverse">
+					<inp2:Field field="ShippingAddress1"/><br>
+				</inp2:m_if>
+
+				<inp2:m_if check="FieldEquals" field="ShippingAddress2" value="" inverse="inverse">
+					<inp2:Field field="ShippingAddress2"/><br>
+				</inp2:m_if>
+				<inp2:PrintLocation type="Shipping"/>
+			</td>
+		</tr>
+		<inp2:m_if check="Field" name="ShippingTracking">
+		<tr class="block-data2">
+			<td><strong><inp2:m_Phrase label="lu_comm_ShippingTracking"/></strong>:</td>
+			<td style="text-align: right;"><inp2:Field field="ShippingTracking"/></td>
+		</tr>
+		</inp2:m_if>
+	</table>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="order_form_billing">
+	<!-- billing -->
+	<table width="100%" cellpadding="0" cellspacing="0">
+		<tr class="cart-header">
+			<td colspan="2"><inp2:m_Phrase label="lu_comm_BillingInfo"/></td>
+		</tr>
+		<tr class="block-data2">
+			<td><strong><inp2:m_Phrase label="lu_Name"/></strong>:</td>
+			<td style="text-align: right;"><inp2:Field field="BillingTo"/></td>
+		</tr>
+		<inp2:m_if check="Field" name="BillingCompany">
+		<tr class="block-data2">
+			<td><strong><inp2:m_Phrase label="lu_comm_Company"/></strong>:</td>
+			<td style="text-align: right;"><inp2:Field field="BillingCompany"/></td>
+		</tr>
+		</inp2:m_if>
+		<inp2:m_if check="Field" name="BillingEmail">
+		<tr class="block-data2">
+			<td><strong><inp2:m_Phrase label="lu_comm_EmailAddress"/></strong>:</td>
+			<td style="text-align: right;"><inp2:Field field="BillingEmail"/></td>
+		</tr>
+		</inp2:m_if>
+		<tr class="block-data2">
+			<td><strong><inp2:m_Phrase label="lu_comm_PhoneNumber"/></strong>:</td>
+			<td style="text-align: right;"><inp2:Field field="BillingPhone"/></td>
+		</tr>
+		<tr class="block-data2">
+			<td><strong><inp2:m_Phrase label="lu_comm_FaxNumber"/></strong>:</td>
+			<td style="text-align: right;"><inp2:Field field="BillingFax"/></td>
+		</tr>
+		<tr class="block-data2">
+			<td style="vertical-align: top;"><strong><inp2:m_Phrase label="lu_comm_Address"/></strong>:</td>
+			<td style="text-align: right;">
+				<inp2:m_if check="FieldEquals" field="BillingAddress1" value="" inverse="inverse">
+					<inp2:Field field="BillingAddress1"/><br>
+				</inp2:m_if>
+
+				<inp2:m_if check="FieldEquals" field="BillingAddress2" value="" inverse="inverse">
+					<inp2:Field field="BillingAddress2"/><br>
+				</inp2:m_if>
+				<inp2:PrintLocation type="Billing"/>
+			</td>
+		</tr>
+
+		<tr class="block-data2">
+			<td><strong><inp2:m_Phrase label="lu_comm_PaymentType"/>:</strong></td>
+			<td style="text-align: right;"><inp2:Field name="PaymentType" /></td>
+		</tr>
+
+		<inp2:m_if check="UsingCreditCard">
+			<tr class="block-data2">
+				<td><strong><inp2:m_Phrase label="lu_comm_NameOnCard"/>:</strong></td>
+				<td style="text-align: right;"><inp2:Field name="PaymentNameOnCard"/></td>
+			</tr>
+			<tr class="block-data2">
+				<td><strong><inp2:m_Phrase label="lu_comm_CardType"/>:</strong></td>
+				<td style="text-align: right;"><inp2:Field name="PaymentCardType" /></td>
+			</tr>
+			<tr class="block-data2">
+				<td style="vertical-align: top;"><strong><inp2:m_Phrase label="lu_comm_CardNumber"/>:</strong></td>
+				<td style="text-align: right;"><inp2:Field name="PaymentAccount" masked="masked"/></td>
+			</tr>
+			<tr class="block-data2">
+				<td style="vertical-align: top;"><strong><inp2:m_Phrase label="lu_comm_Exp"/>:</strong></td>
+				<td style="text-align: right;"><inp2:Field name="PaymentCCExpDate"/></td>
+			</tr>
+		</inp2:m_if>
+	</table>
+</inp2:m_DefineElement>
+
+<form method="post" action="<inp2:m_FormAction/>">
+	<inp2:m_DefineElement name="order_form">
+		<table class="block-no-border">
+			<tr>
+				<td class="block-header">
+					<inp2:m_Phrase label="lu_comm_OrderPreview"/>
+				</td>
+			</tr>
+		</table>
+
+		<table>
+			<tr>
+				<td class="block-data">
+					<strong><inp2:m_Phrase label="lu_comm_OrderNumber"/><inp2:Field field="OrderNumber"/></strong>
+				</td>
+			</tr>
+		</table>
+		<inp2:m_if check="FieldEquals" field="IsRecurringBilling" value="1">
+			<table class="notice">
+				<tr>
+					<td valign="top" align="left" class="block-data">
+						<strong><inp2:m_Phrase label="lu_recurring_notice"/></strong> <inp2:m_Phrase label="lu_recurring_next_charge"/> <inp2:Field name="NextCharge" format="_regional_DateFormat"/> <inp2:m_Phrase label="lu_or"/> <inp2:m_GetConfig var="Comm_RecurringChargeInverval"/> <inp2:m_Phrase label="lu_recurring_charge_advance"/><br>
+						<a href="<inp2:m_link template="in-commerce/my_account/cancel_recurring" pass="ord"/>"><inp2:m_Phrase label="lu_recurring_cancel"/></a>
+					</td>
+				</tr>
+			</table>
+		</inp2:m_if>
+
+
+		<inp2:m_if check="OrderHasTangibleItems">
+			<table class="block-no-border">
+				<tr>
+					<td width="49%">
+						<inp2:m_RenderElement name="order_form_shipping" PrefixSpecial="ord"/>
+					</td>
+					<td>&nbsp;</td>
+					<td width="49%">
+						<inp2:m_RenderElement name="order_form_billing" PrefixSpecial="ord"/>
+					</td>
+				</tr>
+			</table>
+		<inp2:m_else />
+			<table class="block-no-border">
+				<tr>
+					<td>
+						<inp2:m_RenderElement name="order_form_billing" PrefixSpecial="ord"/>
+					</td>
+				</tr>
+			</table>
+		</inp2:m_if>
+
+		<table>
+			<tr class="cart-header">
+				<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">
+					<td colspan="2"><inp2:m_Phrase label="lu_comm_ProductDescription"/></td>
+				<inp2:m_else/>
+					<td><inp2:m_Phrase label="lu_comm_ProductDescription"/></td>
+				</inp2:m_if>
+
+				<td><inp2:m_Phrase label="lu_comm_Price"/></td>
+
+				<td><inp2:m_Phrase label="lu_comm_Qty"/>.</td>
+				<td><inp2:m_Phrase label="lu_comm_Total"/></td>
+			</tr>
+
+			<inp2:ord_ListOrderItems render_as="orderitem_elem"/>
+
+			<tr class="cart-subtotal">
+				<td>
+					<inp2:m_if check="ord_HasDiscount">
+						<inp2:m_Phrase label="lu_comm_TotalSavings" />: <span class="price1"><inp2:ord_Field name="DiscountTotal" currency="selected" /></span><br />
+					</inp2:m_if>&nbsp;
+				</td>
+				<td style="text-align: right;" colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">5<inp2:m_else/>4</inp2:m_if>">
+					<strong><inp2:m_Phrase label="lu_comm_SubTotal"/>: <span class="price1"><inp2:Field field="SubTotal" currency="selected"/></span></strong>
+
+				</td>
+			</tr>
+		</table>
+
+		<table>
+			<tr class="cart-header">
+			    <td>
+					<inp2:m_Phrase label="lu_comm_OrderTotal"/>
+				</td>
+			</tr>
+		</table>
+
+		<table class="block-no-border">
+			<inp2:m_DefineElement name="shipping_total">
+				<tr class="block-data2">
+					<td style="text-align: right;"><inp2:m_Phrase label="lu_comm_ShippingCost"/> (<inp2:ord_ShippingType />):</td>
+					<td style="text-align: right;"><inp2:ord_Field name="ShippingCost" currency="selected"/></td>
+				</tr>
+			</inp2:m_DefineElement>
+
+			<inp2:m_DefineElement name="processing_total">
+				<tr class="block-data2">
+					<td style="text-align: right;"><inp2:m_Phrase label="lu_comm_ProcessingFee"/>: </td>
+					<td style="text-align: right;"><inp2:ord_Field name="ProcessingFee" currency="selected"/></td>
+				</tr>
+			</inp2:m_DefineElement>
+
+			<inp2:m_DefineElement name="sub_total">
+				<tr class="block-data2">
+					<td style="text-align: right;"><inp2:m_Phrase label="lu_comm_SubTotal"/>: </td>
+					<td style="text-align: right;"><inp2:ord_Field name="AmountWithoutVAT" currency="selected"/></td>
+				</tr>
+			</inp2:m_DefineElement>
+
+			<inp2:m_DefineElement name="vat_total">
+				<tr class="block-data2">
+					<td style="text-align: right;"><inp2:m_Phrase label="lu_comm_VAT"/> <inp2:ord_Field name="VATPercent"/>%: </td>
+					<td style="text-align: right;"><inp2:ord_Field name="VAT" currency="selected"/></td>
+				</tr>
+			</inp2:m_DefineElement>
+
+			<inp2:m_DefineElement name="return_total">
+				<tr class="block-data2">
+					<td style="text-align: right;"><inp2:m_Phrase label="lu_fld_ReturnTotal"/>: </td>
+					<td style="text-align: right;"><inp2:ord_Field name="ReturnTotal" currency="selected"/></td>
+				</tr>
+			</inp2:m_DefineElement>
+
+			<inp2:ord_PrintTotals
+				shipping_render_as="shipping_total"
+				processing_render_as="processing_total"
+				sub_total_render_as="sub_total"
+				vat_render_as="vat_total"
+				return_render_as="return_total"/>
+
+			<tr class="block-data2">
+			    <td class="price3" style="text-align: right;"><strong><inp2:m_Phrase label="lu_comm_GrandTotal"/>:</strong></td>
+				<td class="price3" style="text-align: right;"><span class="price1"><inp2:Field name="TotalAmount" currency="selected"/></span></td>
+			</tr>
+		</table>
+
+		<br />
+	</inp2:m_DefineElement>
+
+	<inp2:ord_ShowOrder render_as="order_form" />
+</form>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/orders/order_details.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.21.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/orders/orders_recent.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/orders/orders_recent.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/orders/orders_recent.tpl	(revision 12131)
@@ -0,0 +1,58 @@
+
+<inp2:ord_InitList list_name="my_recentorders_list" types="myrecentorders" per_page="5" />
+
+<table  class="block-no-border">
+	<tr>
+		<td class="block-header">
+			<inp2:m_Phrase label="lu_comm_RecentOrders"/>
+		</td>
+	</tr>
+</table>
+
+<table class="main-table">
+
+	<inp2:m_DefineElement name="myorder_header">
+		<tr class="cart-header">
+			<td style="width: 30%"><inp2:m_Phrase label="lu_comm_OrderNumberText"/></td>
+			<td style="width: 30%"><inp2:m_Phrase label="lu_comm_Date"/></td>
+			<td style="text-align: center; width: 15%"><inp2:m_Phrase label="lu_comm_Amount"/></td>
+			<td style="text-align: center; width: 25%"><inp2:m_Phrase label="lu_comm_Status"/></td>
+		</tr>
+	</inp2:m_DefineElement>
+
+	<inp2:m_DefineElement name="myorder_item">
+		<tr class="cart-item">
+			<td ><a href="<inp2:m_Link template="in-commerce/my_account/orders_detail" pass="m,ord"/>"><inp2:Field field="OrderNumber"/></a>  <inp2:m_if check="FieldEquals" field="IsRecurringBilling" value="1"><strong>(<inp2:m_Phrase label="lu_Recurring"/>)</strong></inp2:m_if></td>
+			<td ><inp2:Field field="OrderDate" format="_regional_DateFormat"/></td>
+			<td style="text-align: right">
+				<strong><inp2:Field field="TotalAmount" currency="selected"/></strong>
+			</td>
+			<td style="text-align: center;"><inp2:Field field="Status"/></td>
+		</tr>
+	</inp2:m_DefineElement>
+
+	<inp2:m_DefineElement name="myorder_empty">
+		<tr class="block-data">
+			<td>
+				<strong><inp2:m_Phrase label="lu_comm_DontHaveOrders"/></strong>
+			</td>
+		</tr>
+	</inp2:m_DefineElement>
+
+	<inp2:ord_ListOrders list_name="my_recentorders_list" item_render_as="myorder_item" header_render_as="myorder_header" empty_myorders_render_as="myorder_empty" />
+
+</table>
+
+<inp2:m_DefineElement name="more_link">
+	<br />
+	<br />
+	<a href="<inp2:m_Link template="in-commerce/my_account/orders" />"><inp2:m_Phrase label="lu_comm_MoreOrders"/>...</a>
+	<br />
+	<br />
+</inp2:m_DefineElement>
+
+<inp2:ord_MoreLink list_name="my_recentorders_list" render_as="more_link" />
+
+
+
+

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/orders/orders_recent.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/orders/orders_all.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/orders/orders_all.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/orders/orders_all.tpl	(revision 12131)
@@ -0,0 +1,50 @@
+<inp2:ord_InitList list_name="my_orders_list" types="myorders" per_page="10" />
+
+<table class="block-no-border">
+	<tr>
+		<td class="block-header">
+			<inp2:m_Phrase label="lu_comm_MyOrders"/>
+		</td>
+	</tr>
+</table>
+
+<table>
+	<tr>
+		<td style="text-align: center;">
+			<inp2:m_include template="in-commerce/blocks/orders/orders_pagination" list_name="my_orders_list" data_exists="1"/>
+		</td>
+	</tr>
+</table>
+<br />
+
+<table>
+	<inp2:m_DefineElement name="myorder_header">
+		<tr class="cart-header">
+			<td style="width: 30%"><inp2:m_Phrase label="lu_comm_OrderNumberText"/></td>
+			<td style="width: 30%"><inp2:m_Phrase label="lu_comm_Date"/></td>
+			<td style="text-align: center; width: 15%"><inp2:m_Phrase label="lu_comm_Amount"/></td>
+			<td style="text-align: center; width: 25%"><inp2:m_Phrase label="lu_comm_Status"/></td>
+		</tr>
+	</inp2:m_DefineElement>
+
+	<inp2:m_DefineElement name="myorder_item">
+		<tr class="cart-item">
+			<td ><a href="<inp2:m_Link template="in-commerce/my_account/orders_detail" pass="m,ord"/>"><inp2:Field field="OrderNumber"/></a> <inp2:m_if check="FieldEquals" field="IsRecurringBilling" value="1"><strong>(<inp2:m_Phrase label="lu_Recurring"/>)</strong></inp2:m_if></td>
+			<td ><inp2:Field field="OrderDate" format="_regional_DateFormat"/></td>
+			<td style="text-align: right">
+				<strong><inp2:Field field="TotalAmount" currency="selected"/></strong>
+			</td>
+			<td style="text-align: center;"><inp2:Field field="Status"/></td>
+		</tr>
+	</inp2:m_DefineElement>
+
+	<inp2:m_DefineElement name="myorder_empty">
+		<tr class="block-data">
+			<td>
+				<strong><inp2:m_Phrase label="lu_comm_DontHaveOrders"/></strong>
+			</td>
+		</tr>
+	</inp2:m_DefineElement>
+
+	<inp2:ord_ListOrders list_name="my_orders_list" item_render_as="myorder_item" header_render_as="myorder_header" empty_myorders_render_as="myorder_empty" />
+</table>

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/orders/orders_all.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/orders/orders_pagination.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/orders/orders_pagination.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/orders/orders_pagination.tpl	(revision 12131)
@@ -0,0 +1,40 @@
+<inp2:m_DefineElement name="prev_page">
+		<a class="pagination-bar" href="<inp2:PageLink/>">&lt;&lt;</a>&nbsp;
+	</td>
+	<td>
+</inp2:m_DefineElement >
+
+<inp2:m_DefineElement name="no_prev_page">
+	</td>
+	<td>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="page_current">
+	<strong><inp2:m_param name="page"/></strong>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="page_separator">
+	|
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="page_link">
+	<a class="pagination-bar" href="<inp2:PageLink/>"><inp2:m_param name="page"/></a>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="page_next">
+		<a class="pagination-bar" href="<inp2:PageLink/>">&gt;&gt;</a>
+</inp2:m_DefineElement>
+
+<table style="width: 100%; text-align: left;">
+	<tr>
+		<td style="width: 45%; text-align: right; ">
+			<strong><inp2:m_Phrase label="lu_comm_Page"/>:&nbsp;</strong>
+
+			<inp2:ord_PaginationBar
+					current_render_as="page_current" separator_render_as="page_separator" link_render_as="page_link"
+					prev_page_render_as="prev_page" no_prev_page_render_as="no_prev_page"
+					next_page_render_as="page_next" />
+		</td>
+		<td>&nbsp;</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/orders/orders_pagination.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/categories/current_path.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/categories/current_path.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/categories/current_path.tpl	(revision 12131)
@@ -0,0 +1,33 @@
+<inp2:m_DefaultParam titles="" templates="" show_category="0"/>
+
+<inp2:m_DefineElement name="root_category">
+	<a class="link-nav-bar" href="<inp2:c_CategoryLink template="__default__" />"><inp2:m_RootCategoryName/></a>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="module_root">
+	<inp2:m_param name="separator"/>
+	<a class="link-nav-bar" href="<inp2:c_CategoryLink template="in-commerce/index" cat_id="0"/>"><inp2:m_param name="title"/></a>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="nav_link">
+	<inp2:m_param name="separator"/>
+	<inp2:m_if check="m_Param" name="category">
+		<a class="link-nav-bar" href="<inp2:c_CategoryLink template="__default__" />"><inp2:m_param name="title"/></a>
+	<inp2:m_else/>
+		<a class="link-nav-bar" href="<inp2:m_Link template="$template" m_cat_id="0"/>"><inp2:m_param name="title"/></a>
+	</inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="module_item">
+	<inp2:m_param name="separator"/>
+	<a class="link-nav-bar" href="<inp2:{$prefix}_ItemLink template="$template" />"><inp2:m_param name="title"/></a>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="current_item">
+	<inp2:m_param name="separator"/>
+	<span> <inp2:m_param name="title"/></span>
+</inp2:m_DefineElement>
+
+<div class="nav-bar">
+	<inp2:c_CategoryPath separator="&gt;" render_as="nav_link" current_render_as="current_item" module_item_render_as="module_item" root_cat_render_as="root_category" titles="$titles" templates="$templates" show_category="$show_category" module_root_render_as="module_root"/>
+</div>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/categories/current_path.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/categories/categories_home.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/categories/categories_home.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/categories/categories_home.tpl	(revision 12131)
@@ -0,0 +1,37 @@
+<inp2:m_DefineElement name="more_link_elem">
+	<li><a href="<inp2:CategoryLink template="__default__" m_cat_page="1"/>"><inp2:m_Phrase label="lu_more_products"/>...</a></li>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="subcategory_elem">
+	<inp2:m_if check="IsCurrent">
+		<li><inp2:field name="Name"/></li>
+	<inp2:m_else/>
+		<li><a href="<inp2:CategoryLink template="__default__" m_cat_page="1"/>"><inp2:field name="Name"/></a></li>
+	</inp2:m_if>
+</inp2:m_DefineElement>
+
+<table class="categories-block">
+	<tr>
+		<td class="categories-block-header"><inp2:m_Phrase label="lu_comm_Categories"/></td>
+	</tr>
+	<tr>
+		<td class="block-data-big">
+			<table>
+				<inp2:m_DefineElement name="category_elem">
+					<td style="width: <inp2:ColumnWidth/>">
+						<inp2:m_if check="IsCurrent">
+							<strong><inp2:field name="Name"/></strong>
+						<inp2:m_else/>
+							<a href="<inp2:CategoryLink template="__default__" m_cat_page="1"/>" class="subcat"><inp2:field name="Name"/></a><br />
+						</inp2:m_if>
+						<ul class="block-data-big-ul">
+						<inp2:ListCategories requery="1" render_as="subcategory_elem" more_link_render_as="more_link_elem" max_items="4" row_start_render_as="html:" row_end_render_as="html:" empty_cell_render_as="html:"/>
+
+						</ul>
+					</td>
+				</inp2:m_DefineElement>
+				<inp2:c_ListCategories render_as="category_elem" per_page="-1" columns="1" direction="H" parent_cat_id="Root" module="In-Commerce"/>
+			</table>
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/categories/categories_home.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/categories/categories_home_alt.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/categories/categories_home_alt.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/categories/categories_home_alt.tpl	(revision 12131)
@@ -0,0 +1,45 @@
+<inp2:m_DefineElement name="more_link_elem">
+	<li><a href="<inp2:CategoryLink template="__default__" m_cat_page="1"/>"><inp2:m_Phrase label="lu_more_products"/>...</a></li>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="subcategory_elem">
+	<inp2:m_if check="IsCurrent">
+		<li><inp2:field name="Name"/></li>
+	<inp2:m_else/>
+		<li><a href="<inp2:CategoryLink template="__default__" m_cat_page="1"/>"><inp2:field name="Name"/></a></li>
+	</inp2:m_if>
+	<inp2:m_if check="IsActive">
+		<inp2:m_if check="SubCatCount">
+			<ul class="block-data-big-ul">
+				<inp2:ListCategories no_table="1" requery="1" per_page="-1" render_as="subcategory_elem" more_link_render_as="more_link_elem" max_items="4" row_start_render_as="html:" row_end_render_as="html:" empty_cell_render_as="html:"/>
+			</ul>
+		</inp2:m_if>
+	</inp2:m_if>
+</inp2:m_DefineElement>
+
+<table class="categories-block">
+	<tr>
+		<td class="categories-block-header"><inp2:m_Phrase label="lu_comm_Categories"/></td>
+	</tr>
+	<tr>
+		<td class="block-data-big">
+			<table>
+				<inp2:m_DefineElement name="category_elem">
+					<td style="width: <inp2:ColumnWidth/>">
+						<inp2:m_if check="IsCurrent">
+							<strong><inp2:field name="Name"/></strong>
+						<inp2:m_else/>
+							<a href="<inp2:CategoryLink template="__default__" m_cat_page="1"/>" class="subcat"><inp2:field name="Name"/></a><br />
+						</inp2:m_if>
+						<inp2:m_if check="IsActive">
+							<ul class="block-data-big-ul">
+							<inp2:ListCategories no_table="1" requery="1" render_as="subcategory_elem" per_page="-1" row_start_render_as="html:" row_end_render_as="html:" empty_cell_render_as="html:"/>
+							</ul>
+						</inp2:m_if>
+					</td>
+				</inp2:m_DefineElement>
+				<inp2:c_ListCategories render_as="category_elem" per_page="-1" columns="1" direction="H" parent_cat_id="Root" module="In-Commerce"/>
+			</table>
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/categories/categories_home_alt.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/categories/sub_categories.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/categories/sub_categories.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/categories/sub_categories.tpl	(revision 12131)
@@ -0,0 +1,33 @@
+<inp2:m_RequireLogin permissions="CATEGORY.VIEW" login_template="platform/login/login_register"/>
+
+<inp2:m_DefineElement name="more_link_elem">
+	<li><a href="<inp2:CategoryLink template="__default__" m_cat_page="1"/>"><inp2:m_Phrase label="lu_more_products"/>...</a></li>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="subcategory_elem">
+	<li><a href="<inp2:CategoryLink template="__default__" m_cat_page="1"/>"><inp2:field name="Name"/></a></li>
+</inp2:m_DefineElement>
+
+<table class="block">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_comm_SubCategories"/></td>
+	</tr>
+	<tr>
+		<td class="block-data-big">
+
+			<table>
+				<inp2:m_DefineElement name="category_elem">
+					<td style="width: <inp2:ColumnWidth/>">
+						<a href="<inp2:CategoryLink template="__default__" m_cat_page="1"/>" class="subcat"><inp2:field name="Name"/></a><br />
+						<ul class="block-data-big-ul">
+							<inp2:ListCategories requery="1" render_as="subcategory_elem" max_items="4" more_link_render_as="more_link_elem" row_start_render_as="html:" row_end_render_as="html:" empty_cell_render_as="html:"/>
+						</ul>
+					</td>
+				</inp2:m_DefineElement>
+
+				<inp2:c_ListCategories requery="1" render_as="category_elem" per_page="-1" columns="3"  page_var="m_cat_page" direction="H"/>
+			</table>
+
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/categories/sub_categories.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/categories/title_path.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/categories/title_path.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/categories/title_path.tpl	(revision 12131)
@@ -0,0 +1,15 @@
+<inp2:m_DefineElement name="root_category">
+	<inp2:c_RootCategoryName/>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="title_category">
+	<inp2:m_param name="cat_name"/>
+	<inp2:m_param name="separator"/>
+</inp2:m_DefineElement>
+
+
+<inp2:m_DefineElement name="current_title">
+	<inp2:m_param name="cat_name"/>
+</inp2:m_DefineElement>
+
+<inp2:c_CategoryPath separator="&gt;" render_as="title_category" current_render_as="current_title" module_root_render_as="title_category" root_cat_render_as="html:" />

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/categories/title_path.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/categories/manufacturers.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/categories/manufacturers.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/categories/manufacturers.tpl	(revision 12131)
@@ -0,0 +1,25 @@
+<inp2:manuf_InitList list_name="manufacturers_in_category" per_page="-1" recursive="true" />
+
+<table class="block">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_comm_Manufacturers"/></td>
+	</tr>
+	<tr>
+		<td class="block-data">
+			<ul class="block-data-ul">
+				<inp2:m_DefineElement name="manuf_elem">
+					<li>
+						<a href="<inp2:m_Link template="in-commerce/store/manufacturer_products" pass="all,manuf" />" class="link-product2"><strong><inp2:Field field="Name" /></strong></a>
+					</li>
+				</inp2:m_DefineElement>
+				
+				<inp2:manuf_ListManufacturers list_name="manufacturers_in_category" 
+					columns="1" direction="V" 
+					render_as="manuf_elem" 
+					row_start_render_as="html:" row_end_render_as="html:"
+					empty_cell_render_as="manuf_empty_cell" />
+			</ul>
+			<a href="<inp2:m_Link template="in-commerce/store/manufacturers" />"><inp2:m_Phrase label="lu_comm_MoreLink"/>...</a><br />
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/categories/manufacturers.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/manufacturers/manufacturers_dropdown.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/manufacturers/manufacturers_dropdown.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/manufacturers/manufacturers_dropdown.tpl	(revision 12131)
@@ -0,0 +1,26 @@
+<inp2:m_Get var="manuf_id" result_to_var="curr_manuf_id"/>
+
+<inp2:m_DefineElement name="manuf_elem_dropdown">
+<option value="<inp2:p_ManufacturerLink template="in-commerce/store/manufacturer_products" />" <inp2:m_if check="FieldEquals" name="ManufacturerId" value="$curr_manuf_id">selected="selected"</inp2:m_if> >
+<inp2:Field field="Name" /></option></inp2:m_DefineElement>
+
+<table border="0" cellspacing="0" cellpadding="0" class="block">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_comm_Manufacturers"/></td>
+	</tr>
+	<tr>
+		<td class="block-data-big">
+			
+				<form id="manufacturers" method="post" action="<inp2:m_FormAction />">
+					<select name="Manufacturer" onchange="window.location.href=this.value">
+					<inp2:manuf.custom_ListManufacturers list_name="manufacturers" render_as="manuf_elem_dropdown" per_page="-1" row_start_render_as="html:" row_end_render_as="html:" empty_cell_render_as="html:" parent_cat_id="any" />
+					</select>
+				</form>
+				
+		</td>
+	</tr>
+</table>
+				
+				
+				
+				

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/manufacturers/manufacturers_dropdown.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/manufacturers/manufacturer_products.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/manufacturers/manufacturer_products.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/manufacturers/manufacturer_products.tpl	(revision 12131)
@@ -0,0 +1,62 @@
+<table border="0" cellspacing="0" cellpadding="0" class="block-no-border"> 
+	<tr> 
+		<td class="block-header"><inp2:m_Phrase label="lu_comm_ProductsBy"/> <inp2:manuf_Field name="Name" /></td> 
+	</tr> 
+	<tr> 
+	  	<td class="block-data">
+
+			<inp2:p_InitList types="manufacturer" list_name="list_by_manufacturer" per_page="default" recursive="true" parent_cat_id="any" />
+			
+			<inp2:m_DefineElement name="product_image">
+				<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" /><br/>
+			</inp2:m_DefineElement>
+			
+			<table>
+				<tr>
+					<td style="width: 300px">
+						<inp2:m_include template="in-commerce/blocks/products/products_sorting" list_name="list_by_manufacturer" />
+					</td>
+					<td style="text-align: center;">
+						<inp2:m_include template="in-commerce/blocks/products/products_pagination" list_name="list_by_manufacturer" />
+					</td>
+				</tr>
+			</table>
+			
+			<br />
+		
+			<table>
+				<inp2:m_DefineElement name="product_row_start">
+					<tr>
+				</inp2:m_DefineElement>
+				
+				<inp2:m_DefineElement name="product_elem">
+					<td width="16%" align="center" valign="top" class="block-data">
+						<a href="<inp2:ProductLink template="__default__"/>"><inp2:Image render_as="product_image" thumbnail="1" DefaultImage="in-commerce/img/no_picture_list.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120" /></a>
+					</td>
+					<td width="84%" class="block-data">
+						<a href="<inp2:ProductLink template="__default__"/>" class="link-product2"><strong><inp2:Field field="Name" /></strong></a>
+						<inp2:m_if check="Available">
+							<a href="<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>"><img src="in-commerce/img/buy2.gif" alt="" width="15" height="17" border="0" style="vertical-align:middle" /></a>
+						</inp2:m_if>
+						<br />
+						<inp2:m_if check="Field" name="MSRP"><strong><inp2:m_Phrase label="lu_comm_MSRP"/>:</strong> <span class="price-msrp"><inp2:Field name="MSRP" currency="selected"/></span> <br /> </inp2:m_if>
+						<strong><inp2:m_Phrase label="lu_comm_OurPrice"/>:</strong> <span class="price1"><inp2:Field name="Price" currency="selected"/></span> <br />
+						<strong><inp2:m_Phrase label="lu_comm_Description"/>:</strong> <inp2:Field name="DescriptionExcerpt"/>
+					</td>
+				</inp2:m_DefineElement>
+			  
+				<inp2:m_DefineElement name="product_row_end">
+					</tr>
+				  	<inp2:m_if check="NotLastItem">
+					  	<tr>
+							<td colspan="2" style="background: #CCCCCC; height: 1px; padding: 0px"><img src="img/s.gif" alt="" width="1" height="1" /></td>
+					  	</tr>
+					</inp2:m_if>
+				</inp2:m_DefineElement>
+				
+				<inp2:p_ListProducts list_name="list_by_manufacturer" columns="1" direction="V" render_as="product_elem" row_start_render_as="product_row_start" row_end_render_as="product_row_end" empty_cell_render_as="product_empty_cell" />
+			</table>
+			
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/manufacturers/manufacturer_products.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/manufacturers/manufacturers.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/manufacturers/manufacturers.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/manufacturers/manufacturers.tpl	(revision 12131)
@@ -0,0 +1,81 @@
+<table border="0" cellspacing="0" cellpadding="0" class="block-no-border">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_comm_Manufacturers"/></td>
+	</tr>
+	<tr>
+		<td class="block-data">
+
+			<inp2:manuf_InitList list_name="manufacturers" per_page="default" recursive="true" />
+			
+			<inp2:m_DefineElement name="manuf_image">
+				<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" /><br/>
+			</inp2:m_DefineElement>
+			
+			<inp2:m_DefineElement name="product_image">
+				<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> style="margin-top: 10px" border="0" /><br/>
+			</inp2:m_DefineElement>
+			
+			<table>
+				<tr>
+					<td style="text-align: center;">
+						<inp2:m_include template="in-commerce/blocks/manufacturers/manuf_pagination" list_name="manufacturers" />
+					</td>
+				</tr>
+			</table>
+			
+			<table>
+				<inp2:m_DefineElement name="manuf_row_start">
+					<tr>
+				</inp2:m_DefineElement>
+				
+				<inp2:m_DefineElement name="product_elem">
+					<td width="33%" align="center" valign="top" class="block-data"> 
+						<a href="<inp2:ProductLink template="__default__"/>" class="link-product2"><strong><inp2:Field field="Name" /></strong></a><br />
+						<a href="<inp2:ProductLink template="__default__"/>"><inp2:Image render_as="product_image" Thumbnail="1" DefaultImage="in-commerce/img/no_picture_list.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120"/></a> <br />
+						<strong><inp2:m_Phrase label="lu_comm_MSRP"/>: </strong><span class="price-msrp"><inp2:Field name="MSRP" currency="selected" /></span><br />
+						<strong><inp2:m_Phrase label="lu_comm_OurPrice"/>:</strong> <span class="price1"><inp2:Field name="Price" currency="selected"/></span><br />
+						<strong><inp2:m_Phrase label="lu_comm_Added"/>:</strong><inp2:Field name="CreatedOn_date" /><br />
+						<inp2:m_if check="Available">
+							<a href="<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>" class="link-product2"><strong><inp2:m_Phrase label="lu_comm_BuyNow"/></strong></a> 
+							<a href="<inp2:AddToCartLink template="in-commerce/checkout/shop_cart" product_template="__default__"/>"><img src="in-commerce/img/buy2.gif" alt="<inp2:m_Phrase label="lu_comm_BuyNow"/>" width="15" height="17" border="0" vspace="4" style="vertical-align:middle" /></a>
+						<inp2:m_else />
+							<strong><inp2:m_phrase label="lu_comm_outofstock"/></strong>
+						</inp2:m_if>
+					</td>
+				</inp2:m_DefineElement>
+				
+				<inp2:m_DefineElement name="manuf_elem">
+					<td class="block-data">
+						<table>
+							<tr class="cart-header">
+								<td>
+									<a href="<inp2:p_ManufacturerLink template="in-commerce/store/manufacturer_products" />" class="link-product1"><strong><inp2:Field field="Name" /></strong></a><br />
+								</td>
+							</tr>
+						</table>
+						<table>
+							<inp2:p_ListProducts list_name="products_by_manuf" requery="1" types="manufacturer" recursive="1"
+									columns="3"
+									render_as="product_elem" per_page="3" />
+						</table>
+						<inp2:m_DefineElement name="more_link">
+							<a href="<inp2:p_ManufacturerLink template="in-commerce/store/manufacturer_products" />"><inp2:m_Phrase label="lu_comm_MoreLink"/>...</a>
+						</inp2:m_DefineElement>
+						<inp2:p_MoreLink list_name="products_by_manuf" render_as="more_link" />
+					</td> 
+				</inp2:m_DefineElement>
+				
+				<inp2:m_DefineElement name="manuf_row_end">
+					</tr>
+				</inp2:m_DefineElement>
+				
+				<inp2:manuf_ListManufacturers list_name="manufacturers"
+						columns="1" direction="V"
+						render_as="manuf_elem" 
+						row_start_render_as="manuf_row_start" row_end_render_as="manuf_row_end"
+						empty_cell_render_as="manuf_empty_cell" />
+			</table>
+			
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/manufacturers/manufacturers.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/manufacturers/manuf_pagination.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/manufacturers/manuf_pagination.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/manufacturers/manuf_pagination.tpl	(revision 12131)
@@ -0,0 +1,40 @@
+<inp2:m_DefineElement name="prev_page">
+		<a class="pagination-bar" href="<inp2:PageLink/>">&lt;&lt;</a>&nbsp;
+	</td>
+	<td>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="no_prev_page">
+	</td>
+	<td>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="page_current">
+	<strong><inp2:m_param name="page"/></strong>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="page_separator">
+	|
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="page_link">
+	<a class="pagination-bar" href="<inp2:PageLink/>"><inp2:m_param name="page"/></a>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="page_next">
+	<a class="pagination-bar" href="<inp2:PageLink/>">&gt;&gt;</a>
+</inp2:m_DefineElement>
+
+<table style="width: 100%; text-align: left;">
+	<tr>
+		<td style="width: 45%; text-align: right; ">
+			<strong><inp2:m_Phrase label="lu_comm_Page"/>:&nbsp;</strong>
+
+			<inp2:manuf_PaginationBar 
+				current_render_as="page_current" separator_render_as="page_separator" link_render_as="page_link" 
+				prev_page_render_as="prev_page" no_prev_page_render_as="no_prev_page"
+				next_page_render_as="page_next" />
+		</td>
+		<td>&nbsp;</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/manufacturers/manuf_pagination.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/blocks/misc/register_as_affiliate.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/blocks/misc/register_as_affiliate.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/blocks/misc/register_as_affiliate.tpl	(revision 12131)
@@ -0,0 +1,14 @@
+<inp2:m_if check="m_AllowAffiliateRegistration">
+	<inp2:m_if check="m_LoggedIn" inverse="1">
+	<table border="0" cellspacing="0" cellpadding="0" class="block">
+		<tr>
+			<td class="block-header"><inp2:m_Phrase label="lu_comm_Affiliates"/></td>
+		</tr>
+		<tr>
+			<td class="block-data">
+				<a href="<inp2:m_Link template="platform/login/register" RegisterAsAffiliate="on" />"><inp2:m_Phrase label="lu_comm_RegisterAsAffiliate"/></a>
+			</td>
+		</tr>
+	</table>
+	</inp2:m_if>
+</inp2:m_if>

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/blocks/misc/register_as_affiliate.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/store/contact_info.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/store/contact_info.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/store/contact_info.tpl	(revision 12131)
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_ContactInformation"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+  <tr>
+    <td class="main-column-center">
+    	<form method="post" action="<inp2:m_FormAction />">
+
+    		<inp2:m_include template="platform/blocks/common/contact_info"/>
+
+		</form>
+	</td>
+    <td class="main-column-right">
+
+
+
+
+	</td>
+  </tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/store/contact_info.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/store/category.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/store/category.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/store/category.tpl	(revision 12131)
@@ -0,0 +1,62 @@
+<inp2:m_RequireLogin permissions="CATEGORY.VIEW" login_template="platform/login/login_register"/>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_include template="in-commerce/blocks/categories/title_path"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+
+</head>
+<body>
+
+<inp2:c_CheckModuleRoot module="In-Commerce" home_template="in-commerce/index"/>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<inp2:m_include template="in-commerce/blocks/categories/current_path" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-left" valign="top">
+
+    	<inp2:m_include template="in-commerce/blocks/categories/categories_home" data_exists="1"/>
+
+      <inp2:m_include template="platform/blocks/common/credit_cards" />
+
+    </td>
+		<td class="main-column-center">
+
+			<inp2:m_include template="in-commerce/blocks/categories/sub_categories" data_exists="1"/>
+
+			<inp2:m_include template="in-commerce/blocks/products/products_featured" data_exists="1"/>
+
+			<inp2:m_include template="in-commerce/blocks/products/products_picks" data_exists="1"/>
+
+			<inp2:m_include template="in-commerce/blocks/products/products_new" data_exists="1"/>
+
+			<inp2:m_include template="in-commerce/blocks/products/products_current_cat" data_exists="1"/>
+
+		</td>
+		<td class="main-column-right">
+
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" />
+
+			<inp2:m_include template="platform/blocks/common/login" />
+
+			<inp2:m_include template="in-commerce/blocks/categories/manufacturers" data_exists="1"/>
+
+			<inp2:m_include template="in-commerce/blocks/products/products_top_sellers" data_exists="1"/>
+
+			<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1"/>
+
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/store/category.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.11
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/store/featured_products.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/store/featured_products.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/store/featured_products.tpl	(revision 12131)
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_include template="in-commerce/blocks/categories/title_path"/> :: <inp2:m_Phrase label="lu_comm_FeaturedProducts"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<inp2:m_include template="in-commerce/blocks/categories/current_path" />	
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center">
+	
+			<inp2:m_include template="in-commerce/blocks/products/products_featured_list" />	
+			
+		</td>
+		<td class="main-column-right">
+			
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" />	
+			
+			<inp2:m_include template="platform/blocks/common/login" />
+			
+			<inp2:m_include template="in-commerce/blocks/products/products_top_sellers" data_exists="1" />	
+			
+			<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1" />
+		  
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/store/featured_products.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/store/search_results.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/store/search_results.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/store/search_results.tpl	(revision 12131)
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_comm_SearchResults"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body> 
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+  <tr> 
+    <td class="main-column-center">
+	    <inp2:m_include template="in-commerce/blocks/products/products_search_results" />
+    </td> 
+    <td class="main-column-right"> 
+    	
+    	<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" />	
+    	
+    	<inp2:m_include template="platform/blocks/common/login" />
+    	
+    	<inp2:m_include template="in-commerce/blocks/products/products_top_sellers" data_exists="1"/>	
+    	
+    	<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1"/>
+      
+    </td> 
+  </tr> 
+</table> 
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/store/search_results.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/store/top_seller_products.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/store/top_seller_products.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/store/top_seller_products.tpl	(revision 12131)
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_include template="in-commerce/blocks/categories/title_path"/> :: <inp2:m_Phrase label="lu_comm_TopSellers"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<inp2:m_include template="in-commerce/blocks/categories/current_path" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center">
+	
+			<inp2:m_include template="in-commerce/blocks/products/products_topsellers_list" />
+			
+		</td>
+		<td class="main-column-right">
+			
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" />
+			
+			<inp2:m_include template="platform/blocks/common/login" />
+			
+			<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1" />
+		  
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/store/top_seller_products.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/store/new_products.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/store/new_products.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/store/new_products.tpl	(revision 12131)
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_include template="in-commerce/blocks/categories/title_path"/> :: <inp2:m_Phrase label="lu_comm_NewProducts"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<inp2:m_include template="in-commerce/blocks/categories/current_path" />
+
+<table class="main-table">
+	<tr>
+	    <td class="main-column-center">
+	
+			<inp2:m_include template="in-commerce/blocks/products/products_new_list" />
+			
+	    </td>
+	    <td class="main-column-right">
+	    	
+	    	<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" />
+	    	
+	    	<inp2:m_include template="platform/blocks/common/login" />
+	    	
+	    	<inp2:m_include template="in-commerce/blocks/products/products_top_sellers" data_exists="1"/>
+	    	
+	    	<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1"/>
+	      
+	    </td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/store/new_products.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/store/editor_pick_products.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/store/editor_pick_products.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/store/editor_pick_products.tpl	(revision 12131)
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_include template="in-commerce/blocks/categories/title_path"/> :: <inp2:m_Phrase label="lu_comm_EditorsPicks"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<inp2:m_include template="in-commerce/blocks/categories/current_path" />
+
+<table class="main-table"> 
+  <tr> 
+    <td class="main-column-center"> 
+
+		<inp2:m_include template="in-commerce/blocks/products/products_editor_picks" />	
+		
+    </td>
+    <td class="main-column-right">
+    	
+    	<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" />	
+    	
+    	<inp2:m_include template="platform/blocks/common/login" />
+    	
+    	<inp2:m_include template="in-commerce/blocks/products/products_top_sellers" data_exists="1" />	
+    	
+    	<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1"/>
+      
+    </td>
+  </tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/store/editor_pick_products.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/store/manufacturer_products.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/store/manufacturer_products.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/store/manufacturer_products.tpl	(revision 12131)
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_include template="in-commerce/blocks/categories/title_path"/> :: <inp2:m_Phrase label="lu_comm_ProductsBy"/> <inp2:manuf_Field name="Name" /> </title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<inp2:m_include template="in-commerce/blocks/categories/current_path" />
+
+<table class="main-table">
+	<tr>
+	    <td class="main-column-center">
+	
+			<inp2:m_include template="in-commerce/blocks/manufacturers/manufacturer_products" />
+	
+	    </td>
+	    <td class="main-column-right">
+	    	
+	    	<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" />
+	    	
+	    	<inp2:m_include template="platform/blocks/common/login" />
+	    	
+	    	<inp2:m_include template="in-commerce/blocks/products/products_top_sellers" data_exists="1"/>	
+	    	
+	    	<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1"/>
+	      
+	    </td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/store/manufacturer_products.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/store/manufacturers.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/store/manufacturers.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/store/manufacturers.tpl	(revision 12131)
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_include template="in-commerce/blocks/categories/title_path"/> :: <inp2:m_Phrase label="lu_comm_Manufacturers"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+
+</head>
+<body> 
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<inp2:m_include template="in-commerce/blocks/categories/current_path" />	
+
+<table class="main-table"> 
+	<tr> 
+		<td class="main-column-center"> 
+
+			<inp2:m_include template="in-commerce/blocks/manufacturers/manufacturers" />	 
+			
+		</td> 
+		<td class="main-column-right"> 
+			
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" />	
+			
+			<inp2:m_include template="platform/blocks/common/login" />
+			
+			<inp2:m_include template="in-commerce/blocks/products/products_top_sellers" data_exists="1"/>	
+			
+			<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1"/>
+		  
+		</td> 
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/store/manufacturers.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/store/recent.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/store/recent.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/store/recent.tpl	(revision 12131)
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_include template="in-commerce/blocks/categories/title_path"/> :: <inp2:m_Phrase label="lu_comm_RecentlyViewed"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<inp2:m_include template="in-commerce/blocks/categories/current_path" />
+
+<table class="main-table">
+	<tr>
+	    <td class="main-column-center">
+	
+			<inp2:m_include template="in-commerce/blocks/products/products_recent_list" />
+			
+	    </td>
+	    <td class="main-column-right">
+	    	
+	    	<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" />
+	    	
+	    	<inp2:m_include template="platform/blocks/common/login" />
+	    	
+	    	<inp2:m_include template="in-commerce/blocks/products/products_top_sellers" data_exists="1"/>
+	    	
+	    </td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/store/recent.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/store/advanced_search.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/store/advanced_search.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/store/advanced_search.tpl	(revision 12131)
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_comm_AdvancedSearch"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center">
+		
+			<inp2:m_include template="in-commerce/blocks/products/form_advanced_search" />
+	   		
+		</td>
+		<td class="main-column-right">
+			
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" />
+			
+			<inp2:m_include template="platform/blocks/common/login" />
+			
+			<inp2:m_include template="in-commerce/blocks/products/products_top_sellers" data_exists="1"/>
+			
+			<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1"/>
+			
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/store/advanced_search.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/product/review_product.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/product/review_product.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/product/review_product.tpl	(revision 12131)
@@ -0,0 +1,40 @@
+<inp2:m_RequireLogin permissions="CATEGORY.VIEW,PRODUCT.REVIEW|CATEGORY.VIEW,PRODUCT.REVIEW.PENDING" login_template="platform/login/login_register"/>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_include template="in-commerce/blocks/categories/title_path"/> <inp2:p_Field name="Name"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:p_AddToRecent />
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+	    <td class="main-column-center">
+	    
+	    	<inp2:m_include template="in-commerce/blocks/products/form_review_product.tpl"/>
+	    	
+		</td>
+	    <td class="main-column-right">
+	    
+	    	<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator.tpl"/>
+	    	
+	    	<inp2:m_include template="in-commerce/blocks/products/product_actions.tpl"/>
+	    	
+	    	<inp2:m_include template="in-commerce/blocks/products/products_recent.tpl"/>
+	    	
+	    </td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/product/review_product.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/product/details.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/product/details.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/product/details.tpl	(revision 12131)
@@ -0,0 +1,41 @@
+<inp2:m_RequireLogin permissions="CATEGORY.VIEW" login_template="platform/login/login_register"/>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_include template="in-commerce/blocks/categories/title_path"/> <inp2:p_Field name="Name"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+
+<body>
+
+<inp2:p_AddToRecent />
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<inp2:m_include template="in-commerce/blocks/categories/current_path" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center">
+			<inp2:m_include template="in-commerce/blocks/products/product_details.tpl"/>
+		</td>
+		<td class="main-column-right">
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator.tpl"/>
+			
+			<inp2:m_include template="in-commerce/blocks/products/product_actions.tpl"/>
+			
+			<inp2:m_include template="in-commerce/blocks/products/products_recent.tpl"/>
+			
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/product/details.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/product/rate_product.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/product/rate_product.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/product/rate_product.tpl	(revision 12131)
@@ -0,0 +1,40 @@
+<inp2:m_RequireLogin permissions="PRODUCT.RATE,CATEGORY.VIEW" login_template="platform/login/login_register"/>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_include template="in-commerce/blocks/categories/title_path"/> <inp2:p_Field name="Name"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:p_AddToRecent />
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center">
+		
+			<inp2:m_include template="in-commerce/blocks/products/form_rate_product.tpl"/>
+		
+		</td>
+		<td class="main-column-right">
+		
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator.tpl"/>
+			
+			<inp2:m_include template="in-commerce/blocks/products/product_actions.tpl"/>
+			
+			<inp2:m_include template="in-commerce/blocks/products/products_recent.tpl"/>
+			
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/product/rate_product.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/product/confirm_recommend.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/product/confirm_recommend.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/product/confirm_recommend.tpl	(revision 12131)
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_recommend_confirm"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+	    <td class="main-column-center" valign="top">
+
+	    	<inp2:m_include template="in-commerce/blocks/products/confirm_recommend" />
+	    	
+	    </td>
+	    <td class="main-column-right" valign="top">
+
+	    	<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" />
+
+	    	<inp2:m_include template="platform/blocks/common/login" />
+	    	
+	    	<inp2:m_include template="in-commerce/blocks/products/products_top_sellers" data_exists="1"/>
+
+	      	<inp2:m_include template="platform/blocks/common/mailing_list"/>
+	      	
+	    </td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/product/confirm_recommend.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/product/picture_fullsize.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/product/picture_fullsize.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/product/picture_fullsize.tpl	(revision 12131)
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_include template="in-commerce/blocks/categories/title_path"/> <inp2:p_Field name="Name"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+
+</head>
+<body>
+
+<inp2:m_include template="in-commerce/blocks/products/product_fullsize_image" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/product/picture_fullsize.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/product/recommend_product.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/product/recommend_product.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/product/recommend_product.tpl	(revision 12131)
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_include template="in-commerce/blocks/categories/title_path"/> <inp2:p_Field name="Name"/> :: <inp2:m_Phrase label="lu_comm_RecommendThisProduct"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/products/form_recommend_product" />
+	
+		</td>
+		<td class="main-column-right" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator.tpl"/>
+			
+			<inp2:m_include template="in-commerce/blocks/products/product_actions.tpl"/>
+			
+			<inp2:m_include template="in-commerce/blocks/products/products_recent.tpl"/>
+		  
+		</td>
+  </tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/product/recommend_product.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/index.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/index.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/index.tpl	(revision 12131)
@@ -0,0 +1,53 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+  <tr>
+    <td class="main-column-left" valign="top">
+
+    	<inp2:m_include template="in-commerce/blocks/categories/categories_home" data_exists="1"/>
+
+
+      <inp2:m_include template="platform/blocks/common/credit_cards" />
+
+    </td>
+    <td class="main-column-center" valign="top">
+
+    	<inp2:m_include template="in-commerce/blocks/products/products_featured" data_exists="1"/>
+
+    	<inp2:m_include template="in-commerce/blocks/products/products_new" data_exists="1"/>
+
+    	<inp2:m_include template="in-commerce/blocks/products/products_picks" data_exists="1"/>
+
+    </td>
+    <td class="main-column-right" valign="top">
+
+    	<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" />
+
+    	<inp2:m_include template="platform/blocks/common/login" />
+
+    	<inp2:m_include template="in-commerce/blocks/products/products_top_sellers" data_exists="1"/>
+
+		<inp2:m_include template="platform/blocks/common/recommend_site"/>
+
+		<inp2:m_include template="platform/blocks/common/mailing_list"/>
+
+    </td>
+  </tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/index.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/my_account/cancel_recurring_ok.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/my_account/cancel_recurring_ok.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/my_account/cancel_recurring_ok.tpl	(revision 12131)
@@ -0,0 +1,46 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_comm_MyAccount"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center" valign="top">
+
+			<table border="0" cellspacing="0" cellpadding="0" class="block-no-border">
+				<tr>
+					<td class="block-header"><inp2:m_Phrase label="lu_CancelRecurring_title" /></td>
+				</tr>
+				<tr>
+			  		<td class="block-data">
+
+						<br />
+						<strong><inp2:m_Phrase label="lu_CancelRecurring_confirm" /></strong>
+						<br />
+						<br />
+
+						<inp2:m_Phrase label="lu_CancelRecurring_ok" />
+
+					</td>
+				</tr>
+			</table>
+		</td>
+		<td class="main-column-right" valign="top">
+
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/my_account/cancel_recurring_ok.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/my_account/cancel_recurring.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/my_account/cancel_recurring.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/my_account/cancel_recurring.tpl	(revision 12131)
@@ -0,0 +1,53 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_comm_MyAccount"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center" valign="top">
+
+			<table border="0" cellspacing="0" cellpadding="0" class="block-no-border">
+				<tr>
+					<td class="block-header"><inp2:m_Phrase label="lu_CancelRecurring_title" /></td>
+				</tr>
+				<tr>
+			  		<td class="block-data">
+
+						<br />
+						<strong><inp2:m_Phrase label="lu_CancelRecurring_confirm" /></strong>
+						<br />
+						<br />
+
+						<inp2:m_Phrase label="lu_CancelRecurring_confirm_prompt" />
+
+						<br />
+						<br />
+						<form method="POST" action="<inp2:m_FormAction />">
+							<input class="button" name="events[ord][OnCancelRecurring]" type="submit" value="<inp2:m_Phrase label="lu_comm_Yes"/>" />&nbsp;
+							<input class="button" type="button" value="<inp2:m_Phrase label="lu_No"/>" onClick="window.location.href='<inp2:m_Link template="in-commerce/my_account/account"/>'" />&nbsp;
+							<input type="hidden" name="cancelrecurring_ok_template" value="in-commerce/my_account/cancel_recurring_ok"/>
+						</form>
+					</td>
+				</tr>
+			</table>
+		</td>
+		<td class="main-column-right" valign="top">
+
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/my_account/cancel_recurring.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/my_account/address.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/my_account/address.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/my_account/address.tpl	(revision 12131)
@@ -0,0 +1,39 @@
+<inp2:m_RequireLogin login_template="platform/login/login_register" />
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" />
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_comm_MyAddresses"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/my_account/address_list"/>
+
+		</td>
+		<td class="main-column-right" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" data_exists="1"/>
+
+			<inp2:m_include template="in-commerce/blocks/my_account/myaccount_navigation" />
+
+			<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1"/>
+
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/my_account/address.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/my_account/address_edit.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/my_account/address_edit.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/my_account/address_edit.tpl	(revision 12131)
@@ -0,0 +1,39 @@
+<inp2:m_RequireLogin login_template="platform/login/login_register" />
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" />
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_comm_MyAddresses"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/my_account/address_edit"/>
+
+		</td>
+		<td class="main-column-right" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" data_exists="1"/>
+
+			<inp2:m_include template="in-commerce/blocks/my_account/myaccount_navigation" />
+
+			<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1"/>
+
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/my_account/address_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/my_account/orders.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/my_account/orders.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/my_account/orders.tpl	(revision 12131)
@@ -0,0 +1,39 @@
+<inp2:m_RequireLogin login_template="platform/login/login_register" />
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" />
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_comm_MyOrders"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/orders/orders_all"/>
+
+		</td>
+		<td class="main-column-right" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" data_exists="1"/>
+
+			<inp2:m_include template="in-commerce/blocks/my_account/myaccount_navigation" />
+
+			<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1"/>
+
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/my_account/orders.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_payment_type.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_payment_type.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_payment_type.tpl	(revision 12131)
@@ -0,0 +1,41 @@
+<inp2:m_RequireLogin login_template="platform/login/login_register" />
+<inp2:m_RequireAffiliate registration_template="in-commerce/my_account/affiliate" />
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_comm_MyAccount"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/my_account/affiliate_payment_type"/>
+		
+		</td>
+		<td class="main-column-right" valign="top">
+			
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" data_exists="1"/>
+			
+			<inp2:m_include template="in-commerce/blocks/my_account/myaccount_navigation" />
+			
+			<inp2:m_include template="in-commerce/blocks/my_account/affiliate_navigation" />
+			
+			<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1"/>
+		  
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_payment_type.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_materials.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_materials.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_materials.tpl	(revision 12131)
@@ -0,0 +1,42 @@
+<inp2:m_RequireLogin login_template="platform/login/login_register" />
+<inp2:m_RequireAffiliate registration_template="in-commerce/my_account/affiliate" />
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" />
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_comm_MyAccount"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/my_account/affiliate_materials"/>
+
+		</td>
+		<td class="main-column-right" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" data_exists="1"/>
+
+			<inp2:m_include template="in-commerce/blocks/my_account/myaccount_navigation" />
+			
+			<inp2:m_include template="in-commerce/blocks/my_account/affiliate_navigation" />
+			
+			<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1"/>
+
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_materials.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_stat_orders_list.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_stat_orders_list.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_stat_orders_list.tpl	(revision 12131)
@@ -0,0 +1,42 @@
+<inp2:m_RequireLogin login_template="platform/login/login_register" />
+<inp2:m_RequireAffiliate registration_template="in-commerce/my_account/affiliate" />
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" />
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_comm_MyAccount"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/my_account/affiliate_stat_orders_list"/>
+
+		</td>
+		<td class="main-column-right" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" data_exists="1"/>
+
+			<inp2:m_include template="in-commerce/blocks/my_account/myaccount_navigation" />
+			
+			<inp2:m_include template="in-commerce/blocks/my_account/affiliate_navigation" />
+			
+			<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1"/>
+
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_stat_orders_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_payments.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_payments.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_payments.tpl	(revision 12131)
@@ -0,0 +1,42 @@
+<inp2:m_RequireLogin login_template="platform/login/login_register" />
+<inp2:m_RequireAffiliate registration_template="in-commerce/my_account/affiliate" />
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" />
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_comm_MyAccount"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/my_account/affiliate_payments_list"/>
+
+		</td>
+		<td class="main-column-right" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" data_exists="1"/>
+
+			<inp2:m_include template="in-commerce/blocks/my_account/myaccount_navigation" />
+			
+			<inp2:m_include template="in-commerce/blocks/my_account/affiliate_navigation" />
+			
+			<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1"/>
+
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_payments.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_stat_visits_list.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_stat_visits_list.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_stat_visits_list.tpl	(revision 12131)
@@ -0,0 +1,42 @@
+<inp2:m_RequireLogin login_template="platform/login/login_register" />
+<inp2:m_RequireAffiliate registration_template="in-commerce/my_account/affiliate" />
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" />
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_comm_MyAccount"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/my_account/affiliate_stat_visits_list"/>
+
+		</td>
+		<td class="main-column-right" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" data_exists="1"/>
+			
+			<inp2:m_include template="in-commerce/blocks/my_account/myaccount_navigation" />
+			
+			<inp2:m_include template="in-commerce/blocks/my_account/affiliate_navigation" />
+			
+			<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1"/>
+
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_stat_visits_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_stat.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_stat.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_stat.tpl	(revision 12131)
@@ -0,0 +1,42 @@
+<inp2:m_RequireLogin login_template="platform/login/login_register" />
+<inp2:m_RequireAffiliate registration_template="in-commerce/my_account/affiliate" />
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" />
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_comm_MyAccount"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/my_account/affiliate_stat"/>
+
+		</td>
+		<td class="main-column-right" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" data_exists="1"/>
+
+			<inp2:m_include template="in-commerce/blocks/my_account/myaccount_navigation" />
+			
+			<inp2:m_include template="in-commerce/blocks/my_account/affiliate_navigation" />
+			
+			<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1"/>
+
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_stat.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/my_account/downloads_more.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/my_account/downloads_more.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/my_account/downloads_more.tpl	(revision 12131)
@@ -0,0 +1,43 @@
+<inp2:m_RequireLogin login_template="platform/login/login_register" />
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" />
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:p_Field name="Name"/> <inp2:m_Phrase label="lu_comm_downloads" /></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center">
+
+			<inp2:m_include template="in-commerce/blocks/my_account/all_downloads.tpl"/>
+
+		</td>
+		<td class="main-column-right">
+
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator.tpl"/>
+
+			<inp2:m_include template="in-commerce/blocks/my_account/myaccount_navigation" />
+			
+			<inp2:m_include template="in-commerce/blocks/products/products_top_sellers.tpl" data_exists="1" />
+
+			<inp2:m_include template="in-commerce/blocks/products/products_recent.tpl" data_exists="1" />
+
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/my_account/downloads_more.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/my_account/orders_detail.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/my_account/orders_detail.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/my_account/orders_detail.tpl	(revision 12131)
@@ -0,0 +1,39 @@
+<inp2:m_RequireLogin login_template="platform/login/login_register" />
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" />
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_comm_OrderPreview"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/orders/order_details" data_exists="1"/>
+
+		</td>
+		<td class="main-column-right" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" data_exists="1"/>
+
+			<inp2:m_include template="in-commerce/blocks/my_account/myaccount_navigation" />
+			
+			<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1"/>
+
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/my_account/orders_detail.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate.tpl	(revision 12131)
@@ -0,0 +1,41 @@
+<inp2:m_RequireLogin login_template="platform/login/login_register" />
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" />
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_comm_MyAccount"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/my_account/affiliate"/>
+
+		</td>
+		<td class="main-column-right" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" data_exists="1"/>
+
+			<inp2:m_include template="in-commerce/blocks/my_account/myaccount_navigation" />
+			
+			<inp2:m_include template="in-commerce/blocks/my_account/affiliate_navigation" />
+			
+			<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1"/>
+
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/my_account/account.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/my_account/account.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/my_account/account.tpl	(revision 12131)
@@ -0,0 +1,40 @@
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" />
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_comm_MyAccount"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/my_account/my_account"/>
+
+			<inp2:m_include template="in-commerce/blocks/orders/orders_recent"/>
+
+		</td>
+		<td class="main-column-right" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" data_exists="1"/>
+
+			<inp2:m_include template="in-commerce/blocks/my_account/myaccount_navigation" />
+			
+			<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1"/>
+
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/my_account/account.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/my_account/downloads.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/my_account/downloads.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/my_account/downloads.tpl	(revision 12131)
@@ -0,0 +1,41 @@
+<inp2:m_RequireLogin login_template="platform/login/login_register" />
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" />
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_comm_YourDownloads"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/my_account/my_downloads.tpl"/>
+
+		</td>
+		<td class="main-column-right" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator.tpl"/>
+
+			<inp2:m_include template="in-commerce/blocks/my_account/myaccount_navigation" />
+			
+			<inp2:m_include template="in-commerce/blocks/products/products_top_sellers.tpl" data_exists="1" />
+
+			<inp2:m_include template="in-commerce/blocks/products/products_recent.tpl" data_exists="1" />
+
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/my_account/downloads.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/my_account/profile.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/my_account/profile.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/my_account/profile.tpl	(revision 12131)
@@ -0,0 +1,39 @@
+<inp2:m_RequireLogin login_template="platform/login/login_register" />
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" />
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_comm_PersonalInfo"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/my_account/my_profile"/>
+
+		</td>
+		<td class="main-column-right" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" data_exists="1"/>
+
+			<inp2:m_include template="in-commerce/blocks/my_account/myaccount_navigation" />
+			
+			<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1"/>
+
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/my_account/profile.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/my_account/wishlist.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/my_account/wishlist.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/my_account/wishlist.tpl	(revision 12131)
@@ -0,0 +1,41 @@
+<inp2:m_RequireLogin login_template="platform/login/login_register" />
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" />
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_comm_YourWishList"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/products/products_wish_list.tpl"/>
+
+		</td>
+		<td class="main-column-right" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator.tpl"/>
+
+			<inp2:m_include template="in-commerce/blocks/my_account/myaccount_navigation" />
+			
+			<inp2:m_include template="in-commerce/blocks/products/products_top_sellers.tpl" data_exists="1" />
+
+			<inp2:m_include template="in-commerce/blocks/products/products_recent.tpl" data_exists="1" />
+
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/my_account/wishlist.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_payment_type_changed.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_payment_type_changed.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_payment_type_changed.tpl	(revision 12131)
@@ -0,0 +1,36 @@
+<inp2:m_RequireLogin login_template="platform/login/login_register" />
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_comm_MyAccount"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/my_account/affiliate_payment_type_changed"/>
+		
+		</td>
+		<td class="main-column-right" valign="top">
+			
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" data_exists="1"/>
+			
+			<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1"/>
+		  
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_payment_type_changed.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_agreement.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_agreement.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_agreement.tpl	(revision 12131)
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body> 
+
+<div style="padding: 10px;">
+<p>
+Place your affiliate terms & conditions here
+</p>
+</div>
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_agreement.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_thankyou.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_thankyou.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_thankyou.tpl	(revision 12131)
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_comm_MyAccount"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/my_account/affiliate_thankyou"/>
+		
+		</td>
+		<td class="main-column-right" valign="top">
+			
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" data_exists="1"/>
+			
+			<inp2:m_include template="in-commerce/blocks/products/products_recent" data_exists="1"/>
+		  
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/my_account/affiliate_thankyou.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/my_account/download.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/in-commerce/my_account/download.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/in-commerce/my_account/download.tpl	(revision 12131)
@@ -0,0 +1 @@
+<inp2:p_FileDownload />
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/my_account/download.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/img/no_picture_list.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/img/no_picture_list.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/img/no_picture.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/img/no_picture.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/img/buy.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/img/buy.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/img/edpick.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/img/edpick.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/img/buy2.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/img/buy2.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/img/delete.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/img/delete.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/img/toprated.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/img/toprated.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/img/visa.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/img/visa.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/img/master_card.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/img/master_card.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/img/american_express.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/img/american_express.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/img/new.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/img/new.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/img/topseller.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/img/topseller.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/in-commerce/img/novus.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/in-commerce/img/novus.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/common/contact_info.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/common/contact_info.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/common/contact_info.tpl	(revision 12131)
@@ -0,0 +1,52 @@
+<table class="block-no-border">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_ContactInformation"/></td>
+	</tr>
+	<tr>
+		<td class="block-data-single">
+			<h1><inp2:conf_ConfigValue name="Comm_CompanyName"/></h1>
+			<table class="block-no-border">
+				<tr class="form-data">
+					<td><strong><inp2:m_Phrase label="lu_Email"/>:</strong></td>
+					<td><a href="mailto:<inp2:conf_ConfigValue name="Comm_Contacts_Email"/>"><inp2:conf_ConfigValue name="Comm_Contacts_Email"/></a> </td>
+				</tr>
+				<tr class="form-data">
+					<td width="200"><strong><inp2:m_Phrase label="lu_Phone"/>:</strong></td>
+					<td><inp2:conf_ConfigValue name="Comm_Contacts_Phone"/> </td>
+				</tr>
+				<tr class="form-data">
+					<td><strong><inp2:m_Phrase label="lu_Fax"/>:</strong></td>
+					<td><inp2:conf_ConfigValue name="Comm_Contacts_Fax"/> </td>
+				</tr>
+				<tr class="form-data">
+					<td width="200"><strong><inp2:m_Phrase label="lu_Address"/>:</strong></td>
+					<td><inp2:conf_ConfigValue name="Comm_AddressLine1"/> </td>
+				</tr>
+				<tr class="form-data">
+					<td>&nbsp;</td>
+					<td><inp2:conf_ConfigValue name="Comm_AddressLine2"/> </td>
+				</tr>
+				<tr class="form-data">
+					<td><strong><inp2:m_Phrase label="lu_City"/>:</strong></td>
+					<td><inp2:conf_ConfigValue name="Comm_City"/> </td>
+				</tr>
+				<tr class="form-data">
+					<td><strong><inp2:m_Phrase label="lu_State"/>:</strong></td>
+					<td><inp2:conf_ConfigValue name="Comm_State"/> </td>
+				</tr>
+				<tr class="form-data">
+					<td><strong><inp2:m_Phrase label="lu_ZipCode"/>:</strong></td>
+					<td><inp2:conf_ConfigValue name="Comm_ZIP"/> </td>
+				</tr>
+				<tr class="form-data">
+					<td><strong><inp2:m_Phrase label="lu_Country"/>:</strong></td>
+					<td><inp2:conf_ConfigValue name="Comm_Country"/> </td>
+				</tr>
+				<tr class="form-data">
+					<td><strong><inp2:m_Phrase label="lu_AdditionalInfo"/>:</strong></td>
+					<td><inp2:conf_ConfigValue name="Comm_Contacts_Additional"/> </td>
+				</tr>
+			</table>			
+		</td>
+	</tr>
+</table>

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/common/contact_info.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/common/html_head.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/common/html_head.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/common/html_head.tpl	(revision 12131)
@@ -0,0 +1,23 @@
+<inp2:m_CheckSSL/>
+<meta http-equiv="Content-Type" content="text/html; charset=<inp2:lang.current_Field name="Charset"/>" />
+<inp2:m_if check="m_ModuleEnabled" module="In-Edit">
+	<!--## if In-edit purchase! ##-->
+	<inp2:m_Include t="in-edit/blocks/header"/>
+	<!--## /if In-edit purchase! ##-->
+<inp2:m_else/>
+	<meta name="description" content="<inp2:c_Meta name="Description"/>" />
+	<meta name="keywords" content="<inp2:c_Meta name="Keywords"/>" />
+</inp2:m_if>
+<inp2:m_base_ref />
+<script type="text/javascript" src="inc/prototype.js"></script>
+<script type="text/javascript" src="inc/scriptaculous.js?load=effects"></script>
+<script type="text/javascript" src="inc/lightbox.js"></script>
+<script type="text/javascript" src="inc/ajax.js"></script>
+
+<script type="text/javascript">
+	var aRatingManager = new RatingManager('<inp2:m_Link template="index" events[#PREFIX#]="OnMakeVote" rating="#VOTE#" id="#ID#" no_amp="1" size="#SIZE#"/>');
+</script>
+
+<link href="inc/style.css" rel="stylesheet" type="text/css" />
+<link rel="stylesheet" href="inc/lightbox.css" type="text/css" media="screen" />
+<inp2:theme.current_StylesheetFile/>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/common/html_head.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/common/header.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/common/header.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/common/header.tpl	(revision 12131)
@@ -0,0 +1,52 @@
+<inp2:m_if check="m_ModuleEnabled" module="In-Edit">
+	<inp2:cms_EditPage />
+</inp2:m_if>
+<table class="header">
+	<tr>
+		<td>
+			<a href="<inp2:c_CategoryLink template="index" module="In-Commerce" cat_id="Root"/>"><img src="img/logo.gif" alt="In-commerce Online Store" border="0" /></a>
+		</td>
+		<td style="text-align: right">
+			<inp2:m_if check="m_LoggedIn">
+				<strong><inp2:m_Phrase label="lu_comm_Welcome"/>, <inp2:u_Field name="FirstName"/> <inp2:u_Field name="LastName"/>!</strong>
+				<br>
+			</inp2:m_if>
+			<form method="post" name="lang_form" id="lang_form" action="<inp2:m_FormAction />">
+			<input type="hidden" name="events[lang][OnChangeLanguage]" value="">
+			<inp2:m_Phrase label="lu_YourLanguage"/>:
+			<select name="language" onchange="document.getElementById('lang_form').submit()">
+				<inp2:m_DefineElement name="lang_elem">
+					<option value="<inp2:Field name="LanguageId"/>" <inp2:m_if check="SelectedLanguage">selected="selected"</inp2:m_if> ><inp2:Field name="PackName"/></option>
+				</inp2:m_DefineElement>
+				<inp2:lang_ListLanguages render_as="lang_elem" row_start_render_as="html:" row_end_render_as="html:"/>
+			</select>
+			</form>
+
+			<!--## THEME DROP-DOWN ##-->
+			<!--##
+			<form method="post" name="theme_form" id="theme_form" action="<inp2:m_FormAction />">
+				<input type="hidden" name="events[theme][OnChangeTheme]" value="" />
+				<inp2:m_Phrase label="lu_CurrentTheme"/>:
+				<select name="theme" class="input-select" onchange="document.getElementById('theme_form').submit()">
+					<inp2:m_DefineElement name="theme_elem">
+						<option value="<inp2:Field name="ThemeId"/>" <inp2:m_if check="SelectedTheme">selected="selected"</inp2:m_if> ><inp2:Field name="Name"/></option>
+					</inp2:m_DefineElement>
+				<inp2:theme_PrintList render_as="theme_elem" no_table="1"/>
+				</select>
+			</form>
+			##-->
+			<!--## /THEME DROP-DOWN ##-->
+
+			<form method="post" name="cur_form" id="cur_form" action="<inp2:m_FormAction />">
+				&nbsp; <inp2:m_Phrase label="lu_YourCurrency"/>:
+				<input type="hidden" name="events[curr][OnChangeCurrency]" value="">
+				<select name="curr_iso" onchange="document.getElementById('cur_form').submit()">
+					<inp2:m_DefineElement name="currency">
+						<option value="<inp2:Field name="ISO"/>" <inp2:m_if check="SelectedCurrency">selected="selected"</inp2:m_if> ><inp2:Field name="ISO"/></option>
+					</inp2:m_DefineElement>
+					<inp2:curr_ListCurrencies render_as="currency" row_start_render_as="html:" row_end_render_as="html:"/>
+				</select>
+			</form>
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/common/header.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/common/toolbar.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/common/toolbar.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/common/toolbar.tpl	(revision 12131)
@@ -0,0 +1,24 @@
+<table class="toolbar-block">
+	<tr>
+		<td class="toolbar"> <strong><inp2:m_Phrase label="lu_QuickSearch"/>:</strong>
+				<form method="get" action="<inp2:m_link template="in-commerce/store/search_results" />">
+					<inp2:m_GetFormHiddens template="in-commerce/store/search_results"/>
+					<input type="text" name="keywords" id="keywords" style="width: 150px" value="" />&nbsp;
+					<input class="button" type="submit" style="width: 40px;" value="<inp2:m_Phrase label="lu_comm_Go"/>!" />
+				</form>
+				<strong>&nbsp;&nbsp;<a href="<inp2:m_Link template="in-commerce/store/advanced_search" />" class="toolbar"><inp2:m_Phrase label="lu_AdvancedSearch"/></a></strong>
+		</td>
+		<td align="right" class="toolbar">
+			<strong>
+				<a href="<inp2:c_CategoryLink template="index" module="In-Commerce" cat_id="Root"/>" class="toolbar"><inp2:m_Phrase label="lu_Home"/></a> |
+				<a href="<inp2:m_Link template="in-commerce/my_account/account"/>" class="toolbar"><inp2:m_Phrase label="lu_YourAccount"/></a> |
+				<a href="<inp2:m_Link template="in-commerce/my_account/wishlist"/>" class="toolbar"><inp2:m_Phrase label="lu_YourWishList"/></a> |
+				<a href="<inp2:m_Link template="in-commerce/checkout/shop_cart"/>" class="toolbar"><inp2:m_Phrase label="lu_ShoppingCart"/></a> |
+				<a href="<inp2:m_Link template="in-commerce/store/contact_info" />" class="toolbar"><inp2:m_Phrase label="lu_ContactUs"/></a>
+				<inp2:m_if check="m_ModuleEnabled" module="In-Edit">
+					<inp2:m_include template="in-edit/blocks/dmenu"/>
+				</inp2:m_if>
+			</strong>
+		</td>
+	</tr>
+</table>

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/common/toolbar.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/common/forgotpass_form.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/common/forgotpass_form.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/common/forgotpass_form.tpl	(revision 12131)
@@ -0,0 +1,66 @@
+
+
+<table class="block-no-border">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_ForgotPassword"/></td>
+	</tr>
+	<tr>
+		<td class="block-data-single">
+
+
+			<form method="POST" action="<inp2:m_FormAction />">
+
+				<table class="form-data">
+
+					<inp2:m_if check="conf_ConfigValue" name="Email_As_Login">
+						<tr>
+							<td colspan="3"><inp2:m_Phrase label="lu_EnterForgotEmail"/><br/><br/></td>
+						</tr>
+					<inp2:m_else/>
+						<tr>
+							<td colspan="3"><inp2:m_Phrase label="lu_EnterForgotUserEmail"/></td>
+						</tr>
+						<tr>
+							<td><strong><inp2:m_Phrase label="lu_Username"/>:</strong></td>
+							<td><input type="text" name="username"/></td>
+							<td>
+								<inp2:m_if check="u_HasError" field="any">
+									<br />
+									<span class="error"><inp2:u_Error field="Login"/></span>
+								</inp2:m_if>
+							</td>
+						</tr>
+							<td><strong><inp2:m_Phrase label="lu_Or"/></strong></td>
+							<td>&nbsp;</td>
+							<td>&nbsp;</td>
+						</tr>
+					</inp2:m_if>
+
+					<tr>
+						<td><strong><inp2:m_Phrase label="lu_Email"/>:</strong></td>
+						<td><input type="text" name="email"/></td>
+						<td>
+							<inp2:m_if check="u_HasError" field="any">
+								<br />
+								<span class="error"><inp2:u_Error field="Email"/></span>
+							</inp2:m_if>
+						</td>
+					</tr>
+					<tr>
+						<td>&nbsp;</td>
+						<td><input type="submit" value="<inp2:m_Phrase label="lu_comm_SendPassword"/>" name="events[u][OnForgotPassword]" class="button" /> <input type="button" class="button" onclick="window.location.href = '<inp2:m_Link template="index"/>';" value="<inp2:m_phrase label="lu_Cancel"/>"></td>
+						<td>&nbsp;</td>
+					</tr>
+
+				</table>
+			<input type="hidden" name="template_success" value="index" />
+			<input type="hidden" name="reset_confirm_template" value="platform/login/forgotpass_reset" />
+
+			</form>
+
+
+
+		</td>
+	</tr>
+</table>
+

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/common/forgotpass_form.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4.4.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/common/footer.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/common/footer.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/common/footer.tpl	(revision 12131)
@@ -0,0 +1,18 @@
+<table border="0" cellspacing="0" cellpadding="0">
+	<tr>
+		<td class="toolbar" style="text-align: center">
+			<a href="<inp2:c_CategoryLink template="index" module="In-Commerce" cat_id="Root"/>" class="toolbar"><inp2:m_Phrase label="lu_Home"/></a> |
+			<a href="<inp2:m_Link template="in-commerce/my_account/account"/>" class="toolbar"><inp2:m_Phrase label="lu_YourAccount"/></a> |
+			<a href="<inp2:m_Link template="in-commerce/my_account/wishlist"/>" class="toolbar"><inp2:m_Phrase label="lu_YourWishList"/></a> |
+			<a href="<inp2:m_Link template="in-commerce/checkout/shop_cart"/>" class="toolbar"><inp2:m_Phrase label="lu_ShoppingCart"/></a> |
+			<a href="<inp2:m_Link template="in-commerce/store/contact_info" />" class="toolbar"><inp2:m_Phrase label="lu_ContactUs"/></a>
+			<inp2:m_if check="m_LoggedIn">
+				 | <a href="<inp2:u_LogoutLink />" class="toolbar"><inp2:m_Phrase label="lu_Logout"/></a>
+			</inp2:m_if>
+
+
+		</td>
+	</tr>
+</table>
+
+<inp2:m_RegisterPageHit/>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/common/footer.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/common/copyright.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/common/copyright.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/common/copyright.tpl	(revision 12131)
@@ -0,0 +1,7 @@
+<table style="text-align: center">
+	<tr>
+		<td>
+			<inp2:m_Phrase label="lu_PoweredBy"/> <a href="http://www.in-commerce.net" target="_blank">In-Commerce</a> &reg; 1997-2007, <a href="http://www.intechnic.com" target="_blank">Intechnic Corporation</a>. <inp2:m_Phrase label="lu_AllRightsReserved"/><br/>
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/common/copyright.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/common/test.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/common/test.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/common/test.tpl	(revision 12131)
@@ -0,0 +1,3 @@
+<inp2:m_if check="m_LoggedIn">
+	<a href="<inp2:m_Link template="in-commerce/my_account/wishlist"/>" class="toolbar">Your Wish List</a> |
+</inp2:m_if>

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/common/test.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/common/login.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/common/login.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/common/login.tpl	(revision 12131)
@@ -0,0 +1,43 @@
+<table border="0" cellspacing="0" cellpadding="0" class="block">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_comm_Login"/></td>
+	</tr>
+	<tr>
+		<td class="block-data-big">
+			<inp2:m_if check="m_LoggedIn">
+				<inp2:m_Phrase label="lu_comm_Welcome"/>, <inp2:u_Field name="FirstName"/> <inp2:u_Field name="LastName"/><br/>
+				<img src="img/s.gif" alt="" width="5" height="5" border="0" /><br />
+				<a href="<inp2:u_LogoutLink/>"><inp2:m_Phrase label="lu_comm_Logout"/></a>
+			<inp2:m_else/>
+				<form method="POST" action="<inp2:m_FormAction />">
+					<inp2:m_if check="u_UseUsernames">
+						<inp2:m_phrase label="lu_username"/><br />
+						<input type="text" name="login" />
+					<inp2:m_else/>
+						<inp2:m_phrase label="lu_email"/><br />
+						<input type="text" name="email" />
+					</inp2:m_if>
+
+					<br />
+					<inp2:m_Phrase label="lu_Password"/><br />
+					<input type="password" name="password" />
+					<br /><img src="img/s.gif" alt="" width="5" height="10" border="0" /><br />
+					<input class="button" name="events[u][OnLogin]" type="submit" style="width: 70px;" value="<inp2:m_Phrase label="lu_comm_Login"/>" /><br />
+					<img src="img/s.gif" alt="" width="5" height="5" border="0" /><br />
+					<inp2:m_if check="u_HasError" field="any">
+						<span class="error"><inp2:u_Error field="ValidateLogin"/></span><br />
+					</inp2:m_if>
+
+					<inp2:m_if check="u_RegistrationEnabled">
+						<a href="<inp2:m_Link template="platform/login/register"/>"><inp2:m_Phrase label="lu_Register"/></a><br />
+					</inp2:m_if>
+
+					<a href="<inp2:m_Link template="platform/login/forgotpass" />"><inp2:m_Phrase label="lu_ForgotPassword"/>?</a>
+					<input type="hidden" name="shop_cart_template" value="in-commerce/checkout/shop_cart" />
+					<input type="hidden" name="next_template" value="<inp2:m_get var="next_template"/>">
+					<input type="hidden" name="pending_disabled_template" value="platform/login/login_pending_disabled" />
+				</form>
+			</inp2:m_if>
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/common/login.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/common/form_phrase.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/common/form_phrase.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/common/form_phrase.tpl	(revision 12131)
@@ -0,0 +1,87 @@
+<inp2:m_DefineElement name="option_element">
+	<option value="<inp2:m_param name="key"/>"<inp2:m_param name="selected"/>><inp2:m_param name="option"/></option>
+</inp2:m_DefineElement>
+
+<form method="post" action="<inp2:m_FormAction/>">
+
+<table class="block-no-border">
+	<tr>
+		<td class="block-header">
+			Missing phrase adding
+		</td>
+	</tr>
+	<tr>
+		<td class="block-data">
+				<br/>
+				<inp2:m_if check="phrases_HasError" field="any">
+					<table class="warning">
+						<tr>
+							<td valign="top" align="left" class="block-data">
+								<img src="img/message.gif" alt="" width="19" height="19" />
+								<span class="warning-text">Warning</span><br />
+								There is a problem with the form, please check the error messages below.
+							</td>
+						</tr>
+					</table>
+				</inp2:m_if>
+
+				<strong>* Indicates Required fields.</strong> 	<br /><br />
+				<table class="form-data">
+
+					<tr>
+						<td>
+							<strong><inp2:m_phrase label="lu_fld_primary_translation"/>:</strong>
+						</td>
+						<td>
+							<inp2:phrases_Field name="PrimaryTranslation"/>
+						</td>
+						<td width="170" class="error">&nbsp;</td>
+					</tr>
+
+					<tr>
+						<td>
+							<strong><inp2:m_phrase label="lu_fld_phrase"/>:</strong>
+						</td>
+						<td>
+							<input type="text" name="<inp2:phrases_InputName field="Phrase"/>" value="<inp2:phrases_Field name="Phrase"/>" style="width: 300px;" />
+						</td>
+						<td width="170" class="error"><inp2:phrases_Error field="Phrase"/></td>
+					</tr>
+
+					<tr>
+						<td>
+							<strong><inp2:m_phrase label="lu_fld_translation"/>:</strong>
+						</td>
+						<td>
+							<input type="text" name="<inp2:phrases_InputName field="Translation"/>" value="<inp2:phrases_Field name="Translation"/>" style="width: 300px;" />
+						</td>
+						<td width="170" class="error"><inp2:phrases_Error field="Translation"/></td>
+					</tr>
+
+					<tr>
+						<td>
+							<strong><inp2:m_phrase label="lu_fld_module"/>:</strong>
+						</td>
+						<td>
+							<select name="<inp2:phrases_InputName field="Module"/>" style="width: 300px;">
+								<inp2:phrases_PredefinedOptions field="Module" render_as="option_element" selected_param="selected" selected="selected=\"selected\""/>
+							</select>
+						</td>
+						<td class="error"><inp2:phrases_Error field="Module"/></td>
+					</tr>
+
+					<tr>
+						<td colspan="3" valign="bottom" height="35">
+							<input type="hidden" id="phrases_label" name="phrases_label" value="<inp2:m_get var="phrases_label"/>" />
+							<input type="hidden" name="<inp2:phrases_InputName field="LanguageId"/>" value="<inp2:phrases_Field name="LanguageId"/>" />
+							<input type="hidden" name="<inp2:phrases_InputName field="PhraseType"/>" value="0" />
+
+							<input class="button" type="submit" id="events[phrases][OnCreate]" name="events[phrases][OnCreate]" value="<inp2:m_Phrase label="lu_comm_Create"/>"/>
+						</td>
+					</tr>
+				</table>
+		</td>
+	</tr>
+</table>
+
+</form>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/common/form_phrase.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/common/redirect.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/common/redirect.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/common/redirect.tpl	(revision 12131)
@@ -0,0 +1,18 @@
+	<table border="0" cellspacing="0" cellpadding="0" class="block-no-border">
+		<tr>
+			<td class="block-header"><inp2:m_Phrase label="lu_redirecting_title" /></td>
+		</tr>
+		<tr> 
+	  		<td class="block-data">
+				<form action="<inp2:m_FormAction />" method="get">
+		  			
+					<br />
+					<a href="<inp2:m_get name="redirect_to"/>"><inp2:m_Phrase label="lu_redirecting_text" /></a><br />
+					<br />
+					<script type="text/javascript">
+						document.write('<input type="submit" class="button" value=" Proceed " accesskey="s" onclick="window.location=\'<inp2:m_get name="redirect_to_js"/>\'; return false" />');
+					</script>
+				</form>
+			</td>			
+		</tr>
+	</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/common/redirect.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/common/not_found_warning.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/common/not_found_warning.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/common/not_found_warning.tpl	(revision 12131)
@@ -0,0 +1,22 @@
+<table class="block-no-border">
+	<tr>
+		<td class="block-header">
+			<inp2:m_Phrase label="lu_error_404_title"/>
+		</td>
+	</tr>
+	<tr>
+		<td class="block-data">
+
+			<table class="warning">
+				<tr>
+					<td valign="top" align="left" class="block-data">
+						<img src="img/message.gif" alt="" width="19" height="19" />
+						<span class="warning-text"><inp2:m_Phrase label="lu_Warning"/></span><br />
+						<inp2:m_Phrase label="lu_error_404_description"/>			
+					</td>
+				</tr>
+			</table>
+			
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/common/not_found_warning.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/common/login_existing.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/common/login_existing.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/common/login_existing.tpl	(revision 12131)
@@ -0,0 +1,71 @@
+<form method="post" action="<inp2:m_FormAction />">
+
+<table class="block-no-border">
+	<tr>
+		<td class="block-header">
+			<inp2:m_Phrase label="lu_ReturningCustomers"/>
+		</td>
+	</tr>
+	<tr>
+		<td class="block-data">
+			<inp2:m_if check="u_HasError" field="ValidateLogin">
+				<table class="warning">
+					<tr>
+						<td valign="top" align="left" class="block-data">
+							<img src="img/message.gif" alt="" width="19" height="19" />
+							<span class="warning-text"><inp2:m_Phrase label="lu_Warning"/></span><br />
+							<inp2:m_Phrase label="lu_AProblemWithForm"/>
+							
+						</td>
+					</tr>
+				</table>
+			</inp2:m_if><inp2:m_Phrase label="lu_PleaseLogin"/>
+			<br />
+			<br />
+			<table class="form-data">
+				<inp2:m_if check="u_UseUsernames">
+				<tr>
+					<td>
+						<strong><inp2:m_phrase label="lu_username"/>*:</strong>
+					</td>
+					<td>
+						<input type="text" name="login" value="" style="width: 300px;" />
+					</td>
+					<td width="170" class="error">&nbsp;</td>
+				</tr>
+				<inp2:m_else/>
+				<tr>
+					<td>
+						<strong><inp2:m_phrase label="lu_email"/>*:</strong>
+					</td>
+					<td>
+						<input type="text" name="email" value="" style="width: 300px;" />
+					</td>
+					<td width="170" class="error">&nbsp;</td>
+				</tr>
+				</inp2:m_if>
+
+				<tr>
+					<td>
+						<strong><inp2:m_phrase label="lu_password"/>*:</strong>
+					</td>
+					<td>
+						<input type="password" name="password" value="" style="width: 300px;" />
+					</td>
+					<td class="error"><inp2:u_Error field="ValidateLogin"/></td>
+				</tr>
+				<tr>
+					<td colspan="3" valign="bottom" height="35">
+						<input class="button" name="events[u][OnLogin]" type="submit" style="width: 70px;" value="<inp2:m_Phrase label="lu_comm_Login"/>" /><br /><br />
+						<inp2:m_Phrase label="lu_IfForgotPass"/>
+						 <a href="<inp2:m_Link template="platform/login/forgotpass"/>"><inp2:m_Phrase label="lu_Here"/></a> <br />
+					</td>
+				</tr>
+			</table>
+		</td>
+	</tr>
+</table>
+	<input type="hidden" name="shop_cart_template" value="in-commerce/checkout/shop_cart" />
+	<input type="hidden" name="next_template" value="<inp2:m_get var="next_template"/>">
+	<input type="hidden" name="pending_disabled_template" value="platform/login/login_pending_disabled" />
+</form>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/common/login_existing.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/common/unsubscribe_confirmation.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/common/unsubscribe_confirmation.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/common/unsubscribe_confirmation.tpl	(revision 12131)
@@ -0,0 +1,26 @@
+<table border="0" cellspacing="0" cellpadding="0" class="block-no-border">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_unsubscribe_title" /></td>
+	</tr>
+	<tr> 
+  		<td class="block-data">
+
+  			<br />
+			<br />
+			<strong><inp2:m_Phrase label="lu_unsubscribe_confirm" /></strong>
+			<br />
+			<br />
+			
+			<inp2:m_Phrase label="lu_unsubscribe_confirm_prompt" />
+			
+			<br />
+			<br />
+			<form method="POST" action="<inp2:m_FormAction />">
+				<input class="button" name="events[u][OnSubscribeUser]" type="submit" style="width: 80px;" value="<inp2:m_Phrase label="lu_comm_Yes"/>" />&nbsp;
+				<input class="button" type="button" value="<inp2:m_Phrase label="lu_Cancel"/>" onClick="window.location.href='<inp2:m_Link template="index"/>'" />&nbsp;
+				<input type="hidden" name="unsubscribe_ok_template" value="platform/my_account/unsubscribe_ok"/>
+				<input type="hidden" name="unsubscribe_fail_template" value="platform/my_account/unsubscribe_fail"/>
+			</form>
+		</td>			
+	</tr>
+</table>

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/common/unsubscribe_confirmation.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/common/recommend_send.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/common/recommend_send.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/common/recommend_send.tpl	(revision 12131)
@@ -0,0 +1,20 @@
+<table border="0" cellspacing="0" cellpadding="0" class="block-no-border">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_recommend_title" /></td>
+	</tr>
+	<tr> 
+  		<td class="block-data">
+
+  			<br />
+			<br />
+			<strong><inp2:m_Phrase label="lu_recommend_confirm" /></strong>
+			<br />
+			<br />
+			<inp2:m_Phrase label="lu_recommend_confirm_text" />
+			<br />
+			<br />
+			<button onClick="window.location.href='<inp2:m_Link template="index" />';" class="button" /><inp2:m_Phrase label="lu_comm_Ok"/></button>
+
+		</td>			
+	</tr>
+</table>

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/common/recommend_send.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/common/forgotpass_reset_ok.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/common/forgotpass_reset_ok.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/common/forgotpass_reset_ok.tpl	(revision 12131)
@@ -0,0 +1,27 @@
+
+
+<table class="block-no-border">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_ForgotPassword"/></td>
+	</tr>
+	<tr>
+		<td class="block-data-single">
+
+			<form method="POST" action="<inp2:m_FormAction />">
+			
+			<inp2:m_Phrase label="lu_text_ForgotPassHasBeenReset"/>
+			
+			<br /><br />
+			
+			<input type="button" name="ResetPasswordOk" value="<inp2:m_Phrase label="lu_comm_Ok"/>" class="button" onClick="window.location.href='<inp2:c_CategoryLink template="platform/login/login_register" module="In-Commerce" cat_id="Root"/>&next_template=index'" />
+			
+			</form>							
+
+			<br /><br />
+			<br /><br />
+			<br /><br />
+			
+		</td>
+	</tr>
+</table>
+

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/common/forgotpass_reset_ok.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/common/credit_cards.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/common/credit_cards.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/common/credit_cards.tpl	(revision 12131)
@@ -0,0 +1,18 @@
+<table border="0" cellspacing="0" cellpadding="0" class="block">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_CreditCards"/></td>
+	</tr>
+	<tr>
+		<td class="block-data-big"> <strong><inp2:m_Phrase label="lu_WeAcceptCards"/></strong><br />
+			<br />
+			<table style="text-align: center">
+				<tr>
+					<td>
+						<img alt="" src="in-commerce/img/visa.gif" /> <img alt="" src="in-commerce/img/american_express.gif" /> <img alt="" src="in-commerce/img/master_card.gif" /> <img alt="" src="in-commerce/img/novus.gif" />
+						<br />
+					</td>
+				</tr>
+			</table>
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/common/credit_cards.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/common/subscribe_confirmation.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/common/subscribe_confirmation.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/common/subscribe_confirmation.tpl	(revision 12131)
@@ -0,0 +1,26 @@
+<table border="0" cellspacing="0" cellpadding="0" class="block-no-border">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_subscribe_title" /></td>
+	</tr>
+	<tr> 
+  		<td class="block-data">
+
+  			<br />
+			<br />
+			<strong><inp2:m_Phrase label="lu_subscribe_confirm" /></strong>
+			<br />
+			<br />
+			
+			<inp2:m_Phrase label="lu_subscribe_confirm_prompt" />
+			
+			<br />
+			<br />
+			<form method="POST" action="<inp2:m_FormAction />">
+				<input class="button" name="events[u][OnSubscribeUser]" type="submit" style="width: 80px;" value="<inp2:m_Phrase label="lu_comm_Yes"/>" />&nbsp;
+				<input class="button" type="button" value="<inp2:m_Phrase label="lu_Cancel"/>" onClick="window.location.href='<inp2:m_Link template="index"/>'" />&nbsp;
+				<input type="hidden" name="subscribe_ok_template" value="platform/my_account/subscribe_ok"/>
+				<input type="hidden" name="subscribe_fail_template" value="platform/my_account/subscribe_error"/>
+			</form>
+		</td>			
+	</tr>
+</table>

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/common/subscribe_confirmation.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/common/forgotpass_reset.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/common/forgotpass_reset.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/common/forgotpass_reset.tpl	(revision 12131)
@@ -0,0 +1,44 @@
+
+
+<table class="block-no-border">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_ForgotPassword"/></td>
+	</tr>
+	<tr>
+		<td class="block-data-single">
+
+			<form method="POST" action="<inp2:m_FormAction />">
+			
+			<strong><inp2:m_Phrase label="lu_title_PasswordRequestConfirm"/></strong>
+			
+			<br/><br/>
+			
+			<inp2:m_Phrase label="lu_text_PasswordRequestConfirm"/>
+			
+			<br /><br />
+			
+			<inp2:m_if check="u_TestCodeIsValid" >
+			
+				<input type="submit" name="events[u][OnResetPasswordConfirmed]" value="<inp2:m_Phrase label="lu_comm_Yes"/>" class="button" />
+				
+				<input type="button" name="ResetPasswordCancelled" value="<inp2:m_Phrase label="lu_comm_No"/>" class="button" onClick="window.location.href='<inp2:c_CategoryLink template="index" module="In-Commerce" cat_id="Root"/>'" />
+				
+				<input type="hidden" name="user_key" value="<inp2:m_get name='user_key' />" />
+				<input type="hidden" name="template_success" value="platform/login/forgotpass_reset_ok" />
+				</form>
+				
+			<inp2:m_else />
+				<span class="error"><inp2:u_Error field="PwResetConfirm"/></span>
+				<br />	<br />	
+				<a href="<inp2:c_CategoryLink template="index" module="In-Commerce" cat_id="Root"/>"><inp2:m_Phrase label="lu_ReturnToHome"/></a>
+			</inp2:m_if>
+
+			
+			
+						
+
+
+		</td>
+	</tr>
+</table>
+

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/common/forgotpass_reset.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/common/recommend_site.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/common/recommend_site.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/common/recommend_site.tpl	(revision 12131)
@@ -0,0 +1,18 @@
+<table border="0" cellspacing="0" cellpadding="0" class="block">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_RecommendToFriend"/></td>
+	</tr>
+	<tr>
+		<td class="block-data-big"><inp2:m_Phrase label="lu_EnterEmailToRecommend"/><br />
+		<form method="POST" action="<inp2:m_FormAction />">
+			<input type="text" name="friend_email" value="" />
+			<br /><img src="img/s.gif" alt="" width="5" height="10" border="0" /><br />
+			<inp2:m_if check="u_HasError" field="any">
+				<span class="error"><inp2:u_Error field="Email"/></span><br />
+			</inp2:m_if>
+			<input class="button" name="events[u][OnRecommend]" type="submit" value="<inp2:m_Phrase label="lu_comm_Recommend"/>" />
+			<input type="hidden" name="template_success" value="platform/my_account/recommend.tpl" />
+		</form>
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/common/recommend_site.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/common/adv_search.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/common/adv_search.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/common/adv_search.tpl	(revision 12131)
@@ -0,0 +1,11 @@
+<table border="0" cellspacing="0" cellpadding="0" class="block">
+	<tr>
+		<td class="block-header" colspan="2">
+			<inp2:m_Phrase label="lu_AdvancedSearch"/>
+		</td>
+	</tr>
+	<tr>
+		<td class="block-data-big"> <a href="<inp2:m_link template="in-commerce/store/advanced_search" />"><inp2:m_Phrase label="lu_AdvancedSearch"/></a> </td>
+		<td align="right" class="block-data-big"> <a href="<inp2:m_link template="in-commerce/store/advanced_search" />"><img src="img/adv_search.gif" alt="Advanced Search" width="27" height="27" border="0" /></a> </td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/common/adv_search.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/common/forgotpass_confirm.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/common/forgotpass_confirm.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/common/forgotpass_confirm.tpl	(revision 12131)
@@ -0,0 +1,27 @@
+
+
+<table class="block-no-border">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_ForgotPassword"/></td>
+	</tr>
+	<tr>
+		<td class="block-data-single">
+
+			<form method="POST" action="<inp2:m_FormAction />">
+			
+			<strong><inp2:m_Phrase label="lu_title_ConfirmPasswordReset"/></strong>
+			<br/><br/>
+			<inp2:m_Phrase label="lu_text_ConfirmPasswordReset"/>
+			
+			<br /><br />
+			
+			<input type="submit" name="events[u][OnResetPassword]" value="<inp2:m_Phrase label="lu_comm_Ok"/>" class="button" />
+
+			<input type="hidden" name="template_success" value="index" />
+			</form>							
+
+
+		</td>
+	</tr>
+</table>
+

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/common/forgotpass_confirm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/common/subscribe_ok.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/common/subscribe_ok.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/common/subscribe_ok.tpl	(revision 12131)
@@ -0,0 +1,22 @@
+<table border="0" cellspacing="0" cellpadding="0" class="block-no-border">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_subscribe_title" /></td>
+	</tr>
+	<tr> 
+  		<td class="block-data">
+
+  			<br />
+			<br />
+			<strong><inp2:m_Phrase label="lu_subscribe_confirm" /></strong>
+			<br />
+			<br />
+			
+			 <inp2:m_Phrase label="lu_ThankForSubscribing"/>!
+			<br />
+			<br />
+			
+			<input class="button" type="button" value="<inp2:m_Phrase label="lu_comm_Ok"/>" onClick="window.location.href='<inp2:m_Link template="index"/>'" />&nbsp;
+			
+		</td>			
+	</tr>
+</table>

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/common/subscribe_ok.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/common/mailing_list.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/common/mailing_list.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/common/mailing_list.tpl	(revision 12131)
@@ -0,0 +1,24 @@
+<table class="block">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_MailingList"/></td>
+	</tr>
+	<tr>
+		<td class="block-data-big"> 
+			<form method="POST" action="<inp2:m_FormAction />" name="mailing_list_form">
+				<inp2:m_Phrase label="lu_EnterEmailToSubscribe"/><br />
+				<input type="text" name="subscriber_email" />
+				<br /><img src="img/s.gif" alt="" width="5" height="10" border="0" /><br />
+				<inp2:m_if check="u_HasError" field="any">
+					<span class="error"><inp2:u_Error field="SubscribeEmail"/></span><br />
+				</inp2:m_if>
+				<input class="button" name="events[u][OnSubscribeQuery]" type="submit" value="<inp2:m_Phrase label="lu_comm_Subscribe"/>" /> 
+				<input class="button" name="events[u][OnSubscribeQuery]" type="submit" value="<inp2:m_Phrase label="lu_comm_Unsubscribe" />" />
+				&nbsp;
+				<input type="text" style="display: none" />
+				<input type="hidden" name="subscribe_template" value="platform/my_account/subscribe"/>
+				<input type="hidden" name="unsubscribe_template" value="platform/my_account/unsubscribe"/>
+
+			</form>
+		</td>
+	</tr>
+</table>

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/common/mailing_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/common/unsubscribe_ok.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/common/unsubscribe_ok.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/common/unsubscribe_ok.tpl	(revision 12131)
@@ -0,0 +1,22 @@
+<table border="0" cellspacing="0" cellpadding="0" class="block-no-border">
+	<tr>
+		<td class="block-header"><inp2:m_Phrase label="lu_unsubscribe_title" /></td>
+	</tr>
+	<tr> 
+  		<td class="block-data">
+
+  			<br />
+			<br />
+			<strong><inp2:m_Phrase label="lu_unsubscribe_confirm" /></strong>
+			<br />
+			<br />
+			<inp2:m_Phrase label="lu_TextUnsubscribe"/>
+			
+			<br />
+			<br />
+			
+			<input class="button" type="button" value="<inp2:m_Phrase label="lu_comm_Ok"/>" onClick="window.location.href='<inp2:m_Link template="index"/>'" />&nbsp;
+			
+		</td>			
+	</tr>
+</table>

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/common/unsubscribe_ok.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/login/form_register.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/login/form_register.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/login/form_register.tpl	(revision 12131)
@@ -0,0 +1,335 @@
+<inp2:m_DefineElement name="destination">
+	<option value="<inp2:m_param name="key"/>"<inp2:m_param name="selected"/>><inp2:m_param name="option"/></option>
+</inp2:m_DefineElement>
+
+<inp2:m_if check="u_RegistrationEnabled">
+	<form method="post" action="<inp2:m_FormAction />" id="registration_form">
+
+	<table class="block-no-border">
+		<tr>
+			<td class="block-header">
+				<inp2:m_Phrase label="lu_NewCustomers"/>
+			</td>
+		</tr>
+		<tr>
+			<td class="block-data">
+					<inp2:m_Phrase label="lu_PleaseRegister"/><br/>
+					<br/>
+					<inp2:m_if check="u_HasError" field="any" except="ValidateLogin">
+						<table class="warning">
+							<tr>
+								<td valign="top" align="left" class="block-data">
+									<img src="img/message.gif" alt="" width="19" height="19" />
+									<span class="warning-text"><inp2:m_Phrase label="lu_Warning"/></span><br />
+									<inp2:m_Phrase label="lu_AProblemInForm"/>
+
+								</td>
+							</tr>
+						</table>
+					</inp2:m_if>
+
+					<strong>* <inp2:m_Phrase label="lu_IndicatesRequired"/>.</strong> <br /><br />
+					<table class="form-data">
+						<inp2:m_if check="u_UseUsernames">
+						<tr>
+							<td>
+								<strong><inp2:m_phrase label="lu_username"/>*:</strong>
+							</td>
+							<td>
+								<input type="text" name="<inp2:u_InputName field="Login"/>" value="<inp2:u_Field name="Login"/>" style="width: 300px;" />
+							</td>
+							<td width="170" class="error"><inp2:u_Error field="Login"/></td>
+						</tr>
+						</inp2:m_if>
+						<tr>
+							<td>
+								<strong><inp2:m_phrase label="lu_email"/>*:</strong>
+							</td>
+							<td>
+								<input type="text" name="<inp2:u_InputName field="Email"/>" value="<inp2:u_Field name="Email"/>" style="width: 300px;" />
+							</td>
+							<td width="170" class="error"><inp2:u_Error field="Email"/></td>
+						</tr>
+
+						<inp2:m_if check="m_ConfigEquals" name="User_Password_Auto" value="0">
+							<tr>
+								<td>
+									<strong><inp2:m_phrase label="lu_password"/>*:</strong>
+								</td>
+								<td>
+									<input type="password" name="<inp2:u_InputName field="Password"/>" value="" style="width: 300px;" />
+								</td>
+								<td class="error"><inp2:u_Error field="Password"/></td>
+							</tr>
+							<tr>
+								<td>
+									<strong><inp2:m_phrase label="lu_repeat_password"/>*:</strong>
+								</td>
+								<td>
+									<input type="password" name="<inp2:u_InputName field="VerifyPassword"/>" value="" style="width: 300px;" />
+								</td>
+								<td class="error"><inp2:u_Error field="VerifyPassword"/></td>
+							</tr>
+						</inp2:m_if>
+
+						<tr>
+							<td class="block-data">
+								<strong><inp2:m_phrase label="lu_birth_date"/>*:</strong><br>
+							</td>
+							<td class="block-data" style="white-space: nowrap">
+								<script src="inc/calendar.js"></script>
+								<input type="text" name="<inp2:u_InputName field="dob_date"/>" id="<inp2:u_InputName field="dob_date"/>" value="<inp2:u_Field name="dob_date" format="_regional_InputDateFormat"/>" style="width: 100px;" datepickerIcon="img/calendar.gif"/>
+								<script type="text/javascript">
+									initCalendar('<inp2:u_InputName field="dob_date"/>', "<inp2:u_Format input_format="1" field="dob_date"/>");
+								</script>
+								(<inp2:u_Format field="dob_date" input_format="1" human="true"/>, ex. <inp2:u_Format field="dob_date" sample="true"/>)
+								<input type="hidden" name="<inp2:u_InputName field="dob_time"/>" value="" />
+							</td>
+							<td width="170" class="error"><inp2:u_Error field="dob_date"/></td>
+						</tr>
+
+						<tr>
+							<td>
+								<strong><inp2:m_phrase label="lu_first_name"/>:</strong>
+							</td>
+							<td>
+								<input type="text" name="<inp2:u_InputName field="FirstName"/>" value="<inp2:u_Field name="FirstName"/>" style="width: 300px;" />
+							</td>
+							<td width="170" class="error"><inp2:u_Error field="FirstName"/></td>
+						</tr>
+
+						<tr>
+							<td>
+								<strong><inp2:m_phrase label="lu_last_name"/>:</strong>
+							</td>
+							<td>
+								<input type="text" name="<inp2:u_InputName field="LastName"/>" value="<inp2:u_Field name="LastName"/>" style="width: 300px;" />
+							</td>
+							<td width="170" class="error"><inp2:u_Error field="LastName"/></td>
+						</tr>
+
+						<tr>
+							<td>
+								<strong><inp2:m_phrase label="lu_company"/>:</strong>
+							</td>
+							<td>
+								<input type="text" name="<inp2:u_InputName field="Company"/>" value="<inp2:u_Field name="Company"/>" style="width: 300px;" />
+							</td>
+							<td width="170" class="error"><inp2:u_Error field="Company"/></td>
+						</tr>
+
+						<tr>
+							<td>
+								<strong><inp2:m_phrase label="lu_address_line"/> 1:</strong>
+							</td>
+							<td>
+								<input type="text" name="<inp2:u_InputName field="Street"/>" value="<inp2:u_Field name="Street"/>" style="width: 300px;" />
+							</td>
+							<td class="error"><inp2:u_Error field="Street"/></td>
+						</tr>
+
+						<tr>
+							<td>
+								<strong><inp2:m_phrase label="lu_address_line"/> 2:</strong>
+							</td>
+							<td>
+								<input type="text" name="<inp2:u_InputName field="Street2"/>" value="<inp2:u_Field name="Street2"/>" style="width: 300px;" />
+							</td>
+							<td class="error"><inp2:u_Error field="Street2"/></td>
+						</tr>
+
+						<tr>
+							<td>
+								<strong><inp2:m_phrase label="lu_city"/>:</strong>
+							</td>
+							<td>
+								<input type="text" name="<inp2:u_InputName field="City"/>" value="<inp2:u_Field name="City"/>" style="width: 200px;" />
+							</td>
+							<td class="error"><inp2:u_Error field="City"/></td>
+						</tr>
+						<tr>
+							<td>
+								<strong><inp2:m_phrase label="lu_state"/>:</strong>
+							</td>
+							<td>
+								<input type="text" name="<inp2:u_InputName field="State"/>" value="<inp2:u_Field name="State"/>" style="width: 200px;" />
+							</td>
+							<td class="error"><inp2:u_Error field="State"/></td>
+						</tr>
+						<tr>
+							<td>
+								<strong><inp2:m_phrase label="lu_zip_code"/>:</strong>
+							</td>
+							<td>
+								<input type="text" name="<inp2:u_InputName field="Zip"/>" value="<inp2:u_Field name="Zip"/>" style="width: 100px;" />
+							</td>
+							<td class="error"><inp2:u_Error field="Zip"/></td>
+						</tr>
+						<tr>
+							<td>
+								<strong><inp2:m_phrase label="lu_country"/>:</strong>
+							</td>
+							<td>
+								<select name="<inp2:u_InputName field="Country"/>" style="width: 300px;">
+										<option value=""></option>
+										<inp2:u_PredefinedOptions field="Country" render_as="destination" selected_param="selected" selected="selected=\"selected\""/>
+								</select>
+							</td>
+							<td class="error"><inp2:u_Error field="Country"/></td>
+						</tr>
+
+						<tr>
+							<td>
+								<strong><inp2:m_phrase label="lu_phone"/>:</strong>
+							</td>
+							<td>
+								<input type="text" name="<inp2:u_InputName field="Phone"/>" value="<inp2:u_Field name="Phone"/>" style="width: 150px;" />
+							</td>
+							<td class="error"><inp2:u_Error field="Phone"/></td>
+						</tr>
+
+						<tr>
+							<td>
+								<strong><inp2:m_phrase label="lu_fax"/>:</strong>
+							</td>
+							<td>
+								<input type="text" name="<inp2:u_InputName field="Fax"/>" value="<inp2:u_Field name="Fax"/>" style="width: 150px;" />
+							</td>
+							<td class="error"><inp2:u_Error field="Fax"/></td>
+						</tr>
+
+						<inp2:m_if check="m_AllowAffiliateRegistration">
+							<tr>
+								<td>
+									<strong><inp2:m_phrase label="lu_comm_RegisterAsAffiliate"/>:</strong>
+								</td>
+								<td>
+									<input type="checkbox" name="RegisterAsAffiliate" id="RegisterAsAffiliate" onchange="toggle_affiliate()" <inp2:m_if check="m_GetEquals" name="RegisterAsAffiliate" value="on">checked</inp2:m_if>/>
+								</td>
+								<td class="error">&nbsp;</td>
+							</tr>
+						</inp2:m_if>
+						<inp2:m_if check="m_GetEquals" name="RegisterAsAffiliate" value="on">
+
+							<tr>
+								<td>
+									<strong><inp2:m_phrase label="lu_comm_SSNField"/>*:</strong>
+								</td>
+								<td>
+									<input type="text" name="SSN" id="SSN" value="<inp2:m_get var="SSN" />" />
+								</td>
+								<td class="error">
+									<inp2:m_if check="m_getequals" var="SSNRequiredError" value="1">
+										<inp2:m_Phrase label="lu_comm_FieldIsRequired" />
+									</inp2:m_if>&nbsp;
+								</td>
+							</tr>
+
+							<inp2:m_DefineElement name="affiliate_payment_type_elem">
+								<tr>
+									<td>
+										<input type="radio" name="PaymentTypeId" id="PaymentTypeId_<inp2:Field name="PaymentTypeId" />" value="<inp2:Field name="PaymentTypeId" />" <inp2:m_if check="u_AffiliatePaymentTypeChecked">checked</inp2:m_if> />
+									</td>
+									<td>
+										<label for="PaymentTypeId_<inp2:Field name="PaymentTypeId" />"><inp2:Field name="Name" /></label>
+									</td>
+								</tr>
+								<inp2:m_if check="Field" name="Description">
+									<tr>
+										<td>&nbsp;</td>
+										<td><inp2:Field name="Description" />&nbsp;</td>
+									</tr>
+								</inp2:m_if>
+							</inp2:m_DefineElement>
+
+							<tr>
+								<td style="vertical-align: top;">
+									<strong><inp2:m_phrase label="lu_comm_ChooseAffiliatePaymentType"/>:</strong>
+								</td>
+								<td colspan="2">
+									<table class="block-no-border">
+										<inp2:u_ListAffiliatesPaymentTypes render_as="affiliate_payment_type_elem" />
+										<tr><td colspan="2">&nbsp;</td></tr>
+									</table>
+								</td>
+							</tr>
+
+							<tr>
+								<td>
+									<strong><inp2:m_phrase label="lu_comm_Comments"/>:</strong>
+								</td>
+								<td>
+									<textarea name="Comments" id="Comments" cols="35" rows="5"><inp2:m_get var="Comments" /></textarea>
+								</td>
+								<td class="error">&nbsp;</td>
+							</tr>
+
+							<tr>
+								<td colspan="2">
+									<input type="checkbox" name="AgreeToAffiliateTerms" id="AgreeToAffiliateTerms" />
+									<strong><inp2:m_Phrase label="lu_comm_IAgreeTo" />
+									<a href="javascript:showAffiliateAgreement()"><inp2:m_Phrase label="lu_comm_AffiliateAgreement" /></a>
+									<inp2:m_Phrase label="lu_comm_TermsAndConditions" /></strong>
+									<script type="text/javascript">
+										function showAffiliateAgreement()
+										{
+											window.open('<inp2:m_Link template="in-commerce/my_account/affiliate_agreement" />', null, 'menubar=no,toolbars=no,width=500,height=300');
+										}
+									</script>
+								</td>
+								<td class="error">
+									<inp2:m_if check="m_getequals" var="MustAgreeToTerms" value="1">
+										<inp2:m_Phrase label="lu_comm_MustAgreeAffiliateTermsError"/>
+									</inp2:m_if>&nbsp;
+								</td>
+							</tr>
+						</inp2:m_if>
+
+						<inp2:m_if check="m_ConfigEquals" option="RegistrationCaptcha" value="1">
+							<tr>
+								<td>
+									<strong><inp2:m_phrase label="lu_captcha"/>:</strong>
+								</td>
+								<td>
+									<img src="<inp2:m_t pass="m" template="inc/captcha_image" var="u_captcha_code" w="150" h="30"/>" /><br/>
+								</td>
+								<td width="170" class="error">&nbsp;</td>
+							</tr>
+
+							<tr>
+								<td>
+									&nbsp;
+								</td>
+								<td>
+									<inp2:m_phrase label="lu_captcha_prompt"/><br/>
+									<input type="text" name="<inp2:u_InputName field="Captcha"/>" value="" style="width: 80px;" />
+								</td>
+								<td width="170" class="error"><inp2:u_Error field="Captcha"/></td>
+							</tr>
+						</inp2:m_if>
+
+						<tr>
+							<td colspan="3" valign="bottom" height="35">
+								<input type="hidden" name="shop_cart_template" value="in-commerce/checkout/shop_cart" />
+								<input type="hidden" name="next_template" value="<inp2:m_get var="next_template"/>" />
+								<input type="hidden" name="registration_confirm_template" value="platform/login/register_confirm" />
+								<input type="hidden" name="registration_confirm_pending_template" value="platform/login/register_confirm_pending" />
+
+								<input class="button" type="submit" id="events[u][OnCreate]" name="events[u][OnCreate]" value="<inp2:m_phrase label="lu_Register"/>" />
+								<input class="hidden" type="submit" id="events[u][OnRefreshForm]" name="events[u][OnRefreshForm]" />
+							</td>
+						</tr>
+					</table>
+			</td>
+		</tr>
+	</table>
+
+	</form>
+
+	<script type="text/javascript">
+		function toggle_affiliate()
+		{
+			document.getElementById('events[u][OnRefreshForm]').click();
+		}
+	</script>
+</inp2:m_if>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/login/form_register.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.19.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/login/register_confirm.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/login/register_confirm.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/login/register_confirm.tpl	(revision 12131)
@@ -0,0 +1,16 @@
+
+
+<table class="block-no-border">
+	<tr>
+		<td class="block-header">
+			<inp2:m_Phrase label="lu_RegisterConfirm"/>
+		</td>
+	</tr>
+	<tr>
+		<td class="block-data">
+			<inp2:m_Phrase label="lu_RegistrationCompleted"/>
+				
+		</td>
+	</tr>
+</table>
+

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/login/register_confirm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/login/register_confirm_pending.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/login/register_confirm_pending.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/login/register_confirm_pending.tpl	(revision 12131)
@@ -0,0 +1,17 @@
+
+
+<table class="block-no-border">
+	<tr>
+		<td class="block-header">
+			<inp2:m_Phrase label="lu_RegisterConfirmPending"/>
+			
+		</td>
+	</tr>
+	<tr>
+		<td class="block-data">
+			<inp2:m_Phrase label="lu_user_pending_aproval_text"/>	
+				
+		</td>
+	</tr>
+</table>
+

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/login/register_confirm_pending.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/login/no_permission_warning.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/login/no_permission_warning.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/login/no_permission_warning.tpl	(revision 12131)
@@ -0,0 +1,22 @@
+<table class="block-no-border">
+	<tr>
+		<td class="block-header">
+			<inp2:m_Phrase label="lu_comm_NoPermissions"/>
+		</td>
+	</tr>
+	<tr>
+		<td class="block-data">
+
+			<table class="warning">
+				<tr>
+					<td valign="top" align="left" class="block-data">
+						<img src="img/message.gif" alt="" width="19" height="19" />
+						<span class="warning-text"><inp2:m_Phrase label="lu_Warning"/></span><br />
+						<inp2:m_Phrase label="lu_NoAccess"/>			
+					</td>
+				</tr>
+			</table>
+			
+		</td>
+	</tr>
+</table>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/login/no_permission_warning.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/login/login_pending_disabled.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/login/login_pending_disabled.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/login/login_pending_disabled.tpl	(revision 12131)
@@ -0,0 +1,18 @@
+
+
+<table class="block-no-border">
+	<tr>
+		<td class="block-header">
+			<inp2:m_Phrase label="lu_title_DisabledAccountWarning"/>
+
+		</td>
+	</tr>
+	<tr>
+		<td class="block-data">
+		
+			<inp2:m_Phrase label="lu_text_DisabledAccountWarning"/>: <a href="mailto:<inp2:u_SiteAdminEmail/>"><inp2:u_SiteAdminEmail/></a>
+				
+		</td>
+	</tr>
+</table>
+

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/login/login_pending_disabled.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/blocks/login/register_disabled.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/blocks/login/register_disabled.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/blocks/login/register_disabled.tpl	(revision 12131)
@@ -0,0 +1,17 @@
+
+
+<table class="block-no-border">
+	<tr>
+		<td class="block-header">
+			<inp2:m_Phrase label="lu_title_RegistrationDisabled"/>
+			
+		</td>
+	</tr>
+	<tr>
+		<td class="block-data">
+			<inp2:m_Phrase label="lu_title_RegistrationCompleted"/>	
+			
+		</td>
+	</tr>
+</table>
+

Property changes on: branches/5.1.x/themes/onlinestore/platform/blocks/login/register_disabled.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/login/register_confirm.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/login/register_confirm.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/login/register_confirm.tpl	(revision 12131)
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_RegisterConfirm "/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+  <tr>
+    <td class="main-column-center">
+    	<form method="post" action="<inp2:m_FormAction />" >
+
+    		<inp2:m_include template="platform/blocks/login/register_confirm"/>
+
+		</form>
+	</td>
+    <td class="main-column-right">
+
+
+
+
+		</td>
+  </tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>

Property changes on: branches/5.1.x/themes/onlinestore/platform/login/register_confirm.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/login/login_pending_disabled.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/login/login_pending_disabled.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/login/login_pending_disabled.tpl	(revision 12131)
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_title_DisabledAccountWarning"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+  <tr>
+    <td class="main-column-center">
+    	<form method="post" action="<inp2:m_FormAction />">
+
+    		<inp2:m_include template="platform/blocks/login/login_pending_disabled"/>
+
+		</form>
+	</td>
+    <td class="main-column-right">
+
+
+	</td>
+  </tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>

Property changes on: branches/5.1.x/themes/onlinestore/platform/login/login_pending_disabled.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/login/register_confirm_pending.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/login/register_confirm_pending.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/login/register_confirm_pending.tpl	(revision 12131)
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_RegisterConfirmPending"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+  <tr>
+    <td class="main-column-center">
+    	<form method="post" action="<inp2:m_FormAction />">
+
+    		<inp2:m_include template="platform/blocks/login/register_confirm_pending"/>
+
+		</form>
+	</td>
+    <td class="main-column-right">
+
+
+
+
+		</td>
+  </tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>

Property changes on: branches/5.1.x/themes/onlinestore/platform/login/register_confirm_pending.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/login/register_disabled.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/login/register_disabled.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/login/register_disabled.tpl	(revision 12131)
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="LU_TITLE_REGISTRATIONDISABLED"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+  <tr>
+    <td class="main-column-center">
+    	<form method="post" action="<inp2:m_FormAction />">
+
+    		<inp2:m_include template="platform/blocks/login/register_disabled"/>
+
+		</form>
+	</td>
+    <td class="main-column-right">
+
+
+
+
+		</td>
+  </tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>

Property changes on: branches/5.1.x/themes/onlinestore/platform/login/register_disabled.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/login/register.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/login/register.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/login/register.tpl	(revision 12131)
@@ -0,0 +1,35 @@
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" />
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_PleaseRegister"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+  <tr>
+    <td class="main-column-center">
+
+   		<inp2:m_include template="platform/blocks/login/form_register"/>
+
+	</td>
+    <td class="main-column-right">
+
+    	&nbsp;
+
+	</td>
+  </tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>

Property changes on: branches/5.1.x/themes/onlinestore/platform/login/register.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/login/login_register.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/login/login_register.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/login/login_register.tpl	(revision 12131)
@@ -0,0 +1,36 @@
+<inp2:m_CheckSSL mode="required" condition="Require_SSL" />
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_PleaseLogin"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+  <tr>
+    <td class="main-column-center" valign="top">
+
+		<inp2:m_include template="platform/blocks/common/login_existing" />
+
+    <inp2:m_include template="platform/blocks/login/form_register"/>
+
+    </td>
+    <td class="main-column-right" valign="top">
+
+
+
+    </td>
+  </tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/platform/login/login_register.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/login/forgotpass_reset_ok.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/login/forgotpass_reset_ok.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/login/forgotpass_reset_ok.tpl	(revision 12131)
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_ForgotPassword"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body> 
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table"> 
+  <tr> 
+    <td class="main-column-center" valign="top"> 
+    	
+    	<inp2:m_include template="platform/blocks/common/forgotpass_reset_ok" />	
+    
+    </td> 
+    <td class="main-column-right" valign="top"> 
+    	
+    	<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator.tpl" data_exists="1"/>
+    	
+    	<inp2:m_include template="in-commerce/blocks/products/products_recent.tpl" data_exists="1"/>
+      
+    </td> 
+  </tr> 
+</table> 
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>

Property changes on: branches/5.1.x/themes/onlinestore/platform/login/forgotpass_reset_ok.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/login/forgotpass.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/login/forgotpass.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/login/forgotpass.tpl	(revision 12131)
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_ForgotPassword"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body> 
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table"> 
+  <tr> 
+    <td class="main-column-center" valign="top"> 
+    	
+    	<inp2:m_include template="platform/blocks/common/forgotpass_form" />	
+    
+    </td> 
+    <td class="main-column-right" valign="top"> 
+    	
+    	<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator.tpl" data_exists="1"/>
+    	
+    	<inp2:m_include template="in-commerce/blocks/products/products_recent.tpl" data_exists="1"/>
+      
+    </td> 
+  </tr> 
+</table> 
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>

Property changes on: branches/5.1.x/themes/onlinestore/platform/login/forgotpass.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/login/forgotpass_reset.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/login/forgotpass_reset.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/login/forgotpass_reset.tpl	(revision 12131)
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_ForgotPassword"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body> 
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table"> 
+  <tr> 
+    <td class="main-column-center" valign="top"> 
+    	
+    	<inp2:m_include template="platform/blocks/common/forgotpass_reset" />	
+    
+    </td> 
+    <td class="main-column-right" valign="top"> 
+    	
+    	<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator.tpl" data_exists="1"/>
+    	
+    	<inp2:m_include template="in-commerce/blocks/products/products_recent.tpl" data_exists="1"/>
+      
+    </td> 
+  </tr> 
+</table> 
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>

Property changes on: branches/5.1.x/themes/onlinestore/platform/login/forgotpass_reset.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/my_account/recommend.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/my_account/recommend.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/my_account/recommend.tpl	(revision 12131)
@@ -0,0 +1,48 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_recommend_title"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body> 
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table"> 
+	<tr> 
+		<td class="main-column-left" valign="top">
+		
+			<inp2:m_include template="in-commerce/blocks/categories/categories_home" data_exists="1"/>
+			
+			<inp2:m_include template="platform/blocks/common/adv_search" />
+			
+			<inp2:m_include template="platform/blocks/common/credit_cards" />
+	  
+		</td>
+		<td class="main-column-center" valign="top">
+			
+			<inp2:m_include template="platform/blocks/common/recommend_send" />
+	
+		</td>
+		<td class="main-column-right" valign="top">
+			
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" />
+	
+			<inp2:m_include template="platform/blocks/common/login" />
+	
+			<inp2:m_include template="in-commerce/blocks/products/products_top_sellers" data_exists="1"/>
+	
+			<inp2:m_include template="platform/blocks/common/mailing_list"/>
+		  
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/platform/my_account/recommend.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/my_account/subscribe.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/my_account/subscribe.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/my_account/subscribe.tpl	(revision 12131)
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_subscribe_title"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center" valign="top">
+
+			<inp2:m_include template="platform/blocks/common/subscribe_confirmation" />
+		
+		</td>
+		<td class="main-column-right" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" />
+
+			<inp2:m_include template="platform/blocks/common/login" />
+
+			<inp2:m_include template="in-commerce/blocks/products/products_top_sellers" data_exists="1"/>
+
+			<inp2:m_include template="platform/blocks/common/recommend_site"/>
+	
+		</td> 
+	</tr> 
+</table> 
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/platform/my_account/subscribe.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/my_account/unsubscribe.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/my_account/unsubscribe.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/my_account/unsubscribe.tpl	(revision 12131)
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_unsubscribe_title"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr> 
+		<td class="main-column-center" valign="top">
+			
+			<inp2:m_include template="platform/blocks/common/unsubscribe_confirmation" />	
+		
+		</td>
+		<td class="main-column-right" valign="top">
+			
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" />
+		
+			<inp2:m_include template="platform/blocks/common/login" />	
+			
+			<inp2:m_include template="in-commerce/blocks/products/products_top_sellers" data_exists="1"/>	
+		  
+			<inp2:m_include template="platform/blocks/common/recommend_site"/>
+
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/platform/my_account/unsubscribe.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/my_account/subscribe_ok.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/my_account/subscribe_ok.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/my_account/subscribe_ok.tpl	(revision 12131)
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_subscribe_title"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center" valign="top">
+			
+			<inp2:m_include template="platform/blocks/common/subscribe_ok" />
+		
+		</td>
+		<td class="main-column-right" valign="top">
+			
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" />
+		
+			<inp2:m_include template="platform/blocks/common/login" />
+			
+			<inp2:m_include template="in-commerce/blocks/products/products_top_sellers" data_exists="1"/>
+		  
+			<inp2:m_include template="platform/blocks/common/recommend_site"/>
+	
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/platform/my_account/subscribe_ok.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/platform/my_account/unsubscribe_ok.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/platform/my_account/unsubscribe_ok.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/platform/my_account/unsubscribe_ok.tpl	(revision 12131)
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_unsubscribe_title"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table"> 
+	<tr> 
+		<td class="main-column-center" valign="top"> 
+			
+			<inp2:m_include template="platform/blocks/common/unsubscribe_ok" />	
+		
+		</td> 
+		<td class="main-column-right" valign="top"> 
+			
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" />
+		
+			<inp2:m_include template="platform/blocks/common/login" />	
+			
+			<inp2:m_include template="in-commerce/blocks/products/products_top_sellers" data_exists="1"/>	
+		  
+			<inp2:m_include template="platform/blocks/common/recommend_site"/>
+	
+		</td> 
+	</tr> 
+</table> 
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>

Property changes on: branches/5.1.x/themes/onlinestore/platform/my_account/unsubscribe_ok.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/img/lbox/prev.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/img/lbox/prev.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/img/lbox/prevlabel.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/img/lbox/prevlabel.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/img/lbox/loading.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/img/lbox/loading.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/img/lbox/next.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/img/lbox/next.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/img/lbox/nextlabel.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/img/lbox/nextlabel.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/img/lbox/close.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/img/lbox/close.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/img/lbox/closelabel.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/img/lbox/closelabel.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/img/lbox/more_images.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/img/lbox/more_images.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/img/prevlabel.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/img/prevlabel.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/img/prev.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/img/prev.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/img/loading.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/img/loading.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/img/nextlabel.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/img/nextlabel.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/img/next.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/img/next.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/img/closelabel.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/img/closelabel.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/img/close.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/img/close.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/img/zoom.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/img/zoom.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/img/more_images.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/img/more_images.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/img/logo.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/img/logo.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/img/vcss.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/img/vcss.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/img/adv_search.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/img/adv_search.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/img/zoom_picture.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/img/zoom_picture.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/img/s.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/img/s.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/img/message.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/img/message.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/img/star_rate.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/img/star_rate.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/img/calendar.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/img/calendar.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/img/star.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/img/star.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/img/valid-xhtml10.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/themes/onlinestore/img/valid-xhtml10.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/inc/lbox/prototype.js
===================================================================
--- branches/5.1.x/themes/onlinestore/inc/lbox/prototype.js	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/inc/lbox/prototype.js	(revision 12131)
@@ -0,0 +1,1785 @@
+/*  Prototype JavaScript framework, version 1.4.0
+ *  (c) 2005 Sam Stephenson <sam@conio.net>
+ *
+ *  THIS FILE IS AUTOMATICALLY GENERATED. When sending patches, please diff
+ *  against the source tree, available from the Prototype darcs repository.
+ *
+ *  Prototype is freely distributable under the terms of an MIT-style license.
+ *
+ *  For details, see the Prototype web site: http://prototype.conio.net/
+ *
+/*--------------------------------------------------------------------------*/
+
+var Prototype = {
+  Version: '1.4.0',
+  ScriptFragment: '(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)',
+
+  emptyFunction: function() {},
+  K: function(x) {return x}
+}
+
+var Class = {
+  create: function() {
+    return function() {
+      this.initialize.apply(this, arguments);
+    }
+  }
+}
+
+var Abstract = new Object();
+
+Object.extend = function(destination, source) {
+  for (property in source) {
+    destination[property] = source[property];
+  }
+  return destination;
+}
+
+Object.inspect = function(object) {
+  try {
+    if (object == undefined) return 'undefined';
+    if (object == null) return 'null';
+    return object.inspect ? object.inspect() : object.toString();
+  } catch (e) {
+    if (e instanceof RangeError) return '...';
+    throw e;
+  }
+}
+
+Function.prototype.bind = function() {
+  var __method = this, args = $A(arguments), object = args.shift();
+  return function() {
+    return __method.apply(object, args.concat($A(arguments)));
+  }
+}
+
+Function.prototype.bindAsEventListener = function(object) {
+  var __method = this;
+  return function(event) {
+    return __method.call(object, event || window.event);
+  }
+}
+
+Object.extend(Number.prototype, {
+  toColorPart: function() {
+    var digits = this.toString(16);
+    if (this < 16) return '0' + digits;
+    return digits;
+  },
+
+  succ: function() {
+    return this + 1;
+  },
+
+  times: function(iterator) {
+    $R(0, this, true).each(iterator);
+    return this;
+  }
+});
+
+var Try = {
+  these: function() {
+    var returnValue;
+
+    for (var i = 0; i < arguments.length; i++) {
+      var lambda = arguments[i];
+      try {
+        returnValue = lambda();
+        break;
+      } catch (e) {}
+    }
+
+    return returnValue;
+  }
+}
+
+/*--------------------------------------------------------------------------*/
+
+var PeriodicalExecuter = Class.create();
+PeriodicalExecuter.prototype = {
+  initialize: function(callback, frequency) {
+    this.callback = callback;
+    this.frequency = frequency;
+    this.currentlyExecuting = false;
+
+    this.registerCallback();
+  },
+
+  registerCallback: function() {
+    setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
+  },
+
+  onTimerEvent: function() {
+    if (!this.currentlyExecuting) {
+      try {
+        this.currentlyExecuting = true;
+        this.callback();
+      } finally {
+        this.currentlyExecuting = false;
+      }
+    }
+  }
+}
+
+/*--------------------------------------------------------------------------*/
+
+function $() {
+  var elements = new Array();
+
+  for (var i = 0; i < arguments.length; i++) {
+    var element = arguments[i];
+    if (typeof element == 'string')
+      element = document.getElementById(element);
+
+    if (arguments.length == 1)
+      return element;
+
+    elements.push(element);
+  }
+
+  return elements;
+}
+Object.extend(String.prototype, {
+  stripTags: function() {
+    return this.replace(/<\/?[^>]+>/gi, '');
+  },
+
+  stripScripts: function() {
+    return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
+  },
+
+  extractScripts: function() {
+    var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
+    var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
+    return (this.match(matchAll) || []).map(function(scriptTag) {
+      return (scriptTag.match(matchOne) || ['', ''])[1];
+    });
+  },
+
+  evalScripts: function() {
+    return this.extractScripts().map(eval);
+  },
+
+  escapeHTML: function() {
+    var div = document.createElement('div');
+    var text = document.createTextNode(this);
+    div.appendChild(text);
+    return div.innerHTML;
+  },
+
+  unescapeHTML: function() {
+    var div = document.createElement('div');
+    div.innerHTML = this.stripTags();
+    return div.childNodes[0] ? div.childNodes[0].nodeValue : '';
+  },
+
+  toQueryParams: function() {
+    var pairs = this.match(/^\??(.*)$/)[1].split('&');
+    return pairs.inject({}, function(params, pairString) {
+      var pair = pairString.split('=');
+      params[pair[0]] = pair[1];
+      return params;
+    });
+  },
+
+  toArray: function() {
+    return this.split('');
+  },
+
+  camelize: function() {
+    var oStringList = this.split('-');
+    if (oStringList.length == 1) return oStringList[0];
+
+    var camelizedString = this.indexOf('-') == 0
+      ? oStringList[0].charAt(0).toUpperCase() + oStringList[0].substring(1)
+      : oStringList[0];
+
+    for (var i = 1, len = oStringList.length; i < len; i++) {
+      var s = oStringList[i];
+      camelizedString += s.charAt(0).toUpperCase() + s.substring(1);
+    }
+
+    return camelizedString;
+  },
+
+  inspect: function() {
+    return "'" + this.replace('\\', '\\\\').replace("'", '\\\'') + "'";
+  }
+});
+
+String.prototype.parseQuery = String.prototype.toQueryParams;
+
+var $break    = new Object();
+var $continue = new Object();
+
+var Enumerable = {
+  each: function(iterator) {
+    var index = 0;
+    try {
+      this._each(function(value) {
+        try {
+          iterator(value, index++);
+        } catch (e) {
+          if (e != $continue) throw e;
+        }
+      });
+    } catch (e) {
+      if (e != $break) throw e;
+    }
+  },
+
+  all: function(iterator) {
+    var result = true;
+    this.each(function(value, index) {
+      result = result && !!(iterator || Prototype.K)(value, index);
+      if (!result) throw $break;
+    });
+    return result;
+  },
+
+  any: function(iterator) {
+    var result = true;
+    this.each(function(value, index) {
+      if (result = !!(iterator || Prototype.K)(value, index))
+        throw $break;
+    });
+    return result;
+  },
+
+  collect: function(iterator) {
+    var results = [];
+    this.each(function(value, index) {
+      results.push(iterator(value, index));
+    });
+    return results;
+  },
+
+  detect: function (iterator) {
+    var result;
+    this.each(function(value, index) {
+      if (iterator(value, index)) {
+        result = value;
+        throw $break;
+      }
+    });
+    return result;
+  },
+
+  findAll: function(iterator) {
+    var results = [];
+    this.each(function(value, index) {
+      if (iterator(value, index))
+        results.push(value);
+    });
+    return results;
+  },
+
+  grep: function(pattern, iterator) {
+    var results = [];
+    this.each(function(value, index) {
+      var stringValue = value.toString();
+      if (stringValue.match(pattern))
+        results.push((iterator || Prototype.K)(value, index));
+    })
+    return results;
+  },
+
+  include: function(object) {
+    var found = false;
+    this.each(function(value) {
+      if (value == object) {
+        found = true;
+        throw $break;
+      }
+    });
+    return found;
+  },
+
+  inject: function(memo, iterator) {
+    this.each(function(value, index) {
+      memo = iterator(memo, value, index);
+    });
+    return memo;
+  },
+
+  invoke: function(method) {
+    var args = $A(arguments).slice(1);
+    return this.collect(function(value) {
+      return value[method].apply(value, args);
+    });
+  },
+
+  max: function(iterator) {
+    var result;
+    this.each(function(value, index) {
+      value = (iterator || Prototype.K)(value, index);
+      if (value >= (result || value))
+        result = value;
+    });
+    return result;
+  },
+
+  min: function(iterator) {
+    var result;
+    this.each(function(value, index) {
+      value = (iterator || Prototype.K)(value, index);
+      if (value <= (result || value))
+        result = value;
+    });
+    return result;
+  },
+
+  partition: function(iterator) {
+    var trues = [], falses = [];
+    this.each(function(value, index) {
+      ((iterator || Prototype.K)(value, index) ?
+        trues : falses).push(value);
+    });
+    return [trues, falses];
+  },
+
+  pluck: function(property) {
+    var results = [];
+    this.each(function(value, index) {
+      results.push(value[property]);
+    });
+    return results;
+  },
+
+  reject: function(iterator) {
+    var results = [];
+    this.each(function(value, index) {
+      if (!iterator(value, index))
+        results.push(value);
+    });
+    return results;
+  },
+
+  sortBy: function(iterator) {
+    return this.collect(function(value, index) {
+      return {value: value, criteria: iterator(value, index)};
+    }).sort(function(left, right) {
+      var a = left.criteria, b = right.criteria;
+      return a < b ? -1 : a > b ? 1 : 0;
+    }).pluck('value');
+  },
+
+  toArray: function() {
+    return this.collect(Prototype.K);
+  },
+
+  zip: function() {
+    var iterator = Prototype.K, args = $A(arguments);
+    if (typeof args.last() == 'function')
+      iterator = args.pop();
+
+    var collections = [this].concat(args).map($A);
+    return this.map(function(value, index) {
+      iterator(value = collections.pluck(index));
+      return value;
+    });
+  },
+
+  inspect: function() {
+    return '#<Enumerable:' + this.toArray().inspect() + '>';
+  }
+}
+
+Object.extend(Enumerable, {
+  map:     Enumerable.collect,
+  find:    Enumerable.detect,
+  select:  Enumerable.findAll,
+  member:  Enumerable.include,
+  entries: Enumerable.toArray
+});
+var $A = Array.from = function(iterable) {
+  if (!iterable) return [];
+  if (iterable.toArray) {
+    return iterable.toArray();
+  } else {
+    var results = [];
+    for (var i = 0; i < iterable.length; i++)
+      results.push(iterable[i]);
+    return results;
+  }
+}
+
+Object.extend(Array.prototype, Enumerable);
+
+Array.prototype._reverse = Array.prototype.reverse;
+
+Object.extend(Array.prototype, {
+  _each: function(iterator) {
+    for (var i = 0; i < this.length; i++)
+      iterator(this[i]);
+  },
+
+  clear: function() {
+    this.length = 0;
+    return this;
+  },
+
+  first: function() {
+    return this[0];
+  },
+
+  last: function() {
+    return this[this.length - 1];
+  },
+
+  compact: function() {
+    return this.select(function(value) {
+      return value != undefined || value != null;
+    });
+  },
+
+  flatten: function() {
+    return this.inject([], function(array, value) {
+      return array.concat(value.constructor == Array ?
+        value.flatten() : [value]);
+    });
+  },
+
+  without: function() {
+    var values = $A(arguments);
+    return this.select(function(value) {
+      return !values.include(value);
+    });
+  },
+
+  indexOf: function(object) {
+    for (var i = 0; i < this.length; i++)
+      if (this[i] == object) return i;
+    return -1;
+  },
+
+  reverse: function(inline) {
+    return (inline !== false ? this : this.toArray())._reverse();
+  },
+
+  shift: function() {
+    var result = this[0];
+    for (var i = 0; i < this.length - 1; i++)
+      this[i] = this[i + 1];
+    this.length--;
+    return result;
+  },
+
+  inspect: function() {
+    return '[' + this.map(Object.inspect).join(', ') + ']';
+  }
+});
+var Hash = {
+  _each: function(iterator) {
+    for (key in this) {
+      var value = this[key];
+      if (typeof value == 'function') continue;
+
+      var pair = [key, value];
+      pair.key = key;
+      pair.value = value;
+      iterator(pair);
+    }
+  },
+
+  keys: function() {
+    return this.pluck('key');
+  },
+
+  values: function() {
+    return this.pluck('value');
+  },
+
+  merge: function(hash) {
+    return $H(hash).inject($H(this), function(mergedHash, pair) {
+      mergedHash[pair.key] = pair.value;
+      return mergedHash;
+    });
+  },
+
+  toQueryString: function() {
+    return this.map(function(pair) {
+      return pair.map(encodeURIComponent).join('=');
+    }).join('&');
+  },
+
+  inspect: function() {
+    return '#<Hash:{' + this.map(function(pair) {
+      return pair.map(Object.inspect).join(': ');
+    }).join(', ') + '}>';
+  }
+}
+
+function $H(object) {
+  var hash = Object.extend({}, object || {});
+  Object.extend(hash, Enumerable);
+  Object.extend(hash, Hash);
+  return hash;
+}
+ObjectRange = Class.create();
+Object.extend(ObjectRange.prototype, Enumerable);
+Object.extend(ObjectRange.prototype, {
+  initialize: function(start, end, exclusive) {
+    this.start = start;
+    this.end = end;
+    this.exclusive = exclusive;
+  },
+
+  _each: function(iterator) {
+    var value = this.start;
+    do {
+      iterator(value);
+      value = value.succ();
+    } while (this.include(value));
+  },
+
+  include: function(value) {
+    if (value < this.start)
+      return false;
+    if (this.exclusive)
+      return value < this.end;
+    return value <= this.end;
+  }
+});
+
+var $R = function(start, end, exclusive) {
+  return new ObjectRange(start, end, exclusive);
+}
+
+var Ajax = {
+  getTransport: function() {
+    return Try.these(
+      function() {return new ActiveXObject('Msxml2.XMLHTTP')},
+      function() {return new ActiveXObject('Microsoft.XMLHTTP')},
+      function() {return new XMLHttpRequest()}
+    ) || false;
+  },
+
+  activeRequestCount: 0
+}
+
+Ajax.Responders = {
+  responders: [],
+
+  _each: function(iterator) {
+    this.responders._each(iterator);
+  },
+
+  register: function(responderToAdd) {
+    if (!this.include(responderToAdd))
+      this.responders.push(responderToAdd);
+  },
+
+  unregister: function(responderToRemove) {
+    this.responders = this.responders.without(responderToRemove);
+  },
+
+  dispatch: function(callback, request, transport, json) {
+    this.each(function(responder) {
+      if (responder[callback] && typeof responder[callback] == 'function') {
+        try {
+          responder[callback].apply(responder, [request, transport, json]);
+        } catch (e) {}
+      }
+    });
+  }
+};
+
+Object.extend(Ajax.Responders, Enumerable);
+
+Ajax.Responders.register({
+  onCreate: function() {
+    Ajax.activeRequestCount++;
+  },
+
+  onComplete: function() {
+    Ajax.activeRequestCount--;
+  }
+});
+
+Ajax.Base = function() {};
+Ajax.Base.prototype = {
+  setOptions: function(options) {
+    this.options = {
+      method:       'post',
+      asynchronous: true,
+      parameters:   ''
+    }
+    Object.extend(this.options, options || {});
+  },
+
+  responseIsSuccess: function() {
+    return this.transport.status == undefined
+        || this.transport.status == 0
+        || (this.transport.status >= 200 && this.transport.status < 300);
+  },
+
+  responseIsFailure: function() {
+    return !this.responseIsSuccess();
+  }
+}
+
+Ajax.Request = Class.create();
+Ajax.Request.Events =
+  ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
+
+Ajax.Request.prototype = Object.extend(new Ajax.Base(), {
+  initialize: function(url, options) {
+    this.transport = Ajax.getTransport();
+    this.setOptions(options);
+    this.request(url);
+  },
+
+  request: function(url) {
+    var parameters = this.options.parameters || '';
+    if (parameters.length > 0) parameters += '&_=';
+
+    try {
+      this.url = url;
+      if (this.options.method == 'get' && parameters.length > 0)
+        this.url += (this.url.match(/\?/) ? '&' : '?') + parameters;
+
+      Ajax.Responders.dispatch('onCreate', this, this.transport);
+
+      this.transport.open(this.options.method, this.url,
+        this.options.asynchronous);
+
+      if (this.options.asynchronous) {
+        this.transport.onreadystatechange = this.onStateChange.bind(this);
+        setTimeout((function() {this.respondToReadyState(1)}).bind(this), 10);
+      }
+
+      this.setRequestHeaders();
+
+      var body = this.options.postBody ? this.options.postBody : parameters;
+      this.transport.send(this.options.method == 'post' ? body : null);
+
+    } catch (e) {
+      this.dispatchException(e);
+    }
+  },
+
+  setRequestHeaders: function() {
+    var requestHeaders =
+      ['X-Requested-With', 'XMLHttpRequest',
+       'X-Prototype-Version', Prototype.Version];
+
+    if (this.options.method == 'post') {
+      requestHeaders.push('Content-type',
+        'application/x-www-form-urlencoded');
+
+      /* Force "Connection: close" for Mozilla browsers to work around
+       * a bug where XMLHttpReqeuest sends an incorrect Content-length
+       * header. See Mozilla Bugzilla #246651.
+       */
+      if (this.transport.overrideMimeType)
+        requestHeaders.push('Connection', 'close');
+    }
+
+    if (this.options.requestHeaders)
+      requestHeaders.push.apply(requestHeaders, this.options.requestHeaders);
+
+    for (var i = 0; i < requestHeaders.length; i += 2)
+      this.transport.setRequestHeader(requestHeaders[i], requestHeaders[i+1]);
+  },
+
+  onStateChange: function() {
+    var readyState = this.transport.readyState;
+    if (readyState != 1)
+      this.respondToReadyState(this.transport.readyState);
+  },
+
+  header: function(name) {
+    try {
+      return this.transport.getResponseHeader(name);
+    } catch (e) {}
+  },
+
+  evalJSON: function() {
+    try {
+      return eval(this.header('X-JSON'));
+    } catch (e) {}
+  },
+
+  evalResponse: function() {
+    try {
+      return eval(this.transport.responseText);
+    } catch (e) {
+      this.dispatchException(e);
+    }
+  },
+
+  respondToReadyState: function(readyState) {
+    var event = Ajax.Request.Events[readyState];
+    var transport = this.transport, json = this.evalJSON();
+
+    if (event == 'Complete') {
+      try {
+        (this.options['on' + this.transport.status]
+         || this.options['on' + (this.responseIsSuccess() ? 'Success' : 'Failure')]
+         || Prototype.emptyFunction)(transport, json);
+      } catch (e) {
+        this.dispatchException(e);
+      }
+
+      if ((this.header('Content-type') || '').match(/^text\/javascript/i))
+        this.evalResponse();
+    }
+
+    try {
+      (this.options['on' + event] || Prototype.emptyFunction)(transport, json);
+      Ajax.Responders.dispatch('on' + event, this, transport, json);
+    } catch (e) {
+      this.dispatchException(e);
+    }
+
+    /* Avoid memory leak in MSIE: clean up the oncomplete event handler */
+    if (event == 'Complete')
+      this.transport.onreadystatechange = Prototype.emptyFunction;
+  },
+
+  dispatchException: function(exception) {
+    (this.options.onException || Prototype.emptyFunction)(this, exception);
+    Ajax.Responders.dispatch('onException', this, exception);
+  }
+});
+
+Ajax.Updater = Class.create();
+
+Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), {
+  initialize: function(container, url, options) {
+    this.containers = {
+      success: container.success ? $(container.success) : $(container),
+      failure: container.failure ? $(container.failure) :
+        (container.success ? null : $(container))
+    }
+
+    this.transport = Ajax.getTransport();
+    this.setOptions(options);
+
+    var onComplete = this.options.onComplete || Prototype.emptyFunction;
+    this.options.onComplete = (function(transport, object) {
+      this.updateContent();
+      onComplete(transport, object);
+    }).bind(this);
+
+    this.request(url);
+  },
+
+  updateContent: function() {
+    var receiver = this.responseIsSuccess() ?
+      this.containers.success : this.containers.failure;
+    var response = this.transport.responseText;
+
+    if (!this.options.evalScripts)
+      response = response.stripScripts();
+
+    if (receiver) {
+      if (this.options.insertion) {
+        new this.options.insertion(receiver, response);
+      } else {
+        Element.update(receiver, response);
+      }
+    }
+
+    if (this.responseIsSuccess()) {
+      if (this.onComplete)
+        setTimeout(this.onComplete.bind(this), 10);
+    }
+  }
+});
+
+Ajax.PeriodicalUpdater = Class.create();
+Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), {
+  initialize: function(container, url, options) {
+    this.setOptions(options);
+    this.onComplete = this.options.onComplete;
+
+    this.frequency = (this.options.frequency || 2);
+    this.decay = (this.options.decay || 1);
+
+    this.updater = {};
+    this.container = container;
+    this.url = url;
+
+    this.start();
+  },
+
+  start: function() {
+    this.options.onComplete = this.updateComplete.bind(this);
+    this.onTimerEvent();
+  },
+
+  stop: function() {
+    this.updater.onComplete = undefined;
+    clearTimeout(this.timer);
+    (this.onComplete || Prototype.emptyFunction).apply(this, arguments);
+  },
+
+  updateComplete: function(request) {
+    if (this.options.decay) {
+      this.decay = (request.responseText == this.lastText ?
+        this.decay * this.options.decay : 1);
+
+      this.lastText = request.responseText;
+    }
+    this.timer = setTimeout(this.onTimerEvent.bind(this),
+      this.decay * this.frequency * 1000);
+  },
+
+  onTimerEvent: function() {
+    this.updater = new Ajax.Updater(this.container, this.url, this.options);
+  }
+});
+document.getElementsByClassName = function(className, parentElement) {
+  var children = ($(parentElement) || document.body).getElementsByTagName('*');
+  return $A(children).inject([], function(elements, child) {
+    if (child.className.match(new RegExp("(^|\\s)" + className + "(\\s|$)")))
+      elements.push(child);
+    return elements;
+  });
+}
+
+/*--------------------------------------------------------------------------*/
+
+if (!window.Element) {
+  var Element = new Object();
+}
+
+Object.extend(Element, {
+  visible: function(element) {
+    return $(element).style.display != 'none';
+  },
+
+  toggle: function() {
+    for (var i = 0; i < arguments.length; i++) {
+      var element = $(arguments[i]);
+      Element[Element.visible(element) ? 'hide' : 'show'](element);
+    }
+  },
+
+  hide: function() {
+    for (var i = 0; i < arguments.length; i++) {
+      var element = $(arguments[i]);
+      element.style.display = 'none';
+    }
+  },
+
+  show: function() {
+    for (var i = 0; i < arguments.length; i++) {
+      var element = $(arguments[i]);
+      element.style.display = '';
+    }
+  },
+
+  remove: function(element) {
+    element = $(element);
+    element.parentNode.removeChild(element);
+  },
+
+  update: function(element, html) {
+    $(element).innerHTML = html.stripScripts();
+    setTimeout(function() {html.evalScripts()}, 10);
+  },
+
+  getHeight: function(element) {
+    element = $(element);
+    return element.offsetHeight;
+  },
+
+  classNames: function(element) {
+    return new Element.ClassNames(element);
+  },
+
+  hasClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    return Element.classNames(element).include(className);
+  },
+
+  addClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    return Element.classNames(element).add(className);
+  },
+
+  removeClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    return Element.classNames(element).remove(className);
+  },
+
+  // removes whitespace-only text node children
+  cleanWhitespace: function(element) {
+    element = $(element);
+    for (var i = 0; i < element.childNodes.length; i++) {
+      var node = element.childNodes[i];
+      if (node.nodeType == 3 && !/\S/.test(node.nodeValue))
+        Element.remove(node);
+    }
+  },
+
+  empty: function(element) {
+    return $(element).innerHTML.match(/^\s*$/);
+  },
+
+  scrollTo: function(element) {
+    element = $(element);
+    var x = element.x ? element.x : element.offsetLeft,
+        y = element.y ? element.y : element.offsetTop;
+    window.scrollTo(x, y);
+  },
+
+  getStyle: function(element, style) {
+    element = $(element);
+    var value = element.style[style.camelize()];
+    if (!value) {
+      if (document.defaultView && document.defaultView.getComputedStyle) {
+        var css = document.defaultView.getComputedStyle(element, null);
+        value = css ? css.getPropertyValue(style) : null;
+      } else if (element.currentStyle) {
+        value = element.currentStyle[style.camelize()];
+      }
+    }
+
+    if (window.opera && ['left', 'top', 'right', 'bottom'].include(style))
+      if (Element.getStyle(element, 'position') == 'static') value = 'auto';
+
+    return value == 'auto' ? null : value;
+  },
+
+  setStyle: function(element, style) {
+    element = $(element);
+    for (name in style)
+      element.style[name.camelize()] = style[name];
+  },
+
+  getDimensions: function(element) {
+    element = $(element);
+    if (Element.getStyle(element, 'display') != 'none')
+      return {width: element.offsetWidth, height: element.offsetHeight};
+
+    // All *Width and *Height properties give 0 on elements with display none,
+    // so enable the element temporarily
+    var els = element.style;
+    var originalVisibility = els.visibility;
+    var originalPosition = els.position;
+    els.visibility = 'hidden';
+    els.position = 'absolute';
+    els.display = '';
+    var originalWidth = element.clientWidth;
+    var originalHeight = element.clientHeight;
+    els.display = 'none';
+    els.position = originalPosition;
+    els.visibility = originalVisibility;
+    return {width: originalWidth, height: originalHeight};
+  },
+
+  makePositioned: function(element) {
+    element = $(element);
+    var pos = Element.getStyle(element, 'position');
+    if (pos == 'static' || !pos) {
+      element._madePositioned = true;
+      element.style.position = 'relative';
+      // Opera returns the offset relative to the positioning context, when an
+      // element is position relative but top and left have not been defined
+      if (window.opera) {
+        element.style.top = 0;
+        element.style.left = 0;
+      }
+    }
+  },
+
+  undoPositioned: function(element) {
+    element = $(element);
+    if (element._madePositioned) {
+      element._madePositioned = undefined;
+      element.style.position =
+        element.style.top =
+        element.style.left =
+        element.style.bottom =
+        element.style.right = '';
+    }
+  },
+
+  makeClipping: function(element) {
+    element = $(element);
+    if (element._overflow) return;
+    element._overflow = element.style.overflow;
+    if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden')
+      element.style.overflow = 'hidden';
+  },
+
+  undoClipping: function(element) {
+    element = $(element);
+    if (element._overflow) return;
+    element.style.overflow = element._overflow;
+    element._overflow = undefined;
+  }
+});
+
+var Toggle = new Object();
+Toggle.display = Element.toggle;
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.Insertion = function(adjacency) {
+  this.adjacency = adjacency;
+}
+
+Abstract.Insertion.prototype = {
+  initialize: function(element, content) {
+    this.element = $(element);
+    this.content = content.stripScripts();
+
+    if (this.adjacency && this.element.insertAdjacentHTML) {
+      try {
+        this.element.insertAdjacentHTML(this.adjacency, this.content);
+      } catch (e) {
+        if (this.element.tagName.toLowerCase() == 'tbody') {
+          this.insertContent(this.contentFromAnonymousTable());
+        } else {
+          throw e;
+        }
+      }
+    } else {
+      this.range = this.element.ownerDocument.createRange();
+      if (this.initializeRange) this.initializeRange();
+      this.insertContent([this.range.createContextualFragment(this.content)]);
+    }
+
+    setTimeout(function() {content.evalScripts()}, 10);
+  },
+
+  contentFromAnonymousTable: function() {
+    var div = document.createElement('div');
+    div.innerHTML = '<table><tbody>' + this.content + '</tbody></table>';
+    return $A(div.childNodes[0].childNodes[0].childNodes);
+  }
+}
+
+var Insertion = new Object();
+
+Insertion.Before = Class.create();
+Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), {
+  initializeRange: function() {
+    this.range.setStartBefore(this.element);
+  },
+
+  insertContent: function(fragments) {
+    fragments.each((function(fragment) {
+      this.element.parentNode.insertBefore(fragment, this.element);
+    }).bind(this));
+  }
+});
+
+Insertion.Top = Class.create();
+Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), {
+  initializeRange: function() {
+    this.range.selectNodeContents(this.element);
+    this.range.collapse(true);
+  },
+
+  insertContent: function(fragments) {
+    fragments.reverse(false).each((function(fragment) {
+      this.element.insertBefore(fragment, this.element.firstChild);
+    }).bind(this));
+  }
+});
+
+Insertion.Bottom = Class.create();
+Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), {
+  initializeRange: function() {
+    this.range.selectNodeContents(this.element);
+    this.range.collapse(this.element);
+  },
+
+  insertContent: function(fragments) {
+    fragments.each((function(fragment) {
+      this.element.appendChild(fragment);
+    }).bind(this));
+  }
+});
+
+Insertion.After = Class.create();
+Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), {
+  initializeRange: function() {
+    this.range.setStartAfter(this.element);
+  },
+
+  insertContent: function(fragments) {
+    fragments.each((function(fragment) {
+      this.element.parentNode.insertBefore(fragment,
+        this.element.nextSibling);
+    }).bind(this));
+  }
+});
+
+/*--------------------------------------------------------------------------*/
+
+Element.ClassNames = Class.create();
+Element.ClassNames.prototype = {
+  initialize: function(element) {
+    this.element = $(element);
+  },
+
+  _each: function(iterator) {
+    this.element.className.split(/\s+/).select(function(name) {
+      return name.length > 0;
+    })._each(iterator);
+  },
+
+  set: function(className) {
+    this.element.className = className;
+  },
+
+  add: function(classNameToAdd) {
+    if (this.include(classNameToAdd)) return;
+    this.set(this.toArray().concat(classNameToAdd).join(' '));
+  },
+
+  remove: function(classNameToRemove) {
+    if (!this.include(classNameToRemove)) return;
+    this.set(this.select(function(className) {
+      return className != classNameToRemove;
+    }).join(' '));
+  },
+
+  toString: function() {
+    return this.toArray().join(' ');
+  }
+}
+
+Object.extend(Element.ClassNames.prototype, Enumerable);
+var Field = {
+  clear: function() {
+    for (var i = 0; i < arguments.length; i++)
+      $(arguments[i]).value = '';
+  },
+
+  focus: function(element) {
+    $(element).focus();
+  },
+
+  present: function() {
+    for (var i = 0; i < arguments.length; i++)
+      if ($(arguments[i]).value == '') return false;
+    return true;
+  },
+
+  select: function(element) {
+    $(element).select();
+  },
+
+  activate: function(element) {
+    element = $(element);
+    element.focus();
+    if (element.select)
+      element.select();
+  }
+}
+
+/*--------------------------------------------------------------------------*/
+
+var Form = {
+  serialize: function(form) {
+    var elements = Form.getElements($(form));
+    var queryComponents = new Array();
+
+    for (var i = 0; i < elements.length; i++) {
+      var queryComponent = Form.Element.serialize(elements[i]);
+      if (queryComponent)
+        queryComponents.push(queryComponent);
+    }
+
+    return queryComponents.join('&');
+  },
+
+  getElements: function(form) {
+    form = $(form);
+    var elements = new Array();
+
+    for (tagName in Form.Element.Serializers) {
+      var tagElements = form.getElementsByTagName(tagName);
+      for (var j = 0; j < tagElements.length; j++)
+        elements.push(tagElements[j]);
+    }
+    return elements;
+  },
+
+  getInputs: function(form, typeName, name) {
+    form = $(form);
+    var inputs = form.getElementsByTagName('input');
+
+    if (!typeName && !name)
+      return inputs;
+
+    var matchingInputs = new Array();
+    for (var i = 0; i < inputs.length; i++) {
+      var input = inputs[i];
+      if ((typeName && input.type != typeName) ||
+          (name && input.name != name))
+        continue;
+      matchingInputs.push(input);
+    }
+
+    return matchingInputs;
+  },
+
+  disable: function(form) {
+    var elements = Form.getElements(form);
+    for (var i = 0; i < elements.length; i++) {
+      var element = elements[i];
+      element.blur();
+      element.disabled = 'true';
+    }
+  },
+
+  enable: function(form) {
+    var elements = Form.getElements(form);
+    for (var i = 0; i < elements.length; i++) {
+      var element = elements[i];
+      element.disabled = '';
+    }
+  },
+
+  findFirstElement: function(form) {
+    return Form.getElements(form).find(function(element) {
+      return element.type != 'hidden' && !element.disabled &&
+        ['input', 'select', 'textarea'].include(element.tagName.toLowerCase());
+    });
+  },
+
+  focusFirstElement: function(form) {
+    Field.activate(Form.findFirstElement(form));
+  },
+
+  reset: function(form) {
+    $(form).reset();
+  }
+}
+
+Form.Element = {
+  serialize: function(element) {
+    element = $(element);
+    var method = element.tagName.toLowerCase();
+    var parameter = Form.Element.Serializers[method](element);
+
+    if (parameter) {
+      var key = encodeURIComponent(parameter[0]);
+      if (key.length == 0) return;
+
+      if (parameter[1].constructor != Array)
+        parameter[1] = [parameter[1]];
+
+      return parameter[1].map(function(value) {
+        return key + '=' + encodeURIComponent(value);
+      }).join('&');
+    }
+  },
+
+  getValue: function(element) {
+    element = $(element);
+    var method = element.tagName.toLowerCase();
+    var parameter = Form.Element.Serializers[method](element);
+
+    if (parameter)
+      return parameter[1];
+  }
+}
+
+Form.Element.Serializers = {
+  input: function(element) {
+    switch (element.type.toLowerCase()) {
+      case 'submit':
+      case 'hidden':
+      case 'password':
+      case 'text':
+        return Form.Element.Serializers.textarea(element);
+      case 'checkbox':
+      case 'radio':
+        return Form.Element.Serializers.inputSelector(element);
+    }
+    return false;
+  },
+
+  inputSelector: function(element) {
+    if (element.checked)
+      return [element.name, element.value];
+  },
+
+  textarea: function(element) {
+    return [element.name, element.value];
+  },
+
+  select: function(element) {
+    return Form.Element.Serializers[element.type == 'select-one' ?
+      'selectOne' : 'selectMany'](element);
+  },
+
+  selectOne: function(element) {
+    var value = '', opt, index = element.selectedIndex;
+    if (index >= 0) {
+      opt = element.options[index];
+      value = opt.value;
+      if (!value && !('value' in opt))
+        value = opt.text;
+    }
+    return [element.name, value];
+  },
+
+  selectMany: function(element) {
+    var value = new Array();
+    for (var i = 0; i < element.length; i++) {
+      var opt = element.options[i];
+      if (opt.selected) {
+        var optValue = opt.value;
+        if (!optValue && !('value' in opt))
+          optValue = opt.text;
+        value.push(optValue);
+      }
+    }
+    return [element.name, value];
+  }
+}
+
+/*--------------------------------------------------------------------------*/
+
+var $F = Form.Element.getValue;
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.TimedObserver = function() {}
+Abstract.TimedObserver.prototype = {
+  initialize: function(element, frequency, callback) {
+    this.frequency = frequency;
+    this.element   = $(element);
+    this.callback  = callback;
+
+    this.lastValue = this.getValue();
+    this.registerCallback();
+  },
+
+  registerCallback: function() {
+    setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
+  },
+
+  onTimerEvent: function() {
+    var value = this.getValue();
+    if (this.lastValue != value) {
+      this.callback(this.element, value);
+      this.lastValue = value;
+    }
+  }
+}
+
+Form.Element.Observer = Class.create();
+Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {
+  getValue: function() {
+    return Form.Element.getValue(this.element);
+  }
+});
+
+Form.Observer = Class.create();
+Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {
+  getValue: function() {
+    return Form.serialize(this.element);
+  }
+});
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.EventObserver = function() {}
+Abstract.EventObserver.prototype = {
+  initialize: function(element, callback) {
+    this.element  = $(element);
+    this.callback = callback;
+
+    this.lastValue = this.getValue();
+    if (this.element.tagName.toLowerCase() == 'form')
+      this.registerFormCallbacks();
+    else
+      this.registerCallback(this.element);
+  },
+
+  onElementEvent: function() {
+    var value = this.getValue();
+    if (this.lastValue != value) {
+      this.callback(this.element, value);
+      this.lastValue = value;
+    }
+  },
+
+  registerFormCallbacks: function() {
+    var elements = Form.getElements(this.element);
+    for (var i = 0; i < elements.length; i++)
+      this.registerCallback(elements[i]);
+  },
+
+  registerCallback: function(element) {
+    if (element.type) {
+      switch (element.type.toLowerCase()) {
+        case 'checkbox':
+        case 'radio':
+          Event.observe(element, 'click', this.onElementEvent.bind(this));
+          break;
+        case 'password':
+        case 'text':
+        case 'textarea':
+        case 'select-one':
+        case 'select-multiple':
+          Event.observe(element, 'change', this.onElementEvent.bind(this));
+          break;
+      }
+    }
+  }
+}
+
+Form.Element.EventObserver = Class.create();
+Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
+  getValue: function() {
+    return Form.Element.getValue(this.element);
+  }
+});
+
+Form.EventObserver = Class.create();
+Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
+  getValue: function() {
+    return Form.serialize(this.element);
+  }
+});
+if (!window.Event) {
+  var Event = new Object();
+}
+
+Object.extend(Event, {
+  KEY_BACKSPACE: 8,
+  KEY_TAB:       9,
+  KEY_RETURN:   13,
+  KEY_ESC:      27,
+  KEY_LEFT:     37,
+  KEY_UP:       38,
+  KEY_RIGHT:    39,
+  KEY_DOWN:     40,
+  KEY_DELETE:   46,
+
+  element: function(event) {
+    return event.target || event.srcElement;
+  },
+
+  isLeftClick: function(event) {
+    return (((event.which) && (event.which == 1)) ||
+            ((event.button) && (event.button == 1)));
+  },
+
+  pointerX: function(event) {
+    return event.pageX || (event.clientX +
+      (document.documentElement.scrollLeft || document.body.scrollLeft));
+  },
+
+  pointerY: function(event) {
+    return event.pageY || (event.clientY +
+      (document.documentElement.scrollTop || document.body.scrollTop));
+  },
+
+  stop: function(event) {
+    if (event.preventDefault) {
+      event.preventDefault();
+      event.stopPropagation();
+    } else {
+      event.returnValue = false;
+      event.cancelBubble = true;
+    }
+  },
+
+  // find the first node with the given tagName, starting from the
+  // node the event was triggered on; traverses the DOM upwards
+  findElement: function(event, tagName) {
+    var element = Event.element(event);
+    while (element.parentNode && (!element.tagName ||
+        (element.tagName.toUpperCase() != tagName.toUpperCase())))
+      element = element.parentNode;
+    return element;
+  },
+
+  observers: false,
+
+  _observeAndCache: function(element, name, observer, useCapture) {
+    if (!this.observers) this.observers = [];
+    if (element.addEventListener) {
+      this.observers.push([element, name, observer, useCapture]);
+      element.addEventListener(name, observer, useCapture);
+    } else if (element.attachEvent) {
+      this.observers.push([element, name, observer, useCapture]);
+      element.attachEvent('on' + name, observer);
+    }
+  },
+
+  unloadCache: function() {
+    if (!Event.observers) return;
+    for (var i = 0; i < Event.observers.length; i++) {
+      Event.stopObserving.apply(this, Event.observers[i]);
+      Event.observers[i][0] = null;
+    }
+    Event.observers = false;
+  },
+
+  observe: function(element, name, observer, useCapture) {
+    var element = $(element);
+    useCapture = useCapture || false;
+
+    if (name == 'keypress' &&
+        (navigator.appVersion.match(/Konqueror|Safari|KHTML/)
+        || element.attachEvent))
+      name = 'keydown';
+
+    this._observeAndCache(element, name, observer, useCapture);
+  },
+
+  stopObserving: function(element, name, observer, useCapture) {
+    var element = $(element);
+    useCapture = useCapture || false;
+
+    if (name == 'keypress' &&
+        (navigator.appVersion.match(/Konqueror|Safari|KHTML/)
+        || element.detachEvent))
+      name = 'keydown';
+
+    if (element.removeEventListener) {
+      element.removeEventListener(name, observer, useCapture);
+    } else if (element.detachEvent) {
+      element.detachEvent('on' + name, observer);
+    }
+  }
+});
+
+/* prevent memory leaks in IE */
+Event.observe(window, 'unload', Event.unloadCache, false);
+var Position = {
+  // set to true if needed, warning: firefox performance problems
+  // NOT neeeded for page scrolling, only if draggable contained in
+  // scrollable elements
+  includeScrollOffsets: false,
+
+  // must be called before calling withinIncludingScrolloffset, every time the
+  // page is scrolled
+  prepare: function() {
+    this.deltaX =  window.pageXOffset
+                || document.documentElement.scrollLeft
+                || document.body.scrollLeft
+                || 0;
+    this.deltaY =  window.pageYOffset
+                || document.documentElement.scrollTop
+                || document.body.scrollTop
+                || 0;
+  },
+
+  realOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.scrollTop  || 0;
+      valueL += element.scrollLeft || 0;
+      element = element.parentNode;
+    } while (element);
+    return [valueL, valueT];
+  },
+
+  cumulativeOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      element = element.offsetParent;
+    } while (element);
+    return [valueL, valueT];
+  },
+
+  positionedOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      element = element.offsetParent;
+      if (element) {
+        p = Element.getStyle(element, 'position');
+        if (p == 'relative' || p == 'absolute') break;
+      }
+    } while (element);
+    return [valueL, valueT];
+  },
+
+  offsetParent: function(element) {
+    if (element.offsetParent) return element.offsetParent;
+    if (element == document.body) return element;
+
+    while ((element = element.parentNode) && element != document.body)
+      if (Element.getStyle(element, 'position') != 'static')
+        return element;
+
+    return document.body;
+  },
+
+  // caches x/y coordinate pair to use with overlap
+  within: function(element, x, y) {
+    if (this.includeScrollOffsets)
+      return this.withinIncludingScrolloffsets(element, x, y);
+    this.xcomp = x;
+    this.ycomp = y;
+    this.offset = this.cumulativeOffset(element);
+
+    return (y >= this.offset[1] &&
+            y <  this.offset[1] + element.offsetHeight &&
+            x >= this.offset[0] &&
+            x <  this.offset[0] + element.offsetWidth);
+  },
+
+  withinIncludingScrolloffsets: function(element, x, y) {
+    var offsetcache = this.realOffset(element);
+
+    this.xcomp = x + offsetcache[0] - this.deltaX;
+    this.ycomp = y + offsetcache[1] - this.deltaY;
+    this.offset = this.cumulativeOffset(element);
+
+    return (this.ycomp >= this.offset[1] &&
+            this.ycomp <  this.offset[1] + element.offsetHeight &&
+            this.xcomp >= this.offset[0] &&
+            this.xcomp <  this.offset[0] + element.offsetWidth);
+  },
+
+  // within must be called directly before
+  overlap: function(mode, element) {
+    if (!mode) return 0;
+    if (mode == 'vertical')
+      return ((this.offset[1] + element.offsetHeight) - this.ycomp) /
+        element.offsetHeight;
+    if (mode == 'horizontal')
+      return ((this.offset[0] + element.offsetWidth) - this.xcomp) /
+        element.offsetWidth;
+  },
+
+  clone: function(source, target) {
+    source = $(source);
+    target = $(target);
+    target.style.position = 'absolute';
+    var offsets = this.cumulativeOffset(source);
+    target.style.top    = offsets[1] + 'px';
+    target.style.left   = offsets[0] + 'px';
+    target.style.width  = source.offsetWidth + 'px';
+    target.style.height = source.offsetHeight + 'px';
+  },
+
+  page: function(forElement) {
+    var valueT = 0, valueL = 0;
+
+    var element = forElement;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+
+      // Safari fix
+      if (element.offsetParent==document.body)
+        if (Element.getStyle(element,'position')=='absolute') break;
+
+    } while (element = element.offsetParent);
+
+    element = forElement;
+    do {
+      valueT -= element.scrollTop  || 0;
+      valueL -= element.scrollLeft || 0;
+    } while (element = element.parentNode);
+
+    return [valueL, valueT];
+  },
+
+  clone: function(source, target) {
+    var options = Object.extend({
+      setLeft:    true,
+      setTop:     true,
+      setWidth:   true,
+      setHeight:  true,
+      offsetTop:  0,
+      offsetLeft: 0
+    }, arguments[2] || {})
+
+    // find page position of source
+    source = $(source);
+    var p = Position.page(source);
+
+    // find coordinate system to use
+    target = $(target);
+    var delta = [0, 0];
+    var parent = null;
+    // delta [0,0] will do fine with position: fixed elements,
+    // position:absolute needs offsetParent deltas
+    if (Element.getStyle(target,'position') == 'absolute') {
+      parent = Position.offsetParent(target);
+      delta = Position.page(parent);
+    }
+
+    // correct by body offsets (fixes Safari)
+    if (parent == document.body) {
+      delta[0] -= document.body.offsetLeft;
+      delta[1] -= document.body.offsetTop;
+    }
+
+    // set position
+    if(options.setLeft)   target.style.left  = (p[0] - delta[0] + options.offsetLeft) + 'px';
+    if(options.setTop)    target.style.top   = (p[1] - delta[1] + options.offsetTop) + 'px';
+    if(options.setWidth)  target.style.width = source.offsetWidth + 'px';
+    if(options.setHeight) target.style.height = source.offsetHeight + 'px';
+  },
+
+  absolutize: function(element) {
+    element = $(element);
+    if (element.style.position == 'absolute') return;
+    Position.prepare();
+
+    var offsets = Position.positionedOffset(element);
+    var top     = offsets[1];
+    var left    = offsets[0];
+    var width   = element.clientWidth;
+    var height  = element.clientHeight;
+
+    element._originalLeft   = left - parseFloat(element.style.left  || 0);
+    element._originalTop    = top  - parseFloat(element.style.top || 0);
+    element._originalWidth  = element.style.width;
+    element._originalHeight = element.style.height;
+
+    element.style.position = 'absolute';
+    element.style.top    = top + 'px';;
+    element.style.left   = left + 'px';;
+    element.style.width  = width + 'px';;
+    element.style.height = height + 'px';;
+  },
+
+  relativize: function(element) {
+    element = $(element);
+    if (element.style.position == 'relative') return;
+    Position.prepare();
+
+    element.style.position = 'relative';
+    var top  = parseFloat(element.style.top  || 0) - (element._originalTop || 0);
+    var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);
+
+    element.style.top    = top + 'px';
+    element.style.left   = left + 'px';
+    element.style.height = element._originalHeight;
+    element.style.width  = element._originalWidth;
+  }
+}
+
+// Safari returns margins on body which is incorrect if the child is absolutely
+// positioned.  For performance reasons, redefine Position.cumulativeOffset for
+// KHTML/WebKit only.
+if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) {
+  Position.cumulativeOffset = function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      if (element.offsetParent == document.body)
+        if (Element.getStyle(element, 'position') == 'absolute') break;
+
+      element = element.offsetParent;
+    } while (element);
+
+    return [valueL, valueT];
+  }
+}
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/inc/lbox/prototype.js
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/inc/lbox/lightbox.css
===================================================================
--- branches/5.1.x/themes/onlinestore/inc/lbox/lightbox.css	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/inc/lbox/lightbox.css	(revision 12131)
@@ -0,0 +1,79 @@
+#lightbox{
+	position: absolute;
+	left: 0;
+	width: 100%;
+	z-index: 100;
+	text-align: center;
+	line-height: 0;
+	}
+
+#lightbox a img{ border: none; }
+
+#outerImageContainer{
+	position: relative;
+	background-color: #fff;
+	width: 250px;
+	height: 250px;
+	margin: 0 auto;
+	}
+
+#imageContainer{
+	padding: 10px;
+	}
+
+#loading{
+	position: absolute;
+	top: 40%;
+	left: 0%;
+	height: 25%;
+	width: 100%;
+	text-align: center;
+	line-height: 0;
+	}
+#hoverNav{
+	position: absolute;
+	top: 0;
+	left: 0;
+	height: 100%;
+	width: 100%;
+	z-index: 10;
+	}
+#imageContainer>#hoverNav{ left: 0;}
+#hoverNav a{ outline: none;}
+
+#prevLink, #nextLink{
+	width: 49%;
+	height: 100%;
+	background: transparent url(../../img/s.gif) no-repeat; /* Trick IE into showing hover */
+	display: block;
+	}
+#prevLink { left: 0; float: left;}
+#nextLink { right: 0; float: right;}
+#prevLink:hover, #prevLink:visited:hover { background: url(../../img/lbox/prevlabel.gif) left 15% no-repeat; }
+#nextLink:hover, #nextLink:visited:hover { background: url(../../img/lbox/nextlabel.gif) right 15% no-repeat; }
+
+
+#imageDataContainer{
+	font: 10px Verdana, Helvetica, sans-serif;
+	background-color: #fff;
+	margin: 0 auto;
+	line-height: 1.4em;
+	overflow: auto;
+	width: 100%	
+	}
+
+#imageData{	padding:0 10px; color: #666; }
+#imageData #imageDetails{ width: 70%; float: left; text-align: left; }	
+#imageData #caption{ font-weight: bold;	}
+#imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0em;	}			
+#imageData #bottomNavClose{ width: 66px; float: right;  padding-bottom: 0.7em;	}	
+		
+#overlay{
+	position: absolute;
+	top: 0;
+	left: 0;
+	z-index: 90;
+	width: 100%;
+	height: 500px;
+	background-color: #000;
+	}
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/inc/lbox/lightbox.css
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/inc/lbox/effects.js
===================================================================
--- branches/5.1.x/themes/onlinestore/inc/lbox/effects.js	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/inc/lbox/effects.js	(revision 12131)
@@ -0,0 +1,903 @@
+// Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+// Contributors:
+//  Justin Palmer (http://encytemedia.com/)
+//  Mark Pilgrim (http://diveintomark.org/)
+//  Martin Bialasinki
+// 
+// See scriptaculous.js for full license.  
+
+/* ------------- element ext -------------- */  
+ 
+// converts rgb() and #xxx to #xxxxxx format,  
+// returns self (or first argument) if not convertable  
+String.prototype.parseColor = function() {  
+  var color = '#';  
+  if(this.slice(0,4) == 'rgb(') {  
+    var cols = this.slice(4,this.length-1).split(',');  
+    var i=0; do { color += parseInt(cols[i]).toColorPart() } while (++i<3);  
+  } else {  
+    if(this.slice(0,1) == '#') {  
+      if(this.length==4) for(var i=1;i<4;i++) color += (this.charAt(i) + this.charAt(i)).toLowerCase();  
+      if(this.length==7) color = this.toLowerCase();  
+    }  
+  }  
+  return(color.length==7 ? color : (arguments[0] || this));  
+}
+
+Element.collectTextNodes = function(element) {  
+  return $A($(element).childNodes).collect( function(node) {
+    return (node.nodeType==3 ? node.nodeValue : 
+      (node.hasChildNodes() ? Element.collectTextNodes(node) : ''));
+  }).flatten().join('');
+}
+
+Element.collectTextNodesIgnoreClass = function(element, className) {  
+  return $A($(element).childNodes).collect( function(node) {
+    return (node.nodeType==3 ? node.nodeValue : 
+      ((node.hasChildNodes() && !Element.hasClassName(node,className)) ? 
+        Element.collectTextNodes(node) : ''));
+  }).flatten().join('');
+}
+
+Element.setStyle = function(element, style) {
+  element = $(element);
+  for(k in style) element.style[k.camelize()] = style[k];
+}
+
+Element.setContentZoom = function(element, percent) {  
+  Element.setStyle(element, {fontSize: (percent/100) + 'em'});   
+  if(navigator.appVersion.indexOf('AppleWebKit')>0) window.scrollBy(0,0);  
+}
+
+Element.getOpacity = function(element){  
+  var opacity;
+  if (opacity = Element.getStyle(element, 'opacity'))  
+    return parseFloat(opacity);  
+  if (opacity = (Element.getStyle(element, 'filter') || '').match(/alpha\(opacity=(.*)\)/))  
+    if(opacity[1]) return parseFloat(opacity[1]) / 100;  
+  return 1.0;  
+}
+
+Element.setOpacity = function(element, value){  
+  element= $(element);  
+  if (value == 1){
+    Element.setStyle(element, { opacity: 
+      (/Gecko/.test(navigator.userAgent) && !/Konqueror|Safari|KHTML/.test(navigator.userAgent)) ? 
+      0.999999 : null });
+    if(/MSIE/.test(navigator.userAgent))  
+      Element.setStyle(element, {filter: Element.getStyle(element,'filter').replace(/alpha\([^\)]*\)/gi,'')});  
+  } else {  
+    if(value < 0.00001) value = 0;  
+    Element.setStyle(element, {opacity: value});
+    if(/MSIE/.test(navigator.userAgent))  
+     Element.setStyle(element, 
+       { filter: Element.getStyle(element,'filter').replace(/alpha\([^\)]*\)/gi,'') +
+                 'alpha(opacity='+value*100+')' });  
+  }   
+}  
+ 
+Element.getInlineOpacity = function(element){  
+  return $(element).style.opacity || '';
+}  
+
+Element.childrenWithClassName = function(element, className) {  
+  return $A($(element).getElementsByTagName('*')).select(
+    function(c) { return Element.hasClassName(c, className) });
+}
+
+Array.prototype.call = function() {
+  var args = arguments;
+  this.each(function(f){ f.apply(this, args) });
+}
+
+/*--------------------------------------------------------------------------*/
+
+var Effect = {
+  tagifyText: function(element) {
+    var tagifyStyle = 'position:relative';
+    if(/MSIE/.test(navigator.userAgent)) tagifyStyle += ';zoom:1';
+    element = $(element);
+    $A(element.childNodes).each( function(child) {
+      if(child.nodeType==3) {
+        child.nodeValue.toArray().each( function(character) {
+          element.insertBefore(
+            Builder.node('span',{style: tagifyStyle},
+              character == ' ' ? String.fromCharCode(160) : character), 
+              child);
+        });
+        Element.remove(child);
+      }
+    });
+  },
+  multiple: function(element, effect) {
+    var elements;
+    if(((typeof element == 'object') || 
+        (typeof element == 'function')) && 
+       (element.length))
+      elements = element;
+    else
+      elements = $(element).childNodes;
+      
+    var options = Object.extend({
+      speed: 0.1,
+      delay: 0.0
+    }, arguments[2] || {});
+    var masterDelay = options.delay;
+
+    $A(elements).each( function(element, index) {
+      new effect(element, Object.extend(options, { delay: index * options.speed + masterDelay }));
+    });
+  },
+  PAIRS: {
+    'slide':  ['SlideDown','SlideUp'],
+    'blind':  ['BlindDown','BlindUp'],
+    'appear': ['Appear','Fade']
+  },
+  toggle: function(element, effect) {
+    element = $(element);
+    effect = (effect || 'appear').toLowerCase();
+    var options = Object.extend({
+      queue: { position:'end', scope:(element.id || 'global') }
+    }, arguments[2] || {});
+    Effect[Element.visible(element) ? 
+      Effect.PAIRS[effect][1] : Effect.PAIRS[effect][0]](element, options);
+  }
+};
+
+var Effect2 = Effect; // deprecated
+
+/* ------------- transitions ------------- */
+
+Effect.Transitions = {}
+
+Effect.Transitions.linear = function(pos) {
+  return pos;
+}
+Effect.Transitions.sinoidal = function(pos) {
+  return (-Math.cos(pos*Math.PI)/2) + 0.5;
+}
+Effect.Transitions.reverse  = function(pos) {
+  return 1-pos;
+}
+Effect.Transitions.flicker = function(pos) {
+  return ((-Math.cos(pos*Math.PI)/4) + 0.75) + Math.random()/4;
+}
+Effect.Transitions.wobble = function(pos) {
+  return (-Math.cos(pos*Math.PI*(9*pos))/2) + 0.5;
+}
+Effect.Transitions.pulse = function(pos) {
+  return (Math.floor(pos*10) % 2 == 0 ? 
+    (pos*10-Math.floor(pos*10)) : 1-(pos*10-Math.floor(pos*10)));
+}
+Effect.Transitions.none = function(pos) {
+  return 0;
+}
+Effect.Transitions.full = function(pos) {
+  return 1;
+}
+
+/* ------------- core effects ------------- */
+
+Effect.ScopedQueue = Class.create();
+Object.extend(Object.extend(Effect.ScopedQueue.prototype, Enumerable), {
+  initialize: function() {
+    this.effects  = [];
+    this.interval = null;
+  },
+  _each: function(iterator) {
+    this.effects._each(iterator);
+  },
+  add: function(effect) {
+    var timestamp = new Date().getTime();
+    
+    var position = (typeof effect.options.queue == 'string') ? 
+      effect.options.queue : effect.options.queue.position;
+    
+    switch(position) {
+      case 'front':
+        // move unstarted effects after this effect  
+        this.effects.findAll(function(e){ return e.state=='idle' }).each( function(e) {
+            e.startOn  += effect.finishOn;
+            e.finishOn += effect.finishOn;
+          });
+        break;
+      case 'end':
+        // start effect after last queued effect has finished
+        timestamp = this.effects.pluck('finishOn').max() || timestamp;
+        break;
+    }
+    
+    effect.startOn  += timestamp;
+    effect.finishOn += timestamp;
+    this.effects.push(effect);
+    if(!this.interval) 
+      this.interval = setInterval(this.loop.bind(this), 40);
+  },
+  remove: function(effect) {
+    this.effects = this.effects.reject(function(e) { return e==effect });
+    if(this.effects.length == 0) {
+      clearInterval(this.interval);
+      this.interval = null;
+    }
+  },
+  loop: function() {
+    var timePos = new Date().getTime();
+    this.effects.invoke('loop', timePos);
+  }
+});
+
+Effect.Queues = {
+  instances: $H(),
+  get: function(queueName) {
+    if(typeof queueName != 'string') return queueName;
+    
+    if(!this.instances[queueName])
+      this.instances[queueName] = new Effect.ScopedQueue();
+      
+    return this.instances[queueName];
+  }
+}
+Effect.Queue = Effect.Queues.get('global');
+
+Effect.DefaultOptions = {
+  transition: Effect.Transitions.sinoidal,
+  duration:   1.0,   // seconds
+  fps:        25.0,  // max. 25fps due to Effect.Queue implementation
+  sync:       false, // true for combining
+  from:       0.0,
+  to:         1.0,
+  delay:      0.0,
+  queue:      'parallel'
+}
+
+Effect.Base = function() {};
+Effect.Base.prototype = {
+  position: null,
+  start: function(options) {
+    this.options      = Object.extend(Object.extend({},Effect.DefaultOptions), options || {});
+    this.currentFrame = 0;
+    this.state        = 'idle';
+    this.startOn      = this.options.delay*1000;
+    this.finishOn     = this.startOn + (this.options.duration*1000);
+    this.event('beforeStart');
+    if(!this.options.sync)
+      Effect.Queues.get(typeof this.options.queue == 'string' ? 
+        'global' : this.options.queue.scope).add(this);
+  },
+  loop: function(timePos) {
+    if(timePos >= this.startOn) {
+      if(timePos >= this.finishOn) {
+        this.render(1.0);
+        this.cancel();
+        this.event('beforeFinish');
+        if(this.finish) this.finish(); 
+        this.event('afterFinish');
+        return;  
+      }
+      var pos   = (timePos - this.startOn) / (this.finishOn - this.startOn);
+      var frame = Math.round(pos * this.options.fps * this.options.duration);
+      if(frame > this.currentFrame) {
+        this.render(pos);
+        this.currentFrame = frame;
+      }
+    }
+  },
+  render: function(pos) {
+    if(this.state == 'idle') {
+      this.state = 'running';
+      this.event('beforeSetup');
+      if(this.setup) this.setup();
+      this.event('afterSetup');
+    }
+    if(this.state == 'running') {
+      if(this.options.transition) pos = this.options.transition(pos);
+      pos *= (this.options.to-this.options.from);
+      pos += this.options.from;
+      this.position = pos;
+      this.event('beforeUpdate');
+      if(this.update) this.update(pos);
+      this.event('afterUpdate');
+    }
+  },
+  cancel: function() {
+    if(!this.options.sync)
+      Effect.Queues.get(typeof this.options.queue == 'string' ? 
+        'global' : this.options.queue.scope).remove(this);
+    this.state = 'finished';
+  },
+  event: function(eventName) {
+    if(this.options[eventName + 'Internal']) this.options[eventName + 'Internal'](this);
+    if(this.options[eventName]) this.options[eventName](this);
+  },
+  inspect: function() {
+    return '#<Effect:' + $H(this).inspect() + ',options:' + $H(this.options).inspect() + '>';
+  }
+}
+
+Effect.Parallel = Class.create();
+Object.extend(Object.extend(Effect.Parallel.prototype, Effect.Base.prototype), {
+  initialize: function(effects) {
+    this.effects = effects || [];
+    this.start(arguments[1]);
+  },
+  update: function(position) {
+    this.effects.invoke('render', position);
+  },
+  finish: function(position) {
+    this.effects.each( function(effect) {
+      effect.render(1.0);
+      effect.cancel();
+      effect.event('beforeFinish');
+      if(effect.finish) effect.finish(position);
+      effect.event('afterFinish');
+    });
+  }
+});
+
+Effect.Opacity = Class.create();
+Object.extend(Object.extend(Effect.Opacity.prototype, Effect.Base.prototype), {
+  initialize: function(element) {
+    this.element = $(element);
+    // make this work on IE on elements without 'layout'
+    if(/MSIE/.test(navigator.userAgent) && (!this.element.hasLayout))
+      Element.setStyle(this.element, {zoom: 1});
+    var options = Object.extend({
+      from: Element.getOpacity(this.element) || 0.0,
+      to:   1.0
+    }, arguments[1] || {});
+    this.start(options);
+  },
+  update: function(position) {
+    Element.setOpacity(this.element, position);
+  }
+});
+
+Effect.Move = Class.create();
+Object.extend(Object.extend(Effect.Move.prototype, Effect.Base.prototype), {
+  initialize: function(element) {
+    this.element = $(element);
+    var options = Object.extend({
+      x:    0,
+      y:    0,
+      mode: 'relative'
+    }, arguments[1] || {});
+    this.start(options);
+  },
+  setup: function() {
+    // Bug in Opera: Opera returns the "real" position of a static element or
+    // relative element that does not have top/left explicitly set.
+    // ==> Always set top and left for position relative elements in your stylesheets 
+    // (to 0 if you do not need them) 
+    Element.makePositioned(this.element);
+    this.originalLeft = parseFloat(Element.getStyle(this.element,'left') || '0');
+    this.originalTop  = parseFloat(Element.getStyle(this.element,'top')  || '0');
+    if(this.options.mode == 'absolute') {
+      // absolute movement, so we need to calc deltaX and deltaY
+      this.options.x = this.options.x - this.originalLeft;
+      this.options.y = this.options.y - this.originalTop;
+    }
+  },
+  update: function(position) {
+    Element.setStyle(this.element, {
+      left: this.options.x  * position + this.originalLeft + 'px',
+      top:  this.options.y  * position + this.originalTop  + 'px'
+    });
+  }
+});
+
+// for backwards compatibility
+Effect.MoveBy = function(element, toTop, toLeft) {
+  return new Effect.Move(element, 
+    Object.extend({ x: toLeft, y: toTop }, arguments[3] || {}));
+};
+
+Effect.Scale = Class.create();
+Object.extend(Object.extend(Effect.Scale.prototype, Effect.Base.prototype), {
+  initialize: function(element, percent) {
+    this.element = $(element)
+    var options = Object.extend({
+      scaleX: true,
+      scaleY: true,
+      scaleContent: true,
+      scaleFromCenter: false,
+      scaleMode: 'box',        // 'box' or 'contents' or {} with provided values
+      scaleFrom: 100.0,
+      scaleTo:   percent
+    }, arguments[2] || {});
+    this.start(options);
+  },
+  setup: function() {
+    this.restoreAfterFinish = this.options.restoreAfterFinish || false;
+    this.elementPositioning = Element.getStyle(this.element,'position');
+    
+    this.originalStyle = {};
+    ['top','left','width','height','fontSize'].each( function(k) {
+      this.originalStyle[k] = this.element.style[k];
+    }.bind(this));
+      
+    this.originalTop  = this.element.offsetTop;
+    this.originalLeft = this.element.offsetLeft;
+    
+    var fontSize = Element.getStyle(this.element,'font-size') || '100%';
+    ['em','px','%'].each( function(fontSizeType) {
+      if(fontSize.indexOf(fontSizeType)>0) {
+        this.fontSize     = parseFloat(fontSize);
+        this.fontSizeType = fontSizeType;
+      }
+    }.bind(this));
+    
+    this.factor = (this.options.scaleTo - this.options.scaleFrom)/100;
+    
+    this.dims = null;
+    if(this.options.scaleMode=='box')
+      this.dims = [this.element.offsetHeight, this.element.offsetWidth];
+    if(/^content/.test(this.options.scaleMode))
+      this.dims = [this.element.scrollHeight, this.element.scrollWidth];
+    if(!this.dims)
+      this.dims = [this.options.scaleMode.originalHeight,
+                   this.options.scaleMode.originalWidth];
+  },
+  update: function(position) {
+    var currentScale = (this.options.scaleFrom/100.0) + (this.factor * position);
+    if(this.options.scaleContent && this.fontSize)
+      Element.setStyle(this.element, {fontSize: this.fontSize * currentScale + this.fontSizeType });
+    this.setDimensions(this.dims[0] * currentScale, this.dims[1] * currentScale);
+  },
+  finish: function(position) {
+    if (this.restoreAfterFinish) Element.setStyle(this.element, this.originalStyle);
+  },
+  setDimensions: function(height, width) {
+    var d = {};
+    if(this.options.scaleX) d.width = width + 'px';
+    if(this.options.scaleY) d.height = height + 'px';
+    if(this.options.scaleFromCenter) {
+      var topd  = (height - this.dims[0])/2;
+      var leftd = (width  - this.dims[1])/2;
+      if(this.elementPositioning == 'absolute') {
+        if(this.options.scaleY) d.top = this.originalTop-topd + 'px';
+        if(this.options.scaleX) d.left = this.originalLeft-leftd + 'px';
+      } else {
+        if(this.options.scaleY) d.top = -topd + 'px';
+        if(this.options.scaleX) d.left = -leftd + 'px';
+      }
+    }
+    Element.setStyle(this.element, d);
+  }
+});
+
+Effect.Highlight = Class.create();
+Object.extend(Object.extend(Effect.Highlight.prototype, Effect.Base.prototype), {
+  initialize: function(element) {
+    this.element = $(element);
+    var options = Object.extend({ startcolor: '#ffff99' }, arguments[1] || {});
+    this.start(options);
+  },
+  setup: function() {
+    // Prevent executing on elements not in the layout flow
+    if(Element.getStyle(this.element, 'display')=='none') { this.cancel(); return; }
+    // Disable background image during the effect
+    this.oldStyle = {
+      backgroundImage: Element.getStyle(this.element, 'background-image') };
+    Element.setStyle(this.element, {backgroundImage: 'none'});
+    if(!this.options.endcolor)
+      this.options.endcolor = Element.getStyle(this.element, 'background-color').parseColor('#ffffff');
+    if(!this.options.restorecolor)
+      this.options.restorecolor = Element.getStyle(this.element, 'background-color');
+    // init color calculations
+    this._base  = $R(0,2).map(function(i){ return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16) }.bind(this));
+    this._delta = $R(0,2).map(function(i){ return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i] }.bind(this));
+  },
+  update: function(position) {
+    Element.setStyle(this.element,{backgroundColor: $R(0,2).inject('#',function(m,v,i){
+      return m+(Math.round(this._base[i]+(this._delta[i]*position)).toColorPart()); }.bind(this)) });
+  },
+  finish: function() {
+    Element.setStyle(this.element, Object.extend(this.oldStyle, {
+      backgroundColor: this.options.restorecolor
+    }));
+  }
+});
+
+Effect.ScrollTo = Class.create();
+Object.extend(Object.extend(Effect.ScrollTo.prototype, Effect.Base.prototype), {
+  initialize: function(element) {
+    this.element = $(element);
+    this.start(arguments[1] || {});
+  },
+  setup: function() {
+    Position.prepare();
+    var offsets = Position.cumulativeOffset(this.element);
+    if(this.options.offset) offsets[1] += this.options.offset;
+    var max = window.innerHeight ? 
+      window.height - window.innerHeight :
+      document.body.scrollHeight - 
+        (document.documentElement.clientHeight ? 
+          document.documentElement.clientHeight : document.body.clientHeight);
+    this.scrollStart = Position.deltaY;
+    this.delta = (offsets[1] > max ? max : offsets[1]) - this.scrollStart;
+  },
+  update: function(position) {
+    Position.prepare();
+    window.scrollTo(Position.deltaX, 
+      this.scrollStart + (position*this.delta));
+  }
+});
+
+/* ------------- combination effects ------------- */
+
+Effect.Fade = function(element) {
+  var oldOpacity = Element.getInlineOpacity(element);
+  var options = Object.extend({
+  from: Element.getOpacity(element) || 1.0,
+  to:   0.0,
+  afterFinishInternal: function(effect) { with(Element) { 
+    if(effect.options.to!=0) return;
+    hide(effect.element);
+    setStyle(effect.element, {opacity: oldOpacity}); }}
+  }, arguments[1] || {});
+  return new Effect.Opacity(element,options);
+}
+
+Effect.Appear = function(element) {
+  var options = Object.extend({
+  from: (Element.getStyle(element, 'display') == 'none' ? 0.0 : Element.getOpacity(element) || 0.0),
+  to:   1.0,
+  beforeSetup: function(effect) { with(Element) {
+    setOpacity(effect.element, effect.options.from);
+    show(effect.element); }}
+  }, arguments[1] || {});
+  return new Effect.Opacity(element,options);
+}
+
+Effect.Puff = function(element) {
+  element = $(element);
+  var oldStyle = { opacity: Element.getInlineOpacity(element), position: Element.getStyle(element, 'position') };
+  return new Effect.Parallel(
+   [ new Effect.Scale(element, 200, 
+      { sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }), 
+     new Effect.Opacity(element, { sync: true, to: 0.0 } ) ], 
+     Object.extend({ duration: 1.0, 
+      beforeSetupInternal: function(effect) { with(Element) {
+        setStyle(effect.effects[0].element, {position: 'absolute'}); }},
+      afterFinishInternal: function(effect) { with(Element) {
+         hide(effect.effects[0].element);
+         setStyle(effect.effects[0].element, oldStyle); }}
+     }, arguments[1] || {})
+   );
+}
+
+Effect.BlindUp = function(element) {
+  element = $(element);
+  Element.makeClipping(element);
+  return new Effect.Scale(element, 0, 
+    Object.extend({ scaleContent: false, 
+      scaleX: false, 
+      restoreAfterFinish: true,
+      afterFinishInternal: function(effect) { with(Element) {
+        [hide, undoClipping].call(effect.element); }} 
+    }, arguments[1] || {})
+  );
+}
+
+Effect.BlindDown = function(element) {
+  element = $(element);
+  var oldHeight = Element.getStyle(element, 'height');
+  var elementDimensions = Element.getDimensions(element);
+  return new Effect.Scale(element, 100, 
+    Object.extend({ scaleContent: false, 
+      scaleX: false,
+      scaleFrom: 0,
+      scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
+      restoreAfterFinish: true,
+      afterSetup: function(effect) { with(Element) {
+        makeClipping(effect.element);
+        setStyle(effect.element, {height: '0px'});
+        show(effect.element); 
+      }},  
+      afterFinishInternal: function(effect) { with(Element) {
+        undoClipping(effect.element);
+        setStyle(effect.element, {height: oldHeight});
+      }}
+    }, arguments[1] || {})
+  );
+}
+
+Effect.SwitchOff = function(element) {
+  element = $(element);
+  var oldOpacity = Element.getInlineOpacity(element);
+  return new Effect.Appear(element, { 
+    duration: 0.4,
+    from: 0,
+    transition: Effect.Transitions.flicker,
+    afterFinishInternal: function(effect) {
+      new Effect.Scale(effect.element, 1, { 
+        duration: 0.3, scaleFromCenter: true,
+        scaleX: false, scaleContent: false, restoreAfterFinish: true,
+        beforeSetup: function(effect) { with(Element) {
+          [makePositioned,makeClipping].call(effect.element);
+        }},
+        afterFinishInternal: function(effect) { with(Element) {
+          [hide,undoClipping,undoPositioned].call(effect.element);
+          setStyle(effect.element, {opacity: oldOpacity});
+        }}
+      })
+    }
+  });
+}
+
+Effect.DropOut = function(element) {
+  element = $(element);
+  var oldStyle = {
+    top: Element.getStyle(element, 'top'),
+    left: Element.getStyle(element, 'left'),
+    opacity: Element.getInlineOpacity(element) };
+  return new Effect.Parallel(
+    [ new Effect.Move(element, {x: 0, y: 100, sync: true }), 
+      new Effect.Opacity(element, { sync: true, to: 0.0 }) ],
+    Object.extend(
+      { duration: 0.5,
+        beforeSetup: function(effect) { with(Element) {
+          makePositioned(effect.effects[0].element); }},
+        afterFinishInternal: function(effect) { with(Element) {
+          [hide, undoPositioned].call(effect.effects[0].element);
+          setStyle(effect.effects[0].element, oldStyle); }} 
+      }, arguments[1] || {}));
+}
+
+Effect.Shake = function(element) {
+  element = $(element);
+  var oldStyle = {
+    top: Element.getStyle(element, 'top'),
+    left: Element.getStyle(element, 'left') };
+	  return new Effect.Move(element, 
+	    { x:  20, y: 0, duration: 0.05, afterFinishInternal: function(effect) {
+	  new Effect.Move(effect.element,
+	    { x: -40, y: 0, duration: 0.1,  afterFinishInternal: function(effect) {
+	  new Effect.Move(effect.element,
+	    { x:  40, y: 0, duration: 0.1,  afterFinishInternal: function(effect) {
+	  new Effect.Move(effect.element,
+	    { x: -40, y: 0, duration: 0.1,  afterFinishInternal: function(effect) {
+	  new Effect.Move(effect.element,
+	    { x:  40, y: 0, duration: 0.1,  afterFinishInternal: function(effect) {
+	  new Effect.Move(effect.element,
+	    { x: -20, y: 0, duration: 0.05, afterFinishInternal: function(effect) { with(Element) {
+        undoPositioned(effect.element);
+        setStyle(effect.element, oldStyle);
+  }}}) }}) }}) }}) }}) }});
+}
+
+Effect.SlideDown = function(element) {
+  element = $(element);
+  Element.cleanWhitespace(element);
+  // SlideDown need to have the content of the element wrapped in a container element with fixed height!
+  var oldInnerBottom = Element.getStyle(element.firstChild, 'bottom');
+  var elementDimensions = Element.getDimensions(element);
+  return new Effect.Scale(element, 100, Object.extend({ 
+    scaleContent: false, 
+    scaleX: false, 
+    scaleFrom: 0,
+    scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
+    restoreAfterFinish: true,
+    afterSetup: function(effect) { with(Element) {
+      makePositioned(effect.element);
+      makePositioned(effect.element.firstChild);
+      if(window.opera) setStyle(effect.element, {top: ''});
+      makeClipping(effect.element);
+      setStyle(effect.element, {height: '0px'});
+      show(element); }},
+    afterUpdateInternal: function(effect) { with(Element) {
+      setStyle(effect.element.firstChild, {bottom:
+        (effect.dims[0] - effect.element.clientHeight) + 'px' }); }},
+    afterFinishInternal: function(effect) { with(Element) {
+      undoClipping(effect.element); 
+      undoPositioned(effect.element.firstChild);
+      undoPositioned(effect.element);
+      setStyle(effect.element.firstChild, {bottom: oldInnerBottom}); }}
+    }, arguments[1] || {})
+  );
+}
+  
+Effect.SlideUp = function(element) {
+  element = $(element);
+  Element.cleanWhitespace(element);
+  var oldInnerBottom = Element.getStyle(element.firstChild, 'bottom');
+  return new Effect.Scale(element, 0, 
+   Object.extend({ scaleContent: false, 
+    scaleX: false, 
+    scaleMode: 'box',
+    scaleFrom: 100,
+    restoreAfterFinish: true,
+    beforeStartInternal: function(effect) { with(Element) {
+      makePositioned(effect.element);
+      makePositioned(effect.element.firstChild);
+      if(window.opera) setStyle(effect.element, {top: ''});
+      makeClipping(effect.element);
+      show(element); }},  
+    afterUpdateInternal: function(effect) { with(Element) {
+      setStyle(effect.element.firstChild, {bottom:
+        (effect.dims[0] - effect.element.clientHeight) + 'px' }); }},
+    afterFinishInternal: function(effect) { with(Element) {
+        [hide, undoClipping].call(effect.element); 
+        undoPositioned(effect.element.firstChild);
+        undoPositioned(effect.element);
+        setStyle(effect.element.firstChild, {bottom: oldInnerBottom}); }}
+   }, arguments[1] || {})
+  );
+}
+
+// Bug in opera makes the TD containing this element expand for a instance after finish 
+Effect.Squish = function(element) {
+  return new Effect.Scale(element, window.opera ? 1 : 0, 
+    { restoreAfterFinish: true,
+      beforeSetup: function(effect) { with(Element) {
+        makeClipping(effect.element); }},  
+      afterFinishInternal: function(effect) { with(Element) {
+        hide(effect.element); 
+        undoClipping(effect.element); }}
+  });
+}
+
+Effect.Grow = function(element) {
+  element = $(element);
+  var options = Object.extend({
+    direction: 'center',
+    moveTransistion: Effect.Transitions.sinoidal,
+    scaleTransition: Effect.Transitions.sinoidal,
+    opacityTransition: Effect.Transitions.full
+  }, arguments[1] || {});
+  var oldStyle = {
+    top: element.style.top,
+    left: element.style.left,
+    height: element.style.height,
+    width: element.style.width,
+    opacity: Element.getInlineOpacity(element) };
+
+  var dims = Element.getDimensions(element);    
+  var initialMoveX, initialMoveY;
+  var moveX, moveY;
+  
+  switch (options.direction) {
+    case 'top-left':
+      initialMoveX = initialMoveY = moveX = moveY = 0; 
+      break;
+    case 'top-right':
+      initialMoveX = dims.width;
+      initialMoveY = moveY = 0;
+      moveX = -dims.width;
+      break;
+    case 'bottom-left':
+      initialMoveX = moveX = 0;
+      initialMoveY = dims.height;
+      moveY = -dims.height;
+      break;
+    case 'bottom-right':
+      initialMoveX = dims.width;
+      initialMoveY = dims.height;
+      moveX = -dims.width;
+      moveY = -dims.height;
+      break;
+    case 'center':
+      initialMoveX = dims.width / 2;
+      initialMoveY = dims.height / 2;
+      moveX = -dims.width / 2;
+      moveY = -dims.height / 2;
+      break;
+  }
+  
+  return new Effect.Move(element, {
+    x: initialMoveX,
+    y: initialMoveY,
+    duration: 0.01, 
+    beforeSetup: function(effect) { with(Element) {
+      hide(effect.element);
+      makeClipping(effect.element);
+      makePositioned(effect.element);
+    }},
+    afterFinishInternal: function(effect) {
+      new Effect.Parallel(
+        [ new Effect.Opacity(effect.element, { sync: true, to: 1.0, from: 0.0, transition: options.opacityTransition }),
+          new Effect.Move(effect.element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }),
+          new Effect.Scale(effect.element, 100, {
+            scaleMode: { originalHeight: dims.height, originalWidth: dims.width }, 
+            sync: true, scaleFrom: window.opera ? 1 : 0, transition: options.scaleTransition, restoreAfterFinish: true})
+        ], Object.extend({
+             beforeSetup: function(effect) { with(Element) {
+               setStyle(effect.effects[0].element, {height: '0px'});
+               show(effect.effects[0].element); }},
+             afterFinishInternal: function(effect) { with(Element) {
+               [undoClipping, undoPositioned].call(effect.effects[0].element); 
+               setStyle(effect.effects[0].element, oldStyle); }}
+           }, options)
+      )
+    }
+  });
+}
+
+Effect.Shrink = function(element) {
+  element = $(element);
+  var options = Object.extend({
+    direction: 'center',
+    moveTransistion: Effect.Transitions.sinoidal,
+    scaleTransition: Effect.Transitions.sinoidal,
+    opacityTransition: Effect.Transitions.none
+  }, arguments[1] || {});
+  var oldStyle = {
+    top: element.style.top,
+    left: element.style.left,
+    height: element.style.height,
+    width: element.style.width,
+    opacity: Element.getInlineOpacity(element) };
+
+  var dims = Element.getDimensions(element);
+  var moveX, moveY;
+  
+  switch (options.direction) {
+    case 'top-left':
+      moveX = moveY = 0;
+      break;
+    case 'top-right':
+      moveX = dims.width;
+      moveY = 0;
+      break;
+    case 'bottom-left':
+      moveX = 0;
+      moveY = dims.height;
+      break;
+    case 'bottom-right':
+      moveX = dims.width;
+      moveY = dims.height;
+      break;
+    case 'center':  
+      moveX = dims.width / 2;
+      moveY = dims.height / 2;
+      break;
+  }
+  
+  return new Effect.Parallel(
+    [ new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0, transition: options.opacityTransition }),
+      new Effect.Scale(element, window.opera ? 1 : 0, { sync: true, transition: options.scaleTransition, restoreAfterFinish: true}),
+      new Effect.Move(element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition })
+    ], Object.extend({            
+         beforeStartInternal: function(effect) { with(Element) {
+           [makePositioned, makeClipping].call(effect.effects[0].element) }},
+         afterFinishInternal: function(effect) { with(Element) {
+           [hide, undoClipping, undoPositioned].call(effect.effects[0].element);
+           setStyle(effect.effects[0].element, oldStyle); }}
+       }, options)
+  );
+}
+
+Effect.Pulsate = function(element) {
+  element = $(element);
+  var options    = arguments[1] || {};
+  var oldOpacity = Element.getInlineOpacity(element);
+  var transition = options.transition || Effect.Transitions.sinoidal;
+  var reverser   = function(pos){ return transition(1-Effect.Transitions.pulse(pos)) };
+  reverser.bind(transition);
+  return new Effect.Opacity(element, 
+    Object.extend(Object.extend({  duration: 3.0, from: 0,
+      afterFinishInternal: function(effect) { Element.setStyle(effect.element, {opacity: oldOpacity}); }
+    }, options), {transition: reverser}));
+}
+
+Effect.Fold = function(element) {
+  element = $(element);
+  var oldStyle = {
+    top: element.style.top,
+    left: element.style.left,
+    width: element.style.width,
+    height: element.style.height };
+  Element.makeClipping(element);
+  return new Effect.Scale(element, 5, Object.extend({   
+    scaleContent: false,
+    scaleX: false,
+    afterFinishInternal: function(effect) {
+    new Effect.Scale(element, 1, { 
+      scaleContent: false, 
+      scaleY: false,
+      afterFinishInternal: function(effect) { with(Element) {
+        [hide, undoClipping].call(effect.element); 
+        setStyle(effect.element, oldStyle);
+      }} });
+  }}, arguments[1] || {}));
+}

Property changes on: branches/5.1.x/themes/onlinestore/inc/lbox/effects.js
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/inc/lbox/lightbox.js
===================================================================
--- branches/5.1.x/themes/onlinestore/inc/lbox/lightbox.js	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/inc/lbox/lightbox.js	(revision 12131)
@@ -0,0 +1,817 @@
+// -----------------------------------------------------------------------------------
+//
+//	Lightbox v2.03.3
+//	by Lokesh Dhakar - http://www.huddletogether.com
+//	5/21/06
+//
+//	For more information on this script, visit:
+//	http://huddletogether.com/projects/lightbox2/
+//
+//	Licensed under the Creative Commons Attribution 2.5 License - http://creativecommons.org/licenses/by/2.5/
+//	
+//	Credit also due to those who have helped, inspired, and made their code available to the public.
+//	Including: Scott Upton(uptonic.com), Peter-Paul Koch(quirksmode.com), Thomas Fuchs(mir.aculo.us), and others.
+//
+//
+// -----------------------------------------------------------------------------------
+/*
+
+	Table of Contents
+	-----------------
+	Configuration
+	Global Variables
+
+	Extending Built-in Objects	
+	- Object.extend(Element)
+	- Array.prototype.removeDuplicates()
+	- Array.prototype.empty()
+
+	Lightbox Class Declaration
+	- initialize()
+	- updateImageList()
+	- start()
+	- changeImage()
+	- resizeImageContainer()
+	- showImage()
+	- updateDetails()
+	- updateNav()
+	- enableKeyboardNav()
+	- disableKeyboardNav()
+	- keyboardAction()
+	- preloadNeighborImages()
+	- end()
+	
+	Miscellaneous Functions
+	- getPageScroll()
+	- getPageSize()
+	- getKey()
+	- listenKey()
+	- showSelectBoxes()
+	- hideSelectBoxes()
+	- showFlash()
+	- hideFlash()
+	- pause()
+	- initLightbox()
+	
+	Function Calls
+	- addLoadEvent(initLightbox)
+	
+*/
+// -----------------------------------------------------------------------------------
+
+//
+//	Configuration
+//
+var fileLoadingImage = inportalBase+'img/lbox/loading.gif';		
+var fileBottomNavCloseImage = inportalBase+'img/lbox/closelabel.gif';
+
+var overlayOpacity = 0.2;	// controls transparency of shadow overlay
+
+var animate = true;			// toggles resizing animations
+var resizeSpeed = 7;		// controls the speed of the image resizing animations (1=slowest and 10=fastest)
+
+var borderSize = 10;		//if you adjust the padding in the CSS, you will need to update this variable
+
+// -----------------------------------------------------------------------------------
+
+//
+//	Global Variables
+//
+var imageArray = new Array;
+var activeImage;
+
+if(animate == true){
+	overlayDuration = 0.2;	// shadow fade in/out duration
+	if(resizeSpeed > 10){ resizeSpeed = 10;}
+	if(resizeSpeed < 1){ resizeSpeed = 1;}
+	resizeDuration = (11 - resizeSpeed) * 0.15;
+} else { 
+	overlayDuration = 0;
+	resizeDuration = 0;
+}
+
+// -----------------------------------------------------------------------------------
+
+//
+//	Additional methods for Element added by SU, Couloir
+//	- further additions by Lokesh Dhakar (huddletogether.com)
+//
+Object.extend(Element, {
+	getWidth: function(element) {
+	   	element = $(element);
+	   	return element.offsetWidth; 
+	},
+	setWidth: function(element,w) {
+	   	element = $(element);
+    	element.style.width = w +"px";
+	},
+	setHeight: function(element,h) {
+   		element = $(element);
+    	element.style.height = h +"px";
+	},
+	setTop: function(element,t) {
+	   	element = $(element);
+    	element.style.top = t +"px";
+	},
+	setLeft: function(element,l) {
+	   	element = $(element);
+    	element.style.left = l +"px";
+	},
+	setSrc: function(element,src) {
+    	element = $(element);
+    	element.src = src; 
+	},
+	setHref: function(element,href) {
+    	element = $(element);
+    	element.href = href; 
+	},
+	setInnerHTML: function(element,content) {
+		element = $(element);
+		element.innerHTML = content;
+	}
+});
+
+// -----------------------------------------------------------------------------------
+
+//
+//	Extending built-in Array object
+//	- array.removeDuplicates()
+//	- array.empty()
+//
+Array.prototype.removeDuplicates = function () {
+    for(i = 0; i < this.length; i++){
+        for(j = this.length-1; j>i; j--){        
+            if(this[i][0] == this[j][0]){
+                this.splice(j,1);
+            }
+        }
+    }
+}
+
+// -----------------------------------------------------------------------------------
+
+Array.prototype.empty = function () {
+	for(i = 0; i <= this.length; i++){
+		this.shift();
+	}
+}
+
+// -----------------------------------------------------------------------------------
+
+//
+//	Lightbox Class Declaration
+//	- initialize()
+//	- start()
+//	- changeImage()
+//	- resizeImageContainer()
+//	- showImage()
+//	- updateDetails()
+//	- updateNav()
+//	- enableKeyboardNav()
+//	- disableKeyboardNav()
+//	- keyboardNavAction()
+//	- preloadNeighborImages()
+//	- end()
+//
+//	Structuring of code inspired by Scott Upton (http://www.uptonic.com/)
+//
+var Lightbox = Class.create();
+
+Lightbox.prototype = {
+	
+	// initialize()
+	// Constructor runs on completion of the DOM loading. Calls updateImageList and then
+	// the function inserts html at the bottom of the page which is used to display the shadow 
+	// overlay and the image container.
+	//
+	initialize: function() {	
+		
+		this.updateImageList();
+
+		// Code inserts html at the bottom of the page that looks similar to this:
+		//
+		//	<div id="overlay"></div>
+		//	<div id="lightbox">
+		//		<div id="outerImageContainer">
+		//			<div id="imageContainer">
+		//				<img id="lightboxImage">
+		//				<div style="" id="hoverNav">
+		//					<a href="#" id="prevLink"></a>
+		//					<a href="#" id="nextLink"></a>
+		//				</div>
+		//				<div id="loading">
+		//					<a href="#" id="loadingLink">
+		//						<img src="images/loading.gif">
+		//					</a>
+		//				</div>
+		//			</div>
+		//		</div>
+		//		<div id="imageDataContainer">
+		//			<div id="imageData">
+		//				<div id="imageDetails">
+		//					<span id="caption"></span>
+		//					<span id="numberDisplay"></span>
+		//				</div>
+		//				<div id="bottomNav">
+		//					<a href="#" id="bottomNavClose">
+		//						<img src="images/close.gif">
+		//					</a>
+		//				</div>
+		//			</div>
+		//		</div>
+		//	</div>
+
+
+		var objBody = document.getElementsByTagName("body").item(0);
+		
+		var objOverlay = document.createElement("div");
+		objOverlay.setAttribute('id','overlay');
+		objOverlay.style.display = 'none';
+		objOverlay.onclick = function() { myLightbox.end(); }
+		objBody.appendChild(objOverlay);
+		
+		var objLightbox = document.createElement("div");
+		objLightbox.setAttribute('id','lightbox');
+		objLightbox.style.display = 'none';
+		objLightbox.onclick = function(e) {	// close Lightbox is user clicks shadow overlay
+			if (!e) var e = window.event;
+			var clickObj = Event.element(e).id;
+			if ( clickObj == 'lightbox') {
+				myLightbox.end();
+			}
+		};
+		objBody.appendChild(objLightbox);
+			
+		var objOuterImageContainer = document.createElement("div");
+		objOuterImageContainer.setAttribute('id','outerImageContainer');
+		objLightbox.appendChild(objOuterImageContainer);
+
+		// When Lightbox starts it will resize itself from 250 by 250 to the current image dimension.
+		// If animations are turned off, it will be hidden as to prevent a flicker of a
+		// white 250 by 250 box.
+		if(animate){
+			Element.setWidth('outerImageContainer', 250);
+			Element.setHeight('outerImageContainer', 250);			
+		} else {
+			Element.setWidth('outerImageContainer', 1);
+			Element.setHeight('outerImageContainer', 1);			
+		}
+
+		var objImageContainer = document.createElement("div");
+		objImageContainer.setAttribute('id','imageContainer');
+		objOuterImageContainer.appendChild(objImageContainer);
+	
+		var objLightboxImage = document.createElement("img");
+		objLightboxImage.setAttribute('id','lightboxImage');
+		objImageContainer.appendChild(objLightboxImage);
+	
+		var objHoverNav = document.createElement("div");
+		objHoverNav.setAttribute('id','hoverNav');
+		objImageContainer.appendChild(objHoverNav);
+	
+		var objPrevLink = document.createElement("a");
+		objPrevLink.setAttribute('id','prevLink');
+		objPrevLink.setAttribute('href','#');
+		objHoverNav.appendChild(objPrevLink);
+		
+		var objNextLink = document.createElement("a");
+		objNextLink.setAttribute('id','nextLink');
+		objNextLink.setAttribute('href','#');
+		objHoverNav.appendChild(objNextLink);
+	
+		var objLoading = document.createElement("div");
+		objLoading.setAttribute('id','loading');
+		objImageContainer.appendChild(objLoading);
+	
+		var objLoadingLink = document.createElement("a");
+		objLoadingLink.setAttribute('id','loadingLink');
+		objLoadingLink.setAttribute('href','#');
+		objLoadingLink.onclick = function() { myLightbox.end(); return false; }
+		objLoading.appendChild(objLoadingLink);
+	
+		var objLoadingImage = document.createElement("img");
+		objLoadingImage.setAttribute('src', fileLoadingImage);
+		objLoadingLink.appendChild(objLoadingImage);
+
+		var objImageDataContainer = document.createElement("div");
+		objImageDataContainer.setAttribute('id','imageDataContainer');
+		objLightbox.appendChild(objImageDataContainer);
+
+		var objImageData = document.createElement("div");
+		objImageData.setAttribute('id','imageData');
+		objImageDataContainer.appendChild(objImageData);
+	
+		var objImageDetails = document.createElement("div");
+		objImageDetails.setAttribute('id','imageDetails');
+		objImageData.appendChild(objImageDetails);
+	
+		var objCaption = document.createElement("span");
+		objCaption.setAttribute('id','caption');
+		objImageDetails.appendChild(objCaption);
+	
+		var objNumberDisplay = document.createElement("span");
+		objNumberDisplay.setAttribute('id','numberDisplay');
+		objImageDetails.appendChild(objNumberDisplay);
+		
+		var objBottomNav = document.createElement("div");
+		objBottomNav.setAttribute('id','bottomNav');
+		objImageData.appendChild(objBottomNav);
+	
+		var objBottomNavCloseLink = document.createElement("a");
+		objBottomNavCloseLink.setAttribute('id','bottomNavClose');
+		objBottomNavCloseLink.setAttribute('href','#');
+		objBottomNavCloseLink.onclick = function() { myLightbox.end(); return false; }
+		objBottomNav.appendChild(objBottomNavCloseLink);
+	
+		var objBottomNavCloseImage = document.createElement("img");
+		objBottomNavCloseImage.setAttribute('src', fileBottomNavCloseImage);
+		objBottomNavCloseLink.appendChild(objBottomNavCloseImage);
+	},
+
+
+	//
+	// updateImageList()
+	// Loops through anchor tags looking for 'lightbox' references and applies onclick
+	// events to appropriate links. You can rerun after dynamically adding images w/ajax.
+	//
+	updateImageList: function() {	
+		if (!document.getElementsByTagName){ return; }
+		var anchors = document.getElementsByTagName('a');
+		var areas = document.getElementsByTagName('area');
+
+		// loop through all anchor tags
+		for (var i=0; i<anchors.length; i++){
+			var anchor = anchors[i];
+			
+			var relAttribute = String(anchor.getAttribute('rel'));
+			
+			// use the string.match() method to catch 'lightbox' references in the rel attribute
+			if (anchor.getAttribute('href') && (relAttribute.toLowerCase().match('lightbox'))){
+				anchor.onclick = function () {myLightbox.start(this); return false;}
+			}
+		}
+
+		// loop through all area tags
+		// todo: combine anchor & area tag loops
+		for (var i=0; i< areas.length; i++){
+			var area = areas[i];
+			
+			var relAttribute = String(area.getAttribute('rel'));
+			
+			// use the string.match() method to catch 'lightbox' references in the rel attribute
+			if (area.getAttribute('href') && (relAttribute.toLowerCase().match('lightbox'))){
+				area.onclick = function () {myLightbox.start(this); return false;}
+			}
+		}
+	},
+	
+	
+	//
+	//	start()
+	//	Display overlay and lightbox. If image is part of a set, add siblings to imageArray.
+	//
+	start: function(imageLink) {	
+
+		hideSelectBoxes();
+		hideFlash();
+
+		// stretch overlay to fill page and fade in
+		var arrayPageSize = getPageSize();
+		Element.setWidth('overlay', arrayPageSize[0]);
+		Element.setHeight('overlay', arrayPageSize[1]);
+
+		new Effect.Appear('overlay', { duration: overlayDuration, from: 0.0, to: overlayOpacity });
+
+		imageArray = [];
+		imageNum = 0;		
+
+		if (!document.getElementsByTagName){ return; }
+		var anchors = document.getElementsByTagName( imageLink.tagName);
+
+		// if image is NOT part of a set..
+		if((imageLink.getAttribute('rel') == 'lightbox')){
+			// add single image to imageArray
+			imageArray.push(new Array(imageLink.getAttribute('href'), imageLink.getAttribute('title')));			
+		} else {
+		// if image is part of a set..
+
+			// loop through anchors, find other images in set, and add them to imageArray
+			for (var i=0; i<anchors.length; i++){
+				var anchor = anchors[i];
+				if (anchor.getAttribute('href') && (anchor.getAttribute('rel') == imageLink.getAttribute('rel'))){
+					imageArray.push(new Array(anchor.getAttribute('href'), anchor.getAttribute('title')));
+				}
+			}
+			imageArray.removeDuplicates();
+			while(imageArray[imageNum][0] != imageLink.getAttribute('href')) { imageNum++;}
+		}
+
+		// calculate top and left offset for the lightbox 
+		var arrayPageScroll = getPageScroll();
+		var lightboxTop = arrayPageScroll[1] + (arrayPageSize[3] / 10);
+		var lightboxLeft = arrayPageScroll[0];
+		Element.setTop('lightbox', lightboxTop);
+		Element.setLeft('lightbox', lightboxLeft);
+		
+		Element.show('lightbox');
+		
+		this.changeImage(imageNum);
+	},
+
+	//
+	//	changeImage()
+	//	Hide most elements and preload image in preparation for resizing image container.
+	//
+	changeImage: function(imageNum) {	
+		
+		activeImage = imageNum;	// update global var
+
+		// hide elements during transition
+		if(animate){ Element.show('loading');}
+		Element.hide('lightboxImage');
+		Element.hide('hoverNav');
+		Element.hide('prevLink');
+		Element.hide('nextLink');
+		Element.hide('imageDataContainer');
+		Element.hide('numberDisplay');		
+		
+		imgPreloader = new Image();
+		
+		// once image is preloaded, resize image container
+		imgPreloader.onload=function(){
+			Element.setSrc('lightboxImage', imageArray[activeImage][0]);
+			myLightbox.resizeImageContainer(imgPreloader.width, imgPreloader.height);
+			
+			imgPreloader.onload=function(){};	//	clear onLoad, IE behaves irratically with animated gifs otherwise 
+		}
+		imgPreloader.src = imageArray[activeImage][0];
+	},
+
+	//
+	//	resizeImageContainer()
+	//
+	resizeImageContainer: function( imgWidth, imgHeight) {
+
+		// get curren width and height
+		this.widthCurrent = Element.getWidth('outerImageContainer');
+		this.heightCurrent = Element.getHeight('outerImageContainer');
+
+		// get new width and height
+		var widthNew = (imgWidth  + (borderSize * 2));
+		var heightNew = (imgHeight  + (borderSize * 2));
+
+		// scalars based on change from old to new
+		this.xScale = ( widthNew / this.widthCurrent) * 100;
+		this.yScale = ( heightNew / this.heightCurrent) * 100;
+
+		// calculate size difference between new and old image, and resize if necessary
+		wDiff = this.widthCurrent - widthNew;
+		hDiff = this.heightCurrent - heightNew;
+
+		if(!( hDiff == 0)){ new Effect.Scale('outerImageContainer', this.yScale, {scaleX: false, duration: resizeDuration, queue: 'front'}); }
+		if(!( wDiff == 0)){ new Effect.Scale('outerImageContainer', this.xScale, {scaleY: false, delay: resizeDuration, duration: resizeDuration}); }
+
+		// if new and old image are same size and no scaling transition is necessary, 
+		// do a quick pause to prevent image flicker.
+		if((hDiff == 0) && (wDiff == 0)){
+			if (navigator.appVersion.indexOf("MSIE")!=-1){ pause(250); } else { pause(100);} 
+		}
+
+		Element.setHeight('prevLink', imgHeight);
+		Element.setHeight('nextLink', imgHeight);
+		Element.setWidth( 'imageDataContainer', widthNew);
+
+		this.showImage();
+	},
+	
+	//
+	//	showImage()
+	//	Display image and begin preloading neighbors.
+	//
+	showImage: function(){
+		Element.hide('loading');
+		new Effect.Appear('lightboxImage', { duration: resizeDuration, queue: 'end', afterFinish: function(){	myLightbox.updateDetails(); } });
+		this.preloadNeighborImages();
+	},
+
+	//
+	//	updateDetails()
+	//	Display caption, image number, and bottom nav.
+	//
+	updateDetails: function() {
+	
+		// if caption is not null
+		if(imageArray[activeImage][1]){
+			Element.show('caption');
+			Element.setInnerHTML( 'caption', imageArray[activeImage][1]);
+		}
+		
+		// if image is part of set display 'Image x of x' 
+		if(imageArray.length > 1){
+			Element.show('numberDisplay');
+			Element.setInnerHTML( 'numberDisplay', "Image " + eval(activeImage + 1) + " of " + imageArray.length);
+		}
+
+		new Effect.Parallel(
+			[ new Effect.SlideDown( 'imageDataContainer', { sync: true, duration: resizeDuration, from: 0.0, to: 1.0 }), 
+			  new Effect.Appear('imageDataContainer', { sync: true, duration: resizeDuration }) ], 
+			{ duration: resizeDuration, afterFinish: function() {
+				// update overlay size and update nav
+				var arrayPageSize = getPageSize();
+				Element.setHeight('overlay', arrayPageSize[1]);
+				myLightbox.updateNav();
+				}
+			} 
+		);
+	},
+
+	//
+	//	updateNav()
+	//	Display appropriate previous and next hover navigation.
+	//
+	updateNav: function() {
+
+		Element.show('hoverNav');				
+
+		// if not first image in set, display prev image button
+		if(activeImage != 0){
+			Element.show('prevLink');
+			document.getElementById('prevLink').onclick = function() {
+				myLightbox.changeImage(activeImage - 1); return false;
+			}
+		}
+
+		// if not last image in set, display next image button
+		if(activeImage != (imageArray.length - 1)){
+			Element.show('nextLink');
+			document.getElementById('nextLink').onclick = function() {
+				myLightbox.changeImage(activeImage + 1); return false;
+			}
+		}
+		
+		this.enableKeyboardNav();
+	},
+
+	//
+	//	enableKeyboardNav()
+	//
+	enableKeyboardNav: function() {
+		document.onkeydown = this.keyboardAction; 
+	},
+
+	//
+	//	disableKeyboardNav()
+	//
+	disableKeyboardNav: function() {
+		document.onkeydown = '';
+	},
+
+	//
+	//	keyboardAction()
+	//
+	keyboardAction: function(e) {
+		if (e == null) { // ie
+			keycode = event.keyCode;
+			escapeKey = 27;
+		} else { // mozilla
+			keycode = e.keyCode;
+			escapeKey = e.DOM_VK_ESCAPE;
+		}
+
+		key = String.fromCharCode(keycode).toLowerCase();
+		
+		if((key == 'x') || (key == 'o') || (key == 'c') || (keycode == escapeKey)){	// close lightbox
+			myLightbox.end();
+		} else if((key == 'p') || (keycode == 37)){	// display previous image
+			if(activeImage != 0){
+				myLightbox.disableKeyboardNav();
+				myLightbox.changeImage(activeImage - 1);
+			}
+		} else if((key == 'n') || (keycode == 39)){	// display next image
+			if(activeImage != (imageArray.length - 1)){
+				myLightbox.disableKeyboardNav();
+				myLightbox.changeImage(activeImage + 1);
+			}
+		}
+
+	},
+
+	//
+	//	preloadNeighborImages()
+	//	Preload previous and next images.
+	//
+	preloadNeighborImages: function(){
+
+		if((imageArray.length - 1) > activeImage){
+			preloadNextImage = new Image();
+			preloadNextImage.src = imageArray[activeImage + 1][0];
+		}
+		if(activeImage > 0){
+			preloadPrevImage = new Image();
+			preloadPrevImage.src = imageArray[activeImage - 1][0];
+		}
+	
+	},
+
+	//
+	//	end()
+	//
+	end: function() {
+		this.disableKeyboardNav();
+		Element.hide('lightbox');
+		new Effect.Fade('overlay', { duration: overlayDuration});
+		showSelectBoxes();
+		showFlash();
+	}
+}
+
+// -----------------------------------------------------------------------------------
+
+//
+// getPageScroll()
+// Returns array with x,y page scroll values.
+// Core code from - quirksmode.com
+//
+function getPageScroll(){
+
+	var xScroll, yScroll;
+
+	if (self.pageYOffset) {
+		yScroll = self.pageYOffset;
+		xScroll = self.pageXOffset;
+	} else if (document.documentElement && document.documentElement.scrollTop){	 // Explorer 6 Strict
+		yScroll = document.documentElement.scrollTop;
+		xScroll = document.documentElement.scrollLeft;
+	} else if (document.body) {// all other Explorers
+		yScroll = document.body.scrollTop;
+		xScroll = document.body.scrollLeft;	
+	}
+
+	arrayPageScroll = new Array(xScroll,yScroll) 
+	return arrayPageScroll;
+}
+
+// -----------------------------------------------------------------------------------
+
+//
+// getPageSize()
+// Returns array with page width, height and window width, height
+// Core code from - quirksmode.com
+// Edit for Firefox by pHaez
+//
+function getPageSize(){
+	
+	var xScroll, yScroll;
+	
+	if (window.innerHeight && window.scrollMaxY) {	
+		xScroll = window.innerWidth + window.scrollMaxX;
+		yScroll = window.innerHeight + window.scrollMaxY;
+	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
+		xScroll = document.body.scrollWidth;
+		yScroll = document.body.scrollHeight;
+	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
+		xScroll = document.body.offsetWidth;
+		yScroll = document.body.offsetHeight;
+	}
+	
+	var windowWidth, windowHeight;
+	
+//	console.log(self.innerWidth);
+//	console.log(document.documentElement.clientWidth);
+
+	if (self.innerHeight) {	// all except Explorer
+		if(document.documentElement.clientWidth){
+			windowWidth = document.documentElement.clientWidth; 
+		} else {
+			windowWidth = self.innerWidth;
+		}
+		windowHeight = self.innerHeight;
+	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
+		windowWidth = document.documentElement.clientWidth;
+		windowHeight = document.documentElement.clientHeight;
+	} else if (document.body) { // other Explorers
+		windowWidth = document.body.clientWidth;
+		windowHeight = document.body.clientHeight;
+	}	
+	
+	// for small pages with total height less then height of the viewport
+	if(yScroll < windowHeight){
+		pageHeight = windowHeight;
+	} else { 
+		pageHeight = yScroll;
+	}
+
+//	console.log("xScroll " + xScroll)
+//	console.log("windowWidth " + windowWidth)
+
+	// for small pages with total width less then width of the viewport
+	if(xScroll < windowWidth){	
+		pageWidth = xScroll;		
+	} else {
+		pageWidth = windowWidth;
+	}
+//	console.log("pageWidth " + pageWidth)
+
+	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) 
+	return arrayPageSize;
+}
+
+// -----------------------------------------------------------------------------------
+
+//
+// getKey(key)
+// Gets keycode. If 'x' is pressed then it hides the lightbox.
+//
+function getKey(e){
+	if (e == null) { // ie
+		keycode = event.keyCode;
+	} else { // mozilla
+		keycode = e.which;
+	}
+	key = String.fromCharCode(keycode).toLowerCase();
+	
+	if(key == 'x'){
+	}
+}
+
+// -----------------------------------------------------------------------------------
+
+//
+// listenKey()
+//
+function listenKey () {	document.onkeypress = getKey; }
+	
+// ---------------------------------------------------
+
+function showSelectBoxes(){
+	var selects = document.getElementsByTagName("select");
+	for (i = 0; i != selects.length; i++) {
+		selects[i].style.visibility = "visible";
+	}
+}
+
+// ---------------------------------------------------
+
+function hideSelectBoxes(){
+	var selects = document.getElementsByTagName("select");
+	for (i = 0; i != selects.length; i++) {
+		selects[i].style.visibility = "hidden";
+	}
+}
+
+// ---------------------------------------------------
+
+function showFlash(){
+	var flashObjects = document.getElementsByTagName("object");
+	for (i = 0; i < flashObjects.length; i++) {
+		flashObjects[i].style.visibility = "visible";
+	}
+
+	var flashEmbeds = document.getElementsByTagName("embed");
+	for (i = 0; i < flashEmbeds.length; i++) {
+		flashEmbeds[i].style.visibility = "visible";
+	}
+}
+
+// ---------------------------------------------------
+
+function hideFlash(){
+	var flashObjects = document.getElementsByTagName("object");
+	for (i = 0; i < flashObjects.length; i++) {
+		flashObjects[i].style.visibility = "hidden";
+	}
+
+	var flashEmbeds = document.getElementsByTagName("embed");
+	for (i = 0; i < flashEmbeds.length; i++) {
+		flashEmbeds[i].style.visibility = "hidden";
+	}
+
+}
+
+
+// ---------------------------------------------------
+
+//
+// pause(numberMillis)
+// Pauses code execution for specified time. Uses busy code, not good.
+// Help from Ran Bar-On [ran2103@gmail.com]
+//
+
+function pause(ms){
+	var date = new Date();
+	curDate = null;
+	do{var curDate = new Date();}
+	while( curDate - date < ms);
+}
+/*
+function pause(numberMillis) {
+	var curently = new Date().getTime() + sender;
+	while (new Date().getTime();	
+}
+*/
+// ---------------------------------------------------
+
+
+
+function initLightbox() { myLightbox = new Lightbox(); }
+Event.observe(window, 'load', initLightbox, false);
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/inc/lbox/lightbox.js
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/inc/lbox/scriptaculous.js
===================================================================
--- branches/5.1.x/themes/onlinestore/inc/lbox/scriptaculous.js	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/inc/lbox/scriptaculous.js	(revision 12131)
@@ -0,0 +1,45 @@
+// Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+// 
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+var Scriptaculous = {
+  Version: '1.5.1',
+  require: function(libraryName) {
+    // inserting via DOM fails in Safari 2.0, so brute force approach
+    document.write('<script type="text/javascript" src="'+libraryName+'"></script>');
+  },
+  load: function() {
+    if((typeof Prototype=='undefined') ||
+      parseFloat(Prototype.Version.split(".")[0] + "." +
+                 Prototype.Version.split(".")[1]) < 1.4)
+      throw("script.aculo.us requires the Prototype JavaScript framework >= 1.4.0");
+    
+    $A(document.getElementsByTagName("script")).findAll( function(s) {
+      return (s.src && s.src.match(/scriptaculous\.js(\?.*)?$/))
+    }).each( function(s) {
+      var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,'');
+      var includes = s.src.match(/\?.*load=([a-z,]*)/);
+      (includes ? includes[1] : 'builder,effects,dragdrop,controls,slider').split(',').each(
+       function(include) { Scriptaculous.require(path+include+'.js') });
+    });
+  }
+}
+
+Scriptaculous.load();
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/inc/lbox/scriptaculous.js
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/inc/ajax.js
===================================================================
--- branches/5.1.x/themes/onlinestore/inc/ajax.js	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/inc/ajax.js	(revision 12131)
@@ -0,0 +1,240 @@
+function preg_print_pre(obj, reg)
+{
+	if (!reg) reg = /.*/;
+	var p = ''
+	for (var prop in obj) {
+		if (prop.match(reg) ) {
+			p += prop + ': '+obj[prop] + '\n'
+		}
+	}
+	alert(p)
+}
+
+
+// Main AJAX classs
+function Request() {}
+
+Request.timeout = 60000; //60 seconds
+Request.method = 'GET';
+Request.headers = new Array();
+Request.params = null;
+
+Request.makeRequest = function(p_url, p_busyReq, p_progId, p_successCallBack, p_errorCallBack, p_pass, p_object) {
+	//p_url: the web service url
+	//p_busyReq: is a request for this object currently in progress?
+	//p_progId: element id where progress HTML should be shown
+	//p_successCallBack: callback function for successful response
+	//p_errorCallBack: callback function for erroneous response
+	//p_pass: string of params to pass to callback functions
+	//p_object: object of params to pass to callback functions
+
+	if (p_busyReq) return;
+	var req = Request.getRequest();
+	if (req != null) {
+		p_busyReq = true;
+		Request.showProgress(p_progId);
+		req.onreadystatechange = function() {
+			if (req.readyState == 4) {
+				p_busyReq = false;
+				window.clearTimeout(toId);
+				try {
+					if (req.status == 200) {
+	//					preg_print_pre(req)
+						p_successCallBack(req, p_pass, p_object);
+					} else {
+						p_errorCallBack(req, p_pass, p_object);
+					}
+					Request.hideProgress(p_progId);
+				}
+				catch (e) {
+//					alert('AJAX error')
+				}
+			}
+		}
+		var $ajax_mark = (p_url.indexOf('?') ? '&' : '?') + 'ajax=yes';
+		req.open(Request.method, p_url + $ajax_mark, true);
+
+		if (Request.method == 'POST') {
+			Request.headers['Content-type'] = 'application/x-www-form-urlencoded';
+			Request.headers['referer'] = p_url;
+		}
+		else {
+			Request.headers['If-Modified-Since'] = 'Sat, 1 Jan 2000 00:00:00 GMT';
+		}
+
+		Request.sendHeaders(req);
+		if (Request.method == 'POST') {
+			req.send(Request.params);
+			Request.method = 'GET'; // restore method back to GET
+		}
+		else {
+			req.send(null);
+		}
+
+		var toId = window.setTimeout( function() {if (p_busyReq) req.abort();}, Request.timeout );
+	}
+}
+
+Request.processRedirect = function($request) {
+	var $match_redirect = new RegExp('^#redirect#(.*)').exec($request.responseText);
+	if ($match_redirect != null) {
+		// redirect to external template requested
+		window.location.href = $match_redirect[1];
+		return true;
+	}
+	return false;
+}
+Request.sendHeaders = function($request) {
+	for (var $header_name in Request.headers) {
+		if (typeof Request.headers[$header_name] == 'function') {
+			continue;
+		}
+		$request.setRequestHeader($header_name, Request.headers[$header_name]);
+	}
+	Request.headers = new Array(); // reset header afterwards
+}
+
+Request.getRequest = function() {
+	var xmlHttp;
+	try { xmlHttp = new ActiveXObject('MSXML2.XMLHTTP'); return xmlHttp; } catch (e) {}
+	try { xmlHttp = new ActiveXObject('Microsoft.XMLHTTP'); return xmlHttp; } catch (e) {}
+	try { xmlHttp = new XMLHttpRequest(); return xmlHttp; } catch(e) {}
+	return null;
+}
+
+Request.showProgress = function(p_id) {
+	if (p_id != '') {
+		Request.setOpacity(20, p_id);
+
+		if (!document.getElementById(p_id + '_progress')) {
+			document.body.appendChild(Request.getProgressObject(p_id));
+		}
+		else {
+			var $progress_div = document.getElementById(p_id + '_progress');
+			$progress_div.style.top = getRealTop(p_id) + 'px';
+			$progress_div.style.height = document.getElementById(p_id).clientHeight;
+			$progress_div.style.display = 'block';
+		}
+//		document.getElementById(p_id).innerHTML = Request.getProgressHtml();
+	}
+}
+
+Request.hideProgress = function(p_id) {
+	if (p_id != '') {
+		document.getElementById(p_id + '_progress').style.display = 'none';
+		Request.setOpacity(100, p_id);
+	}
+}
+
+Request.setOpacity = function (opacity, id) {
+	var elem = typeof(id)=='string' ? document.getElementById(id) : id;
+    var object = elem.style;
+    object.opacity = (opacity / 100);
+    object.MozOpacity = (opacity / 100);
+    object.KhtmlOpacity = (opacity / 100);
+    object.filter = "alpha(opacity=" + opacity + ")";
+}
+
+Request.getProgressHtml = function() {
+	return "<p class='progress'>" + Request.progressText + "<br /><img src='img/ajax_progress.gif' align='absmiddle' width='100' height='7' alt='" + Request.progressText + "'/></p>";
+}
+
+Request.getProgressObject = function($id) {
+	var $div = document.createElement('DIV');
+	var $parent_div = document.getElementById($id);
+
+	$div.id = $id + '_progress';
+
+	$div.style.width = $parent_div.clientWidth + 'px';
+	$div.style.height = '150px'; // default height if div is empty (first ajax request for div)
+	$div.style.left = getRealLeft($parent_div) + 'px';
+	$div.style.top = getRealTop($parent_div) + 'px';
+	$div.style.position = 'absolute';
+
+	/*$div.style.border = '1px solid green';
+	$div.style.backgroundColor = '#FF0000';*/
+
+	$div.innerHTML = '<table style="width: 100%; height: 100%;"><tr><td style="text-align: center;">'+Request.progressText+'<br /><img src="img/ajax_progress.gif" align="absmiddle" width="100" height="7" alt="'+escape(Request.progressText)+'" /></td></tr></table>';
+	return $div;
+}
+
+Request.getErrorHtml = function(p_req) {
+	//TODO: implement accepted way to handle request error
+	return '[status: ' + p_req.status + '; status_text: ' + p_req.statusText + '; responce_text: ' + p_req.responseText + ']';
+}
+
+Request.serializeForm = function(theform) {
+	if (typeof(theform) == 'string') {
+		theform = document.getElementById(theform);
+	}
+
+	var els = theform.elements;
+	var len = els.length;
+	var queryString = '';
+
+	Request.addField = function(name, value) {
+		if (queryString.length > 0) queryString += '&';
+		queryString += encodeURIComponent(name) + '=' + encodeURIComponent(value);
+	};
+
+	for (var i = 0; i<len; i++) {
+		var el = els[i];
+    	if (el.disabled) continue;
+
+		switch(el.type) {
+			case 'text':
+			case 'password':
+			case 'hidden':
+			case 'textarea':
+          		Request.addField(el.name, el.value);
+				break;
+
+			case 'select-one':
+				if (el.selectedIndex >= 0) {
+            		Request.addField(el.name, el.options[el.selectedIndex].value);
+          		}
+          		break;
+
+			case 'select-multiple':
+				for (var j = 0; j < el.options.length; j++) {
+            		if (!el.options[j].selected) continue;
+              		Request.addField(el.name, el.options[j].value);
+          		}
+          		break;
+
+			case 'checkbox':
+			case 'radio':
+          		if (!el.checked) continue;
+            	Request.addField(el.name,el.value);
+          		break;
+      	}
+	}
+	return queryString;
+};
+
+function RatingManager ($url) {
+	this.Url = $url;
+	this.BusyRequest = false;
+}
+
+RatingManager.prototype.makeVote = function ($vote, $prefix, $id, $size) {
+	var $url = this.Url.replace('#PREFIX#', $prefix).replace('#VOTE#', $vote).replace('#ID#', $id).replace('#SIZE#', $size);
+
+	Request.makeRequest($url, this.BusyRequest, '', this.successCallback, this.errorCallback, [$vote, $prefix, $id], this);
+}
+
+RatingManager.prototype.successCallback = function ($request, $params, $object) {
+    var response = $request.responseText;
+
+    if (response.substring(0, 5) == '@err:') {
+    	alert(response.substring(5));
+    	return ;
+    }
+
+    document.getElementById('page_rating_' + $params[2]).innerHTML = response;
+}
+
+
+RatingManager.prototype.errorCallback = function($request, $params, $object) {
+	alert('AJAX Error; class: RatingManager; ' + Request.getErrorHtml($request));
+}
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/inc/ajax.js
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/inc/captcha_image.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/inc/captcha_image.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/inc/captcha_image.tpl	(revision 12131)
@@ -0,0 +1 @@
+<inp2:m_NoDebug/><inp2:m_CaptchaImage />
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/inc/captcha_image.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/inc/style.css
===================================================================
--- branches/5.1.x/themes/onlinestore/inc/style.css	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/inc/style.css	(revision 12131)
@@ -0,0 +1,419 @@
+body {
+	padding: 0px;
+	background-color: #ffffff;
+	font-family: arial, verdana, helvetica;
+	font-size: small;
+	width: auto;
+	margin: 15px;
+	}
+
+p, td {
+	font-family: arial, verdana, helvetica;
+	color: #000000;
+	font-size: small;
+	}
+
+input, select, textarea {
+	font-family: arial, verdana, helvetica;
+	color: #000000;
+	font-size: small;
+	}
+
+form {
+	margin: 0;
+	display: inline;
+	}
+
+table {
+	border-collapse: collapse;
+	width: 100%;
+	padding: 0px;
+	margin: 0px auto;
+}
+
+td {
+	padding: 0px;
+	margin: 0px;
+	vertical-align: top;
+}
+
+a, a:active	{
+	color: #003399;
+	text-decoration: underline;
+	}
+
+a:hover {
+	color: #A20303;
+	}
+
+.error {
+	color: #A20303;
+	font-weight: bold;
+}
+
+td.toolbar {
+	color:#FFFFFF;
+	background-color:#FD6500;
+	padding-top:7px;
+	padding-bottom:7px;
+	padding-left:20px;
+	padding-right:20px;
+	font-size: small;
+	}
+
+a.toolbar {
+	color:#FFFFFF;
+	text-decoration: none;
+	}
+
+a.toolbar:hover {
+	color:#FFFFFF;
+	text-decoration: underline;
+	}
+
+.block {
+	border: 1px solid #999999;
+	margin-bottom: 10px;
+	}
+
+.block-no-border {
+	border: 0px;
+	margin-bottom: 10px;
+	}
+
+td.block-header {
+	background-color: #003399;
+	color: #FFFFFF;
+	font-size: small;
+	font-weight: bold;
+	padding: 5px;
+	}
+
+td.block-header-orange {
+	background-color: #FD6500;
+	color: #FFFFFF;
+	font-size: small;
+	font-weight: bold;
+	padding: 5px;
+	}
+
+
+
+td.block-data, .block-data td {
+	padding: 10px;
+	}
+
+td.block-data-single {
+	padding: 10px 0px 10px 10px;
+	}
+
+.block-data-ul {
+	padding-left: 0px;
+	margin-left: 25px;
+	margin-top: 5px;
+	list-style-type: square;
+	}
+
+.block-data-big {
+	padding: 10px;
+	font-size: small;
+	}
+
+.block-data-big-ul {
+	font-size: small;
+	padding-left: 0px;
+	margin-left: 25px;
+	margin-top: 5px;
+	color: #003399;
+	list-style-type: square;
+	}
+
+.separator td {
+	padding: 0px;
+	background-color: #CCCCCC;
+}
+
+.block-data2, .block-data2 td {
+	padding: 1px 10px 1px 10px;
+	}
+
+.subcat, a.subcat {
+	color: #A20303;
+	font-weight: bold;
+	text-decoration: none;
+	}
+
+a.subcat:hover {
+	text-decoration: underline;
+}
+
+.price1 {
+	color: #A20303;
+	font-weight: bold;
+	}
+
+.price2 {
+	display: block;
+	font-weight: bold;
+	font-size: medium;
+	padding: 2px;
+	}
+
+.price-msrp {
+	text-decoration:line-through;
+	}
+
+.header {
+  margin-bottom: 5px;
+}
+
+.header td {
+	font-size: small;
+	}
+
+.toolbar-block {
+	border: 1px solid #777;
+	width: 100%;
+}
+
+.main-table {
+	width: 100%;
+	margin: 0px auto;
+}
+
+.main-column-left {
+	width:200px;
+	padding-top:10px;
+	padding-right:10px;
+	}
+
+.main-column-center {
+	padding-top:10px;
+	padding-right:10px;
+	}
+
+.main-column-single {
+	padding-top:10px;
+	}
+
+.main-column-right {
+	width:200px;
+	padding-top:10px;
+	}
+
+.link-product1 {
+	font-size: medium;
+	font-weight: bold;
+	}
+.link-product2 {
+	font-size: small;
+	font-weight: bold;
+	}
+
+.link-nav-bar {
+	font-weight: bold;
+}
+
+.nav-bar {
+	padding: 4px 10px 0px 4px;
+}
+
+.nav-bar-current {
+	color: #A20303;
+	font-weight: bold;
+}
+
+.cart-header td {
+	background-color: #EBEBEB;
+	color: #000000;
+	font-weight: bold;
+	padding: 2px;
+	padding-left: 10px;
+	border-bottom: 1px solid #989898;
+}
+
+.cart-item td {
+	color: #000000;
+	padding:10px;
+	border-bottom: 1px solid #989898;
+}
+
+.cart-item-small td {
+	color: #000000;
+	padding: 2px 10px 2px 10px;
+	border-bottom: 1px solid #989898;
+}
+
+.cart-subtotal td {
+	color: #000000;
+	padding: 4px 10px 4px 10px;
+}
+
+.form-data {
+	width: auto;
+	margin: 10px;
+}
+
+.form-data td {
+	padding: 2px;
+	padding-right: 10px;
+	border: none;
+	vertical-align: middle;
+}
+
+.adv-search-form {
+	width: auto;
+	border: 1px solid #ccc;
+	display: table-inline;
+}
+
+.adv-search-form td {
+	padding: 5px 10px 5px 10px;
+	vertical-align: middle;
+	text-align: left;
+	border-bottom: 1px solid #aaa;
+}
+
+.warning {
+	border: 1px solid #A1060A;
+	padding: 20px;
+	margin-top: 5px;
+	margin-bottom: 5px;
+}
+.warning-text {
+	color: #A20303;
+	font-weight: bold;
+	font-size: 16px;
+}
+
+.notice {
+	border: 1px solid #23BC06;
+	padding: 20px;
+	margin-top: 5px;
+	margin-bottom: 5px;
+}
+.notice-text {
+	color: #23BC06;
+	font-weight: bold;
+	font-size: 16px;
+}
+
+.relevance-bar td {
+	border: 1px solid #FF0000;
+	padding: 0px;
+	margin: 0px;
+}
+
+.pagination-bar td {
+	padding: 5px;
+	font-weight: bold;
+}
+
+a.pagination-bar {
+	font-weight: bold;
+}
+
+.hidden {
+	display: none;
+}
+
+
+
+
+/* ---- Calendar ---- */
+
+.calendar {
+	font-family: tahoma,verdana,sans-serif;
+	color: #000;
+	font-size: 11px;
+	border: 1px solid #83B2C5;
+	width: 225px;
+	position: relative;
+	z-index: 1;
+	display: none;
+	cursor: default;
+
+}
+
+
+.calendar table {
+	/*font-family: tahoma,verdana,sans-serif;*/
+	color: #000;
+	font-size: 11px;
+	background-color: #fefefe;
+	width: auto;
+	cursor: default;
+	border-collapse: separate;
+
+}
+
+.calendar table td {
+	text-align: center;
+	padding: 2px;
+	text-align: center;
+}
+
+.calendar tbody .disabled {
+	color: #999;
+}
+
+.calendar tbody .emptyrow {
+	display: none;
+
+}
+
+.calendar tbody .today {
+	font-weight: bold;
+	background-color: #eeeeee;
+	border: 1px solid #aaaaaa !important;
+}
+
+.calendar tbody .emptycell {
+	visibility: hidden;
+}
+
+.calendar tbody .active {
+	background-color: red;
+}
+
+.calendar thead .title {
+	font-weight: bold;
+}
+
+.calendar thead .headrow {
+
+}
+
+.calendar thead .active {
+	background-color: #c4c0b8;
+	padding: 2px 0px 0px 2px;
+
+}
+
+
+
+.calendar thead .hilite {
+	background-color: #e4e0d8;
+}
+
+.calendar tfoot .title {
+	font-weight: normal;
+}
+
+.combo {  position: absolute;  display: none;  width: 4em;  top: 0px;  left: 0px;  cursor: default;  border-top: 1px solid #fff;  border-right: 1px solid #000;  border-bottom: 1px solid #000;  border-left: 1px solid #fff;  background: #e4e0d8;  font-size: smaller;  padding: 1px;}
+.combo .label {  text-align: center;  padding: 1px;}
+.combo .active {  background: #c4c0b8;  padding: 0px;  border-top: 1px solid #000;  border-right: 1px solid #fff;  border-bottom: 1px solid #fff;  border-left: 1px solid #000;}
+.combo .hilite {  background: #048;  color: #fea;}
+
+.dpContainer {
+	display: inline;
+
+}
+
+.list-no-squares {
+	padding: 0px;
+	list-style-type: none;
+	margin: 0px;
+}
+
+/* ---- /Calendar ---- */
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/inc/style.css
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/inc/calendar.js
===================================================================
--- branches/5.1.x/themes/onlinestore/inc/calendar.js	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/inc/calendar.js	(revision 12131)
@@ -0,0 +1,1320 @@
+var cbPath = "";
+             /*
+preloadImage(cbPath);
+preloadImage(cbPathO);
+preloadImage(cbPathA);
+*/
+
+//addScript("core.js");
+//addScript("lang.js");
+
+//addCss("wnd.css");
+//addCss("calendar.css");
+
+function initCalendar(id, dateFormat)
+{
+	var input = document.getElementById(id);
+	if (!input) return;
+	input.dateFormat = dateFormat;
+	var cbPath = input.getAttribute("datepickerIcon");
+	
+	var inputContainer = document.createElement("DIV");
+	inputContainer.className = "dpContainer";
+	inputContainer.noWrap = true;
+	var pNode = input.parentNode;
+	pNode.insertBefore(inputContainer, input.nextSibling);
+//	   inputContainer.appendChild(pNode.removeChild(input));
+
+	var calendarButton = document.createElement("IMG");
+	calendarButton.setAttribute("width", "19");
+	calendarButton.setAttribute("height", "15");
+	calendarButton.setAttribute("align", "absMiddle");
+	calendarButton.style.width=19
+	calendarButton.style.height=15
+	calendarButton.style.cursor = "hand";
+
+	calendarButton.setAttribute("hspace", 2);
+	calendarButton.src = cbPath;
+	calendarButton.style.paddingLeft = '10px';
+	calendarButton.onmouseover = cbMouseOver;
+	calendarButton.onmouseout = cbMouseOut;
+	calendarButton.onmouseup = calendarButton.onmouseout;
+	calendarButton.onmousedown = cbMouseDown;
+	calendarButton.showCalendar = wnd_showCalendar;
+	inputContainer.appendChild(calendarButton);
+	inputContainer.dateInput = input;
+}
+
+var calendar;
+
+function cbMouseOver(e)
+{
+	//   this.src = cbPathO;
+	var evt = (e) ? e : event; if (evt) evt.cancelBubble = true;
+}
+
+function cbMouseOut(e)
+{
+	//   this.src = cbPath;
+	var evt = (e) ? e : event; if (evt) evt.cancelBubble = true;
+}
+
+function cbMouseDown(e)
+{
+	//   this.src = cbPathA;
+	// alert("cbMouseDown");
+	var evt = (e) ? e : event; if (evt) evt.cancelBubble = true;
+	this.showCalendar();
+}
+
+function wnd_showCalendar()
+{
+	var el = this.parentNode.dateInput;
+	if (calendar != null) calendar.hide();
+	else
+	{
+		var calendarObject = new Calendar(false, null, dateSelected, closeHandler);
+		calendar = calendarObject;
+		calendarObject.setRange(1900, 2070);
+		calendarObject.create();
+	}
+	calendar.setDateFormat(el.dateFormat);
+	calendar.parseDate(el.value);
+	calendar.sel = el;
+	calendar.showAtElement(el);
+
+	Calendar.addEvent(document, "mousedown", checkCalendar);
+	return false;
+}
+
+function dateSelected(calendarObject, date)
+{
+	calendarObject.sel.value = date;
+	calendarObject.callCloseHandler();
+}
+
+function closeHandler(calendarObject)
+{
+	calendarObject.hide();
+	Calendar.removeEvent(document, "mousedown", checkCalendar);
+}
+
+function checkCalendar(ev)
+{
+	var el = Calendar.is_ie ? Calendar.getElement(ev) : Calendar.getTargetElement(ev);
+
+	for (; el != null; el = el.parentNode)
+	if (el == calendar.element || el.tagName == "A") break;
+
+	if (el == null)
+	{
+		calendar.callCloseHandler();
+		Calendar.stopEvent(ev);
+	}
+}
+
+function preloadImage(path)
+{
+	var img = new Image();
+	img.src = path;
+	preloadImages.push(img);
+}
+
+function addCss(path)
+{
+	path = cssPath + path;
+	document.write("<link rel='stylesheet' href='" + path + "' type='text/css'/>");
+}
+
+/*<CORE>*/
+/* Copyright Mihai Bazon, 2002
+* http://students.infoiasi.ro/~mishoo
+*
+* Version: 0.9.1
+*
+* Feel free to use this script under the terms of the GNU General Public
+* License, as long as you do not remove or alter this notice.
+*/
+
+/** The Calendar object constructor. */
+Calendar = function (mondayFirst, dateStr, onSelected, onClose) {
+	// member variables
+	this.activeDiv = null;
+	this.currentDateEl = null;
+	this.checkDisabled = null;
+	this.timeout = null;
+	this.onSelected = onSelected || null;
+	this.onClose = onClose || null;
+	this.dragging = false;
+	this.minYear = 1970;
+	this.maxYear = 2050;
+	this.dateFormat = Calendar._TT["DEF_DATE_FORMAT"];
+	this.ttDateFormat = Calendar._TT["TT_DATE_FORMAT"];
+	this.isPopup = true;
+	this.mondayFirst = mondayFirst;
+	this.dateStr = dateStr;
+	// HTML elements
+	this.table = null;
+	this.element = null;
+	this.tbody = null;
+	this.daynames = null;
+	// Combo boxes
+	this.monthsCombo = null;
+	this.yearsCombo = null;
+	this.hilitedMonth = null;
+	this.activeMonth = null;
+	this.hilitedYear = null;
+	this.activeYear = null;
+
+	// one-time initializations
+	if (!Calendar._DN3) {
+		// table of short day names
+		var ar = new Array();
+		for (var i = 8; i > 0;) {
+			ar[--i] = Calendar._DN[i].substr(0, 3);
+		}
+		Calendar._DN3 = ar;
+		// table of short month names
+		ar = new Array();
+		for (var i = 12; i > 0;) {
+			ar[--i] = Calendar._MN[i].substr(0, 3);
+		}
+		Calendar._MN3 = ar;
+	}
+};
+
+// ** constants
+
+/// "static", needed for event handlers.
+Calendar._C = null;
+
+/// detect a special case of "web browser"
+Calendar.is_ie = ( (navigator.userAgent.toLowerCase().indexOf("msie") != -1) &&
+(navigator.userAgent.toLowerCase().indexOf("opera") == -1) );
+
+// short day names array (initialized at first constructor call)
+Calendar._DN3 = null;
+
+// short month names array (initialized at first constructor call)
+Calendar._MN3 = null;
+
+// BEGIN: UTILITY FUNCTIONS; beware that these might be moved into a separate
+//        library, at some point.
+
+Calendar.getAbsolutePos = function(el) {
+	var r = { x: el.offsetLeft, y: el.offsetTop };
+	if (el.offsetParent) {
+		var tmp = Calendar.getAbsolutePos(el.offsetParent);
+		r.x += tmp.x;
+		r.y += tmp.y;
+	}
+	return r;
+};
+
+Calendar.isRelated = function (el, evt) {
+	var related = evt.relatedTarget;
+	if (!related) {
+		var type = evt.type;
+		if (type == "mouseover") {
+			related = evt.fromElement;
+		} else if (type == "mouseout") {
+			related = evt.toElement;
+		}
+	}
+	while (related) {
+		if (related == el) {
+			return true;
+		}
+		related = related.parentNode;
+	}
+	return false;
+};
+
+Calendar.removeClass = function(el, className) {
+	if (!(el && el.className)) {
+		return;
+	}
+	var cls = el.className.split(" ");
+	var ar = new Array();
+	for (var i = cls.length; i > 0;) {
+		if (cls[--i] != className) {
+			ar[ar.length] = cls[i];
+		}
+	}
+	el.className = ar.join(" ");
+};
+
+Calendar.addClass = function(el, className) {
+	el.className += " " + className;
+};
+
+Calendar.getElement = function(ev) {
+	if (Calendar.is_ie) {
+		return window.event.srcElement;
+	} else {
+		return ev.currentTarget;
+	}
+};
+
+Calendar.getTargetElement = function(ev) {
+	if (Calendar.is_ie) {
+		return window.event.srcElement;
+	} else {
+		return ev.target;
+	}
+};
+
+Calendar.stopEvent = function(ev) {
+	if (Calendar.is_ie) {
+		window.event.cancelBubble = true;
+		window.event.returnValue = false;
+	} else {
+		ev.preventDefault();
+		ev.stopPropagation();
+	}
+};
+
+Calendar.addEvent = function(el, evname, func) {
+	if (Calendar.is_ie) {
+		el.attachEvent("on" + evname, func);
+	} else {
+		el.addEventListener(evname, func, true);
+	}
+};
+
+Calendar.removeEvent = function(el, evname, func) {
+	if (Calendar.is_ie) {
+		el.detachEvent("on" + evname, func);
+	} else {
+		el.removeEventListener(evname, func, true);
+	}
+};
+
+Calendar.createElement = function(type, parent) {
+	var el = null;
+	if (document.createElementNS) {
+		// use the XHTML namespace; IE won't normally get here unless
+		// _they_ "fix" the DOM2 implementation.
+		el = document.createElementNS("http://www.w3.org/1999/xhtml", type);
+	} else {
+		el = document.createElement(type);
+	}
+	if (typeof parent != "undefined") {
+		parent.appendChild(el);
+	}
+	return el;
+};
+
+// END: UTILITY FUNCTIONS
+
+// BEGIN: CALENDAR STATIC FUNCTIONS
+
+/** Internal -- adds a set of events to make some element behave like a button. */
+Calendar._add_evs = function(el) {
+	with (Calendar) {
+		addEvent(el, "mouseover", dayMouseOver);
+		addEvent(el, "mousedown", dayMouseDown);
+		addEvent(el, "mouseout", dayMouseOut);
+		if (is_ie) {
+			addEvent(el, "dblclick", dayMouseDblClick);
+			el.setAttribute("unselectable", true);
+		}
+	}
+};
+
+Calendar.findMonth = function(el) {
+	if (typeof el.month != "undefined") {
+		return el;
+	} else if (typeof el.parentNode.month != "undefined") {
+		return el.parentNode;
+	}
+	return null;
+};
+
+Calendar.findYear = function(el) {
+	if (typeof el.year != "undefined") {
+		return el;
+	} else if (typeof el.parentNode.year != "undefined") {
+		return el.parentNode;
+	}
+	return null;
+};
+
+Calendar.showMonthsCombo = function () {
+	var cal = Calendar._C;
+	if (!cal) {
+		return false;
+	}
+	var cal = cal;
+	var cd = cal.activeDiv;
+	var mc = cal.monthsCombo;
+	if (cal.hilitedMonth) {
+		Calendar.removeClass(cal.hilitedMonth, "hilite");
+	}
+	if (cal.activeMonth) {
+		Calendar.removeClass(cal.activeMonth, "active");
+	}
+	var mon = cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];
+	Calendar.addClass(mon, "active");
+	cal.activeMonth = mon;
+	mc.style.left = cd.offsetLeft;
+	mc.style.top = cd.offsetTop + cd.offsetHeight;
+	mc.style.display = "block";
+};
+
+Calendar.showYearsCombo = function (fwd) {
+	var cal = Calendar._C;
+	if (!cal) {
+		return false;
+	}
+	var cal = cal;
+	var cd = cal.activeDiv;
+	var yc = cal.yearsCombo;
+	if (cal.hilitedYear) {
+		Calendar.removeClass(cal.hilitedYear, "hilite");
+	}
+	if (cal.activeYear) {
+		Calendar.removeClass(cal.activeYear, "active");
+	}
+	cal.activeYear = null;
+	var Y = cal.date.getFullYear() + (fwd ? 1 : -1);
+	var yr = yc.firstChild;
+	var show = false;
+	for (var i = 12; i > 0; --i) {
+		if (Y >= cal.minYear && Y <= cal.maxYear) {
+			yr.firstChild.data = Y;
+			yr.year = Y;
+			yr.style.display = "block";
+			show = true;
+		} else {
+			yr.style.display = "none";
+		}
+		yr = yr.nextSibling;
+		Y += fwd ? 2 : -2;
+	}
+	if (show) {
+		yc.style.left = cd.offsetLeft;
+		yc.style.top = cd.offsetTop + cd.offsetHeight;
+		yc.style.display = "block";
+	}
+};
+
+// event handlers
+
+Calendar.tableMouseUp = function(ev) {
+	var cal = Calendar._C;
+	if (!cal) {
+		return false;
+	}
+	if (cal.timeout) {
+		clearTimeout(cal.timeout);
+	}
+	var el = cal.activeDiv;
+	if (!el) {
+		return false;
+	}
+	var target = Calendar.getTargetElement(ev);
+	Calendar.removeClass(el, "active");
+	if (target == el || target.parentNode == el) {
+		Calendar.cellClick(el);
+	}
+	var mon = Calendar.findMonth(target);
+	var date = null;
+	if (mon) {
+		date = new Date(cal.date);
+		if (mon.month != date.getMonth()) {
+			date.setMonth(mon.month);
+			cal.setDate(date);
+		}
+	} else {
+		var year = Calendar.findYear(target);
+		if (year) {
+			date = new Date(cal.date);
+			if (year.year != date.getFullYear()) {
+				date.setFullYear(year.year);
+				cal.setDate(date);
+			}
+		}
+	}
+	with (Calendar) {
+		removeEvent(document, "mouseup", tableMouseUp);
+		removeEvent(document, "mouseover", tableMouseOver);
+		removeEvent(document, "mousemove", tableMouseOver);
+		cal._hideCombos();
+		stopEvent(ev);
+		_C = null;
+	}
+};
+
+Calendar.tableMouseOver = function (ev) {
+	var cal = Calendar._C;
+	if (!cal) {
+		return;
+	}
+	var el = cal.activeDiv;
+	var target = Calendar.getTargetElement(ev);
+	if (target == el || target.parentNode == el) {
+		Calendar.addClass(el, "hilite active");
+	} else {
+		Calendar.removeClass(el, "active");
+		Calendar.removeClass(el, "hilite");
+	}
+	var mon = Calendar.findMonth(target);
+	if (mon) {
+		if (mon.month != cal.date.getMonth()) {
+			if (cal.hilitedMonth) {
+				Calendar.removeClass(cal.hilitedMonth, "hilite");
+			}
+			Calendar.addClass(mon, "hilite");
+			cal.hilitedMonth = mon;
+		} else if (cal.hilitedMonth) {
+			Calendar.removeClass(cal.hilitedMonth, "hilite");
+		}
+	} else {
+		var year = Calendar.findYear(target);
+		if (year) {
+			if (year.year != cal.date.getFullYear()) {
+				if (cal.hilitedYear) {
+					Calendar.removeClass(cal.hilitedYear, "hilite");
+				}
+				Calendar.addClass(year, "hilite");
+				cal.hilitedYear = year;
+			} else if (cal.hilitedYear) {
+				Calendar.removeClass(cal.hilitedYear, "hilite");
+			}
+		}
+	}
+	Calendar.stopEvent(ev);
+};
+
+Calendar.tableMouseDown = function (ev) {
+	if (Calendar.getTargetElement(ev) == Calendar.getElement(ev)) {
+		Calendar.stopEvent(ev);
+	}
+};
+
+Calendar.calDragIt = function (ev) {
+	var cal = Calendar._C;
+	if (!(cal && cal.dragging)) {
+		return false;
+	}
+	var posX;
+	var posY;
+	if (Calendar.is_ie) {
+		posY = window.event.clientY + document.body.scrollTop;
+		posX = window.event.clientX + document.body.scrollLeft;
+	} else {
+		posX = ev.pageX;
+		posY = ev.pageY;
+	}
+	cal.hideShowCovered();
+	var st = cal.element.style;
+	st.left = (posX - cal.xOffs) + "px";
+	st.top = (posY - cal.yOffs) + "px";
+	Calendar.stopEvent(ev);
+};
+
+Calendar.calDragEnd = function (ev) {
+	var cal = Calendar._C;
+	if (!cal) {
+		return false;
+	}
+	cal.dragging = false;
+	with (Calendar) {
+		removeEvent(document, "mousemove", calDragIt);
+		removeEvent(document, "mouseover", stopEvent);
+		removeEvent(document, "mouseup", calDragEnd);
+		tableMouseUp(ev);
+	}
+	cal.hideShowCovered();
+};
+
+Calendar.dayMouseDown = function(ev) {
+	var el = Calendar.getElement(ev);
+	if (el.disabled) {
+		return false;
+	}
+	var cal = el.calendar;
+	cal.activeDiv = el;
+	Calendar._C = cal;
+	if (el.navtype != 300) with (Calendar) {
+		addClass(el, "hilite active");
+		addEvent(document, "mouseover", tableMouseOver);
+		addEvent(document, "mousemove", tableMouseOver);
+		addEvent(document, "mouseup", tableMouseUp);
+	} else if (cal.isPopup) {
+		cal._dragStart(ev);
+	}
+	Calendar.stopEvent(ev);
+	if (el.navtype == -1 || el.navtype == 1) {
+		cal.timeout = setTimeout("Calendar.showMonthsCombo()", 250);
+	} else if (el.navtype == -2 || el.navtype == 2) {
+		cal.timeout = setTimeout((el.navtype > 0) ? "Calendar.showYearsCombo(true)" : "Calendar.showYearsCombo(false)", 250);
+	} else {
+		cal.timeout = null;
+	}
+};
+
+Calendar.dayMouseDblClick = function(ev) {
+	Calendar.cellClick(Calendar.getElement(ev));
+	if (Calendar.is_ie) {
+		document.selection.empty();
+	}
+};
+
+Calendar.dayMouseOver = function(ev) {
+	var el = Calendar.getElement(ev);
+	if (Calendar.isRelated(el, ev) || Calendar._C || el.disabled) {
+		return false;
+	}
+	if (el.ttip) {
+		if (el.ttip.substr(0, 1) == "_") {
+			var date = null;
+			with (el.calendar.date) {
+				date = new Date(getFullYear(), getMonth(), el.caldate);
+			}
+			el.ttip = date.print(el.calendar.ttDateFormat) + el.ttip.substr(1);
+		}
+		el.calendar.tooltips.firstChild.data = el.ttip;
+	}
+	if (el.navtype != 300) {
+		Calendar.addClass(el, "hilite");
+	}
+	Calendar.stopEvent(ev);
+};
+
+Calendar.dayMouseOut = function(ev) {
+	with (Calendar) {
+		var el = getElement(ev);
+		if (isRelated(el, ev) || _C || el.disabled) {
+			return false;
+		}
+		removeClass(el, "hilite");
+		el.calendar.tooltips.firstChild.data = _TT["SEL_DATE"];
+		stopEvent(ev);
+	}
+};
+
+/**
+*  A generic "click" handler :) handles all types of buttons defined in this
+*  calendar.
+*/
+Calendar.cellClick = function(el) {
+	var cal = el.calendar;
+	var closing = false;
+	var newdate = false;
+	var date = null;
+	if (typeof el.navtype == "undefined") {
+		Calendar.removeClass(cal.currentDateEl, "selected");
+		Calendar.addClass(el, "selected");
+		closing = (cal.currentDateEl == el);
+		if (!closing) {
+			cal.currentDateEl = el;
+		}
+		cal.date.setDate(el.caldate);
+		date = cal.date;
+		newdate = true;
+	} else {
+		if (el.navtype == 200) {
+			Calendar.removeClass(el, "hilite");
+			cal.callCloseHandler();
+			return;
+		}
+		date = (el.navtype == 0) ? new Date() : new Date(cal.date);
+		var year = date.getFullYear();
+		var mon = date.getMonth();
+		var setMonth = function (mon) {
+			var day = date.getDate();
+			var max = date.getMonthDays();
+			if (day > max) {
+				date.setDate(max);
+			}
+			date.setMonth(mon);
+		};
+		switch (el.navtype) {
+			case -2:
+			if (year > cal.minYear) {
+				date.setFullYear(year - 1);
+			}
+			break;
+			case -1:
+			if (mon > 0) {
+				setMonth(mon - 1);
+			} else if (year-- > cal.minYear) {
+				date.setFullYear(year);
+				setMonth(11);
+			}
+			break;
+			case 1:
+			if (mon < 11) {
+				setMonth(mon + 1);
+			} else if (year < cal.maxYear) {
+				date.setFullYear(year + 1);
+				setMonth(0);
+			}
+			break;
+			case 2:
+			if (year < cal.maxYear) {
+				date.setFullYear(year + 1);
+			}
+			break;
+			case 100:
+			cal.setMondayFirst(!cal.mondayFirst);
+			return;
+		}
+		if (!date.equalsTo(cal.date)) {
+			cal.setDate(date);
+			newdate = el.navtype == 0;
+		}
+	}
+	if (newdate) {
+		cal.callHandler();
+	}
+	if (closing) {
+		Calendar.removeClass(el, "hilite");
+		cal.callCloseHandler();
+	}
+};
+
+// END: CALENDAR STATIC FUNCTIONS
+
+// BEGIN: CALENDAR OBJECT FUNCTIONS
+
+/**
+*  This function creates the calendar inside the given parent.  If _par is
+*  null than it creates a popup calendar inside the BODY element.  If _par is
+*  an element, be it BODY, then it creates a non-popup calendar (still
+*  hidden).  Some properties need to be set before calling this function.
+*/
+Calendar.prototype.create = function (_par) {
+	var parent = null;
+	if (! _par) {
+		// default parent is the document body, in which case we create
+		// a popup calendar.
+		parent = document.getElementsByTagName("body")[0];
+		this.isPopup = true;
+	} else {
+		parent = _par;
+		this.isPopup = false;
+	}
+	this.date = this.dateStr ? new Date(this.dateStr) : new Date();
+
+	var table = Calendar.createElement("table");
+	this.table = table;
+	table.cellSpacing = 0;
+	table.cellPadding = 0;
+	table.style.width = 'auto';
+	table.calendar = this;
+	Calendar.addEvent(table, "mousedown", Calendar.tableMouseDown);
+
+	var div = Calendar.createElement("div");
+	this.element = div;
+	div.className = "calendar";
+	if (this.isPopup) {
+		div.style.position = "absolute";
+		div.style.display = "none";
+	}
+	div.appendChild(table);
+
+	var thead = Calendar.createElement("thead", table);
+	var cell = null;
+	var row = null;
+
+	var cal = this;
+	var hh = function (text, cs, navtype) {
+		cell = Calendar.createElement("td", row);
+		cell.colSpan = cs;
+		cell.className = "calendar_button";
+		Calendar._add_evs(cell);
+		cell.calendar = cal;
+		cell.navtype = navtype;
+		if (text.substr(0, 1) != "&") {
+			cell.appendChild(document.createTextNode(text));
+		}
+		else {
+			// FIXME: dirty hack for entities
+			cell.innerHTML = text;
+		}
+		return cell;
+	};
+
+	row = Calendar.createElement("tr", thead);
+	row.className = "headrow";
+
+	hh("-", 1, 100).ttip = Calendar._TT["TOGGLE"];
+	this.title = hh("", this.isPopup ? 5 : 6, 300);
+	this.title.className = "title";
+	if (this.isPopup) {
+		this.title.ttip = Calendar._TT["DRAG_TO_MOVE"];
+		this.title.style.cursor = "move";
+		hh("X", 1, 200).ttip = Calendar._TT["CLOSE"];
+	}
+
+	row = Calendar.createElement("tr", thead);
+	row.className = "headrow";
+
+	hh("&#x00ab;", 1, -2).ttip = Calendar._TT["PREV_YEAR"];
+	hh("&#x2039;", 1, -1).ttip = Calendar._TT["PREV_MONTH"];
+	hh(Calendar._TT["TODAY"], 3, 0).ttip = Calendar._TT["GO_TODAY"];
+	hh("&#x203a;", 1, 1).ttip = Calendar._TT["NEXT_MONTH"];
+	hh("&#x00bb;", 1, 2).ttip = Calendar._TT["NEXT_YEAR"];
+
+	// day names
+	row = Calendar.createElement("tr", thead);
+	row.className = "daynames";
+	this.daynames = row;
+	for (var i = 7; i > 0; --i) {
+		cell = Calendar.createElement("td", row);
+		cell.appendChild(document.createTextNode(""));
+		if (!i) {
+			cell.navtype = 100;
+			cell.calendar = this;
+			Calendar._add_evs(cell);
+		}
+	}
+	this._displayWeekdays();
+
+	var tbody = Calendar.createElement("tbody", table);
+	this.tbody = tbody;
+
+	for (i = 6; i > 0; --i) {
+		row = Calendar.createElement("tr", tbody);
+		for (var j = 7; j > 0; --j) {
+			cell = Calendar.createElement("td", row);
+			cell.appendChild(document.createTextNode(""));
+			cell.calendar = this;
+			Calendar._add_evs(cell);
+		}
+	}
+
+	var tfoot = Calendar.createElement("tfoot", table);
+
+	row = Calendar.createElement("tr", tfoot);
+	row.className = "footrow";
+
+	cell = hh(Calendar._TT["SEL_DATE"], 7, 300);
+	cell.className = "title";
+	if (this.isPopup) {
+		cell.ttip = Calendar._TT["DRAG_TO_MOVE"];
+		cell.style.cursor = "move";
+	}
+	this.tooltips = cell;
+
+	div = Calendar.createElement("div", this.element);
+	this.monthsCombo = div;
+	div.className = "combo";
+	for (i = 0; i < Calendar._MN.length; ++i) {
+		var mn = Calendar.createElement("div");
+		mn.className = "label";
+		mn.month = i;
+		mn.appendChild(document.createTextNode(Calendar._MN3[i]));
+		div.appendChild(mn);
+	}
+
+	div = Calendar.createElement("div", this.element);
+	this.yearsCombo = div;
+	div.className = "combo";
+	for (i = 12; i > 0; --i) {
+		var yr = Calendar.createElement("div");
+		yr.className = "label";
+		yr.appendChild(document.createTextNode(""));
+		div.appendChild(yr);
+	}
+
+	this._init(this.mondayFirst, this.date);
+	parent.appendChild(this.element);
+};
+
+/**
+*  (RE)Initializes the calendar to the given date and style (if mondayFirst is
+*  true it makes Monday the first day of week, otherwise the weeks start on
+*  Sunday.
+*/
+Calendar.prototype._init = function (mondayFirst, date) {
+	var today = new Date();
+	var year = date.getFullYear();
+	if (year < this.minYear) {
+		year = this.minYear;
+		date.setFullYear(year);
+	} else if (year > this.maxYear) {
+		year = this.maxYear;
+		date.setFullYear(year);
+	}
+	this.mondayFirst = mondayFirst;
+	this.date = new Date(date);
+	var month = date.getMonth();
+	var mday = date.getDate();
+	var no_days = date.getMonthDays();
+	date.setDate(1);
+	var wday = date.getDay();
+	var MON = mondayFirst ? 1 : 0;
+	var SAT = mondayFirst ? 5 : 6;
+	var SUN = mondayFirst ? 6 : 0;
+	if (mondayFirst) {
+		wday = (wday > 0) ? (wday - 1) : 6;
+	}
+	var iday = 1;
+	var row = this.tbody.firstChild;
+	var MN = Calendar._MN3[month];
+	var hasToday = ((today.getFullYear() == year) && (today.getMonth() == month));
+	var todayDate = today.getDate();
+	for (var i = 0; i < 6; ++i) {
+		if (iday > no_days) {
+			row.className = "emptyrow";
+			row = row.nextSibling;
+			continue;
+		}
+		var cell = row.firstChild;
+		row.className = "daysrow";
+		for (var j = 0; j < 7; ++j) {
+			if ((!i && j < wday) || iday > no_days) {
+				cell.className = "emptycell";
+				cell = cell.nextSibling;
+				continue;
+			}
+			cell.firstChild.data = iday;
+			cell.className = "day";
+			cell.disabled = false;
+			if (typeof this.checkDisabled == "function") {
+				date.setDate(iday);
+				if (this.checkDisabled(date)) {
+					cell.className += " disabled";
+					cell.disabled = true;
+				}
+			}
+			if (!cell.disabled) {
+				cell.caldate = iday;
+				cell.ttip = "_";
+				if (iday == mday) {
+					cell.className += " selected";
+					this.currentDateEl = cell;
+				}
+				if (hasToday && (iday == todayDate)) {
+					cell.className += " today";
+					cell.ttip += Calendar._TT["PART_TODAY"];
+				}
+				if (wday == SAT || wday == SUN) {
+					cell.className += " weekend";
+				}
+			}
+			++iday;
+			((++wday) ^ 7) || (wday = 0);
+			cell = cell.nextSibling;
+		}
+		row = row.nextSibling;
+	}
+	this.title.firstChild.data = Calendar._MN[month] + ", " + year;
+	// PROFILE
+	// this.tooltips.firstChild.data = "Generated in " + ((new Date()) - today) + " ms";
+};
+
+/**
+*  Calls _init function above for going to a certain date (but only if the
+*  date is different than the currently selected one).
+*/
+Calendar.prototype.setDate = function (date) {
+	if (!date.equalsTo(this.date)) {
+		this._init(this.mondayFirst, date);
+	}
+};
+
+/** Modifies the "mondayFirst" parameter (EU/US style). */
+Calendar.prototype.setMondayFirst = function (mondayFirst) {
+	this._init(mondayFirst, this.date);
+	this._displayWeekdays();
+};
+
+/**
+*  Allows customization of what dates are enabled.  The "unaryFunction"
+*  parameter must be a function object that receives the date (as a JS Date
+*  object) and returns a boolean value.  If the returned value is true then
+*  the passed date will be marked as disabled.
+*/
+Calendar.prototype.setDisabledHandler = function (unaryFunction) {
+	this.checkDisabled = unaryFunction;
+};
+
+/** Customization of allowed year range for the calendar. */
+Calendar.prototype.setRange = function (a, z) {
+	this.minYear = a;
+	this.maxYear = z;
+};
+
+/** Calls the first user handler (selectedHandler). */
+Calendar.prototype.callHandler = function () {
+	if (this.onSelected) {
+		this.onSelected(this, this.date.print(this.dateFormat));
+	}
+};
+
+/** Calls the second user handler (closeHandler). */
+Calendar.prototype.callCloseHandler = function () {
+	if (this.onClose) {
+		this.onClose(this);
+	}
+	this.hideShowCovered();
+};
+
+/** Removes the calendar object from the DOM tree and destroys it. */
+Calendar.prototype.destroy = function () {
+	var el = this.element.parentNode;
+	el.removeChild(this.element);
+	Calendar._C = null;
+	delete el;
+};
+
+/**
+*  Moves the calendar element to a different section in the DOM tree (changes
+*  its parent).
+*/
+Calendar.prototype.reparent = function (new_parent) {
+	var el = this.element;
+	el.parentNode.removeChild(el);
+	new_parent.appendChild(el);
+};
+
+/** Shows the calendar. */
+Calendar.prototype.show = function () {
+	this.element.style.display = "block";
+	this.hideShowCovered();
+};
+
+/**
+*  Hides the calendar.  Also removes any "hilite" from the class of any TD
+*  element.
+*/
+Calendar.prototype.hide = function () {
+	var trs = this.table.getElementsByTagName("td");
+	for (var i = trs.length; i > 0; ) {
+		Calendar.removeClass(trs[--i], "hilite");
+	}
+	this.element.style.display = "none";
+};
+
+/**
+*  Shows the calendar at a given absolute position (beware that, depending on
+*  the calendar element style -- position property -- this might be relative
+*  to the parent's containing rectangle).
+*/
+Calendar.prototype.showAt = function (x, y) {
+	var s = this.element.style;
+	s.left = x + "px";
+	s.top = y + "px";
+	this.show();
+};
+
+/** Shows the calendar near a given element. */
+Calendar.prototype.showAtElement = function (el) {
+	var p = Calendar.getAbsolutePos(el);
+
+	var cw = 190;
+	var ch = -200;
+
+	if (Calendar.is_ie)
+	{
+		var posX = getWndX(el) + el.offsetWidth + 18; if (posX + ch > document.body.scrollLeft + document.body.offsetWidth) posX = document.body.scrollLeft + document.body.offsetWidth - ch
+		var posY = p.y + el.offsetHeight; if (posY + cw > document.body.scrollTop + document.body.offsetHeight) posY = getWndY(el) - cw;
+		//document.body.scrollTop + document.body.offsetHeight - cw - el.offsetHeight
+		this.showAt(posX, posY);
+	}
+	else
+	{
+		// for other browsers types
+		this.showAt(getWndX(el) + el.offsetWidth + 30, p.y + el.offsetHeight-200);
+	}
+};
+
+function getWndC(object, c)
+{
+	pos = 0;
+	while (object != null)
+	{
+		pos += (c == "y") ? object.offsetTop : object.offsetLeft;
+		object = object.offsetParent;
+	}
+	return pos;
+}
+
+function getWndX(object) {return getWndC(object, "x")}
+function getWndY(object) {return getWndC(object, "y")}
+
+
+/** Customizes the date format. */
+Calendar.prototype.setDateFormat = function (str) {
+	this.dateFormat = str;
+};
+
+/** Customizes the tooltip date format. */
+Calendar.prototype.setTtDateFormat = function (str) {
+	this.ttDateFormat = str;
+};
+
+/**
+*  Tries to identify the date represented in a string.  If successful it also
+*  calls this.setDate which moves the calendar to the given date.
+*/
+Calendar.prototype.parseDate = function (str, fmt) {
+	var y = 0;
+	var m = -1;
+	var d = 0;
+	var a = str.split(/\W+/);
+	if (!fmt) {
+		fmt = this.dateFormat;
+	}
+	var b = fmt.split(/\W+/);
+	var i = 0, j = 0;
+	for (i = 0; i < a.length; ++i) {
+		if (b[i] == "D" || b[i] == "DD") {
+			continue;
+		}
+		if (b[i] == "j" || b[i] == "d") {
+			d = a[i];
+		}
+		if (b[i] == "n" || b[i] == "m") {
+			m = a[i]-1;
+		}
+		//      if (b[i] == "y") {
+		//         y = a[i];
+		//      }
+		if ((b[i] == "Y")||(b[i] == "y")) {
+			//      if (b[i] == "yy") {
+			if (a[i].length == 4) {
+				y = a[i];
+			}
+			else {
+				if (parseInt(a[i]) < 70) {
+					y = parseInt(a[i]) + 2000;
+				}
+				else {
+					y = parseInt(a[i]) + 1900;
+				}
+			}
+		}
+		if (b[i] == "M" || b[i] == "MM") {
+			for (j = 0; j < 12; ++j) {
+				if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { m = j; break; }
+			}
+		}
+	}
+	if (y != 0 && m != -1 && d != 0) {
+		this.setDate(new Date(y, m, d));
+		return;
+	}
+	y = 0; m = -1; d = 0;
+	for (i = 0; i < a.length; ++i) {
+		if (a[i].search(/[a-zA-Z]+/) != -1) {
+			var t = -1;
+			for (j = 0; j < 12; ++j) {
+				if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { t = j; break; }
+			}
+			if (t != -1) {
+				if (m != -1) {
+					d = m+1;
+				}
+				m = t;
+			}
+		} else if (parseInt(a[i]) <= 12 && m == -1) {
+			m = a[i]-1;
+		} else if (parseInt(a[i]) > 31 && y == 0) {
+			y = a[i];
+		} else if (d == 0) {
+			d = a[i];
+		}
+	}
+	if (y == 0) {
+		var today = new Date();
+		y = today.getFullYear();
+	}
+	if (m != -1 && d != 0) {
+		this.setDate(new Date(y, m, d));
+	}
+};
+
+Calendar.prototype.hideShowCovered = function () {
+	var tags = new Array("applet", "iframe", "select");
+	var el = this.element;
+
+	var p = Calendar.getAbsolutePos(el);
+	var EX1 = p.x;
+	var EX2 = el.offsetWidth + EX1;
+	var EY1 = p.y;
+	var EY2 = el.offsetHeight + EY1;
+
+	for (var k = tags.length; k > 0; ) {
+		var ar = document.getElementsByTagName(tags[--k]);
+		var cc = null;
+
+		for (var i = ar.length; i > 0;) {
+			cc = ar[--i];
+
+			p = Calendar.getAbsolutePos(cc);
+			var CX1 = p.x;
+			var CX2 = cc.offsetWidth + CX1;
+			var CY1 = p.y;
+			var CY2 = cc.offsetHeight + CY1;
+
+			if ((CX1 > EX2) || (CX2 < EX1) || (CY1 > EY2) || (CY2 < EY1)) {
+				cc.style.visibility = "visible";
+			} else {
+				cc.style.visibility = "hidden";
+			}
+		}
+	}
+};
+
+/** Internal function; it displays the bar with the names of the weekday. */
+Calendar.prototype._displayWeekdays = function () {
+	var MON = this.mondayFirst ? 0 : 1;
+	var SUN = this.mondayFirst ? 6 : 0;
+	var SAT = this.mondayFirst ? 5 : 6;
+	var cell = this.daynames.firstChild;
+	for (var i = 0; i < 7; ++i) {
+		cell.className = "day name";
+		if (!i) {
+			cell.ttip = this.mondayFirst ? Calendar._TT["SUN_FIRST"] : Calendar._TT["MON_FIRST"];
+			cell.navtype = 100;
+			cell.calendar = this;
+			Calendar._add_evs(cell);
+		}
+		if (i == SUN || i == SAT) {
+			Calendar.addClass(cell, "weekend");
+		}
+		cell.firstChild.data = Calendar._DN3[i + 1 - MON];
+		cell = cell.nextSibling;
+	}
+};
+
+/** Internal function.  Hides all combo boxes that might be displayed. */
+Calendar.prototype._hideCombos = function () {
+	this.monthsCombo.style.display = "none";
+	this.yearsCombo.style.display = "none";
+};
+
+/** Internal function.  Starts dragging the element. */
+Calendar.prototype._dragStart = function (ev) {
+	if (this.dragging) {
+		return;
+	}
+	this.dragging = true;
+	var posX;
+	var posY;
+	if (Calendar.is_ie) {
+		posY = window.event.clientY + document.body.scrollTop;
+		posX = window.event.clientX + document.body.scrollLeft;
+	} else {
+		posY = ev.clientY + window.scrollY;
+		posX = ev.clientX + window.scrollX;
+	}
+	var st = this.element.style;
+	this.xOffs = posX - parseInt(st.left);
+	this.yOffs = posY - parseInt(st.top);
+	with (Calendar) {
+		addEvent(document, "mousemove", calDragIt);
+		addEvent(document, "mouseover", stopEvent);
+		addEvent(document, "mouseup", calDragEnd);
+	}
+};
+
+// BEGIN: DATE OBJECT PATCHES
+
+/** Adds the number of days array to the Date object. */
+Date._MD = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
+
+/** Returns the number of days in the current month */
+Date.prototype.getMonthDays = function() {
+	var year = this.getFullYear();
+	var month = this.getMonth();
+	if (((0 == (year%4)) && ( (0 != (year%100)) || (0 == (year%400)))) && month == 1) {
+		return 29;
+	} else {
+		return Date._MD[month];
+	}
+};
+
+/** Checks dates equality (ignores time) */
+Date.prototype.equalsTo = function(date) {
+	return ((this.getFullYear() == date.getFullYear()) &&
+	(this.getMonth() == date.getMonth()) &&
+	(this.getDate() == date.getDate()));
+};
+
+/** Prints the date in a string according to the given format. */
+Date.prototype.print = function (frm) {
+	var str = new String(frm);
+	var m = this.getMonth();
+	var d = this.getDate();
+	var y = this.getFullYear();
+	var w = this.getDay();
+	var s = new Array();
+	s["j"] = d;
+	s["d"] = (d < 10) ? ("0" + d) : d;
+	s["n"] = 1+m;
+	s["m"] = (m < 9) ? ("0" + (1+m)) : (1+m);
+	s["Y"] = y;
+	s["y"] = new String(y).substr(2, 2);
+	with (Calendar) {
+		s["D"] = _DN3[w];
+		s["DD"] = _DN[w];
+		s["M"] = _MN3[m];
+		s["MM"] = _MN[m];
+	}
+	var re = /(.*)(\W|^)(j|d|n|m|y|Y|MM|M|DD|D)(\W|$)(.*)/;
+	while (re.exec(str) != null) {
+		str = RegExp.$1 + RegExp.$2 + s[RegExp.$3] + RegExp.$4 + RegExp.$5;
+	}
+	return str;
+};
+
+// END: DATE OBJECT PATCHES
+/*</CORE>*/
+/*<LANG>*/
+Calendar._DN = new Array
+("Sunday",
+"Monday",
+"Tuesday",
+"Wednesday",
+"Thursday",
+"Friday",
+"Saturday",
+"Sunday");
+Calendar._MN = new Array
+("January",
+"February",
+"March",
+"April",
+"May",
+"June",
+"July",
+"August",
+"September",
+"October",
+"November",
+"December");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "Toggle first day of week";
+Calendar._TT["PREV_YEAR"] = "Prev. year (hold for menu)";
+Calendar._TT["PREV_MONTH"] = "Prev. month (hold for menu)";
+Calendar._TT["GO_TODAY"] = "Go Today";
+Calendar._TT["NEXT_MONTH"] = "Next month (hold for menu)";
+Calendar._TT["NEXT_YEAR"] = "Next year (hold for menu)";
+Calendar._TT["SEL_DATE"] = "Select date";
+Calendar._TT["DRAG_TO_MOVE"] = "Drag to move";
+Calendar._TT["PART_TODAY"] = " (today)";
+Calendar._TT["MON_FIRST"] = "Display Monday first";
+Calendar._TT["SUN_FIRST"] = "Display Sunday first";
+Calendar._TT["CLOSE"] = "Close";
+Calendar._TT["TODAY"] = "Today";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd";
+Calendar._TT["TT_DATE_FORMAT"] = "D, M d";
+/*</LANG>*/
+/*</CSS>*/
+//document.write("<style type=\"text/css\">")
+//document.write(".calendar { width: 225px; z-Index: 1; position: relative;  display: none;  border-top: 2px solid #fff;  border-right: 2px solid #000;  border-bottom: 2px solid #000;  border-left: 2px solid #fff;  font-size: 11px;  color: #000;  cursor: default;  background: #d4d0c8;  font-family: tahoma,verdana,sans-serif;}.calendar table {  width: auto; border-top: 1px solid #000;  border-right: 1px solid #fff;  border-bottom: 1px solid #fff;  border-left: 1px solid #000;  font-size: 11px;  color: #000;  cursor: default;  background: #d4d0c8;  font-family: tahoma,verdana,sans-serif;}/* Header part -- contains navigation buttons and day names. */.calendar .calendar_button { text-align: center;  padding: 1px;  border-top: 1px solid #fff;  border-right: 1px solid #000;  border-bottom: 1px solid #000;  border-left: 1px solid #fff;}.calendar thead .title { font-weight: bold;  padding: 1px;  border: 1px solid #000;  background: #848078;  color: #fff;  text-align: center;}.calendar thead .headrow { /* Row <TR> containing navigation buttons */}.calendar thead .daynames { /* Row <TR> containing the day names */}.calendar thead .name { /* Cells <TD> containing the day names */  border-bottom: 1px solid #000;  padding: 2px;  text-align: center;  background: #f4f0e8;}.calendar thead .weekend { /* How a weekend day name shows in header */  color: #f00;}.calendar thead .hilite { /* How do the buttons in header appear when hover */  border-top: 2px solid #fff;  border-right: 2px solid #000;  border-bottom: 2px solid #000;  border-left: 2px solid #fff;  padding: 0px;  background: #e4e0d8;}.calendar thead .active { /* Active (pressed) buttons in header */  padding: 2px 0px 0px 2px;  border-top: 1px solid #000;  border-right: 1px solid #fff;  border-bottom: 1px solid #fff;  border-left: 1px solid #000;  background: #c4c0b8;}/* The body part -- contains all the days in month. */.calendar tbody .day { /* Cells <TD> containing month days dates */  width: 2em;  text-align: right;  padding: 2px 4px 2px 2px;}.calendar tbody .hilite { /* Hovered cells <TD> */  padding: 1px 3px 1px 1px;  border-top: 1px solid #fff;  border-right: 1px solid #000;  border-bottom: 1px solid #000;  border-left: 1px solid #fff;}.calendar tbody .active { /* Active (pressed) cells <TD> */  padding: 2px 2px 0px 2px;  border-top: 1px solid #000;  border-right: 1px solid #fff;  border-bottom: 1px solid #fff;  border-left: 1px solid #000;}.calendar tbody .selected { /* Cell showing selected date */  font-weight: bold;  border-top: 1px solid #000;  border-right: 1px solid #fff;  border-bottom: 1px solid #fff;  border-left: 1px solid #000;  padding: 2px 2px 0px 2px;  background: #e4e0d8;}.calendar tbody .weekend { /* Cells showing weekend days */  color: #f00;}.calendar tbody .today { /* Cell showing today date */  font-weight: bold;  color: #00f;}.calendar tbody .disabled { color: #999; }.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */  visibility: hidden;}.calendar tbody .emptyrow { display: none;} .calendar tfoot .footrow { }.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */  background: #f4f0e8;  padding: 1px;  border: 1px solid #000;  background: #848078;  color: #fff;  text-align: center;}.calendar tfoot .hilite { /* Hover style for buttons in footer */  border-top: 1px solid #fff;  border-right: 1px solid #000;  border-bottom: 1px solid #000;  border-left: 1px solid #fff;  padding: 1px;  background: #e4e0d8;}.calendar tfoot .active { /* Active (pressed) style for buttons in footer */  padding: 2px 0px 0px 2px;  border-top: 1px solid #000;  border-right: 1px solid #fff;  border-bottom: 1px solid #fff;  border-left: 1px solid #000;}/* Combo boxes (menus that display months/years for direct selection) */.combo {  position: absolute;  display: none;  width: 4em;  top: 0px;  left: 0px;  cursor: default;  border-top: 1px solid #fff;  border-right: 1px solid #000;  border-bottom: 1px solid #000;  border-left: 1px solid #fff;  background: #e4e0d8;  font-size: smaller;  padding: 1px;}.combo .label {  text-align: center;  padding: 1px;}.combo .active {  background: #c4c0b8;  padding: 0px;  border-top: 1px solid #000;  border-right: 1px solid #fff;  border-bottom: 1px solid #fff;  border-left: 1px solid #000;}.combo .hilite {  background: #048;  color: #fea;}");
+//document.write(".dpContainer {display: inline;}");
+//document.write("</style>")
+/* The main calendar widget.  DIV containing a table. */
+

Property changes on: branches/5.1.x/themes/onlinestore/inc/calendar.js
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/no_permission.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/no_permission.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/no_permission.tpl	(revision 12131)
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_comm_NoPermissions"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+	<tr>
+		<td class="main-column-center" valign="top">
+
+			<inp2:m_include template="platform/blocks/login/no_permission_warning" />
+
+		</td>
+		<td class="main-column-right" valign="top">
+
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" />
+
+			<inp2:m_include template="platform/blocks/common/login" />
+
+			<inp2:m_include template="in-commerce/blocks/products/products_top_sellers" data_exists="1"/>
+
+			<inp2:m_include template="platform/blocks/common/mailing_list"/>
+
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/no_permission.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/redirect.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/redirect.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/redirect.tpl	(revision 12131)
@@ -0,0 +1,74 @@
+<inp2:m_SetDefaultCategory module="In-Commerce"/>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title><inp2:conf_ConfigValue name="Site_Name"/></title>
+	<inp2:m_include template="platform/blocks/common/html_head" />
+	<script type="text/javascript">
+		function exec_refresh()
+		{
+			window.status = "Redirecting..." + myvar;
+			myvar = myvar + " .";
+			var timerID = setTimeout("exec_refresh();", 100);
+			if (timeout > 0)
+			{
+				timeout -= 1;
+			}
+			else
+			{
+				clearTimeout(timerID);
+				window.status = "";
+				window.location = "<inp2:m_get name="redirect_to_js"/>";
+			}
+		}
+
+		var myvar = "";
+		var timeout = 20;
+		exec_refresh();
+	</script>
+</head>
+
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+  <tr>
+    <td class="main-column-left" valign="top">
+
+		<inp2:m_include template="in-commerce/blocks/categories/categories_home" data_exists="1" />
+
+		<inp2:m_include template="platform/blocks/common/credit_cards" />
+
+    </td>
+    <td class="main-column-center" valign="top">
+
+    	<inp2:m_include template="platform/blocks/common/redirect" />
+
+    </td>
+    <td class="main-column-right" valign="top">
+
+    	<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" />
+
+    	<inp2:m_include template="platform/blocks/common/login" />
+
+    	<inp2:m_include template="in-commerce/blocks/misc/register_as_affiliate" />
+
+    	<inp2:m_include template="in-commerce/blocks/products/products_top_sellers" data_exists="1"/>
+
+		<inp2:m_include template="platform/blocks/common/recommend_site"/>
+
+		<inp2:m_include template="platform/blocks/common/mailing_list"/>
+
+    </td>
+  </tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/redirect.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/error_notfound.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/error_notfound.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/error_notfound.tpl	(revision 12131)
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: <inp2:m_Phrase label="lu_error_404_title"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body> 
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table"> 
+	<tr> 
+		<td class="main-column-center" valign="top">
+			
+			<inp2:m_include template="platform/blocks/common/not_found_warning" />
+	
+		</td>
+		<td class="main-column-right" valign="top">
+			
+			<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" />
+	
+			<inp2:m_include template="platform/blocks/common/login" />
+	
+			<inp2:m_include template="in-commerce/blocks/products/products_top_sellers" data_exists="1"/>
+	
+			<inp2:m_include template="platform/blocks/common/mailing_list"/>
+		  
+		</td>
+	</tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/error_notfound.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/index.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/index.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/index.tpl	(revision 12131)
@@ -0,0 +1,55 @@
+<inp2:m_SetDefaultCategory module="In-Commerce"/>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/></title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body>
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table">
+  <tr>
+    <td class="main-column-left" valign="top">
+
+		<inp2:m_include template="in-commerce/blocks/categories/categories_home" data_exists="1" />
+
+		<inp2:m_include template="platform/blocks/common/credit_cards" />
+
+    </td>
+    <td class="main-column-center" valign="top">
+
+    	<inp2:m_include template="in-commerce/blocks/products/products_featured" data_exists="1"/>
+
+    	<inp2:m_include template="in-commerce/blocks/products/products_new" data_exists="1"/>
+
+    	<inp2:m_include template="in-commerce/blocks/products/products_picks" data_exists="1"/>
+
+    </td>
+    <td class="main-column-right" valign="top">
+
+    	<inp2:m_include template="in-commerce/blocks/checkout/cart_indicator" />
+
+    	<inp2:m_include template="platform/blocks/common/login" />
+
+    	<inp2:m_include template="in-commerce/blocks/misc/register_as_affiliate" />
+
+    	<inp2:m_include template="in-commerce/blocks/products/products_top_sellers" data_exists="1"/>
+
+		<inp2:m_include template="platform/blocks/common/recommend_site"/>
+
+		<inp2:m_include template="platform/blocks/common/mailing_list"/>
+
+    </td>
+  </tr>
+</table>
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>

Property changes on: branches/5.1.x/themes/onlinestore/index.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.8
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/themes/onlinestore/phrases_edit.tpl
===================================================================
--- branches/5.1.x/themes/onlinestore/phrases_edit.tpl	(nonexistent)
+++ branches/5.1.x/themes/onlinestore/phrases_edit.tpl	(revision 12131)
@@ -0,0 +1,37 @@
+<inp2:m_if check="m_ConstOn" const="DBG_PHRASES">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<title><inp2:conf_ConfigValue name="Site_Name"/> :: </title>
+<inp2:m_include template="platform/blocks/common/html_head" />
+</head>
+<body> 
+
+<inp2:m_include template="platform/blocks/common/header" />
+
+<inp2:m_include template="platform/blocks/common/toolbar" />
+
+<table class="main-table"> 
+  <tr> 
+    <td class="main-column-center"> 
+    		
+    	<inp2:m_include template="platform/blocks/common/form_phrase"/>
+		
+	</td>
+    <td class="main-column-right">
+
+    	
+    	
+    		
+	</td> 
+  </tr> 
+</table> 
+
+<inp2:m_include template="platform/blocks/common/footer" />
+
+<inp2:m_include template="platform/blocks/common/copyright" />
+
+</body>
+</html>
+</inp2:m_if>
\ No newline at end of file

Property changes on: branches/5.1.x/themes/onlinestore/phrases_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/LICENSE
===================================================================
--- branches/5.1.x/in-commerce/LICENSE	(nonexistent)
+++ branches/5.1.x/in-commerce/LICENSE	(revision 12131)
@@ -0,0 +1,250 @@
+In-Commerce is a commecial module of In-Portal software that provides
+enterprise level Online Shopping cart and store management solution.
+
+This is NOT a free program and protected by copyrights law.
+
+Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+
+
+LICENSE & DISCLAIMERS
+
+INTECHNIC CORPORATION, IN-COMMERCE, IN-AUCTION
+
+SOFTWARE END USER LICENSE AGREEMENT
+
+IMPORTANT: THIS SOFTWARE END USER LICENSE AGREEMENT IS A
+LEGAL AGREEMENT BETWEEN YOU (LICENSEE) AND INTECHNIC
+CORPORATION. READ IT CAREFULLY BEFORE DOWNLOADING,
+INSTALLING AND USING THE SOFTWARE. IT PROVIDES A LICENSE TO USE
+THE SOFTWARE AND CONTAINS WARRANTY INFORMATION AND
+LIABILITY DISCLAIMERS. BY DOWNLOADING, INSTALLING AND USING
+THE SOFTWARE, YOU ARE CONFIRMING YOUR ACCEPTANCE OF THE
+SOFTWARE AND AGREEING TO BECOME BOUND BY THE TERMS OF THIS
+END USER LICENSE AGREEMENT.
+
+
+2.1. Recitals
+
+(a) Intechnic is the owner of the Software and Documentation (as defined below).
+(b) Intechnic desires to grant to you and you desire to obtain from Intechnic a nonexclusive
+license to use the Software and Documentation solely in accordance with
+the terms and on the conditions set forth in this End User License Agreement.
+NOW, THEREFORE, the parties hereto agree as follows:
+
+
+2.2. Definitions
+
+(a) "Intechnic" means Intechnic Corporation.
+(b) "You" means Licensee, the end user of the Software: the customer purchasing or
+downloading the Software.
+(c) "Software" means the Intechnic In-portal software program supplied by Intechnic
+herewith, which may also include online and electronic documentation. The term
+"Software" also includes In-Commerce and In-Auction supplied by Intechnic herewith
+in conjunction with the Intechnic In-Portal, software program.
+(d) "Documentation" shall mean all manuals, user documentation, and other related
+materials pertaining to the Software which are furnished to you by Intechnic in
+connection with the Software.
+(e) "Intechnic", "In-Commerce" and "In-Auction" are trademarks or registered
+trademarks of Intechnic Corporation in the United States and/or other countries.
+Other marks are the properties of their respective owners.
+
+
+2.3. License Agreement
+
+Intechnic Corporation hereby grants you the right to use all or a portion of Software
+accompanying this License, regardless of media, and the related Documentation. All rights
+of any kind in Software, which are not expressly granted in this License, are entirely and
+exclusively reserved to and by Intechnic Corporation. You may not rent, lease, reverse
+engineer or create other branded software for resale based on the Software.
+This License Agreement permits you to:
+(a) Install and use the Software on a single computer; OR install and store the Software
+on a storage device, such as a network server, used only to run or install the Software
+on your other computers over an internal network, provided you have a license for
+each separate computer on which the Software is installed or run from the storage
+device. A license for the Software may not be shared or used concurrently on
+different computers or on different servers.
+(b) Make one copy of the Software in machine-readable form solely for backup
+purposes. You must reproduce on any such copy all copyright notices and any other
+proprietary legends on the original copy of the Software.
+
+
+2.4. License Restrictions
+
+This computer program is protected by copyright law and international treaties.
+Unauthorized reproduction or unlicensed usage of the code of this program, or any portion
+of it may result in severe civil and criminal penalties, and will be prosecuted to the maximum
+extent possible under the law.
+(a) Other than as set forth in Section III, you may not make or distribute copies of the
+Software, or electronically transfer the Software from one computer to another or
+over a network.
+(b) You may not decompile, reverse engineer, disassemble, or otherwise reduce the
+obfuscated portions of the Software to a human-perceivable form.
+(c) You may not rent, lease, sublicense or create other branded software for resale based
+on this Software, unless expressly permitted by Intechnic Corporation.
+(d) You may not export the Software into any country prohibited by the United States
+Export Administration Act and the regulations hereunder.
+(e) In the event that you fail to comply with this End User License Agreement,
+Intechnic may terminate the license and you must destroy all copies of the Software.
+
+
+2.5. License Term
+
+This license will become effective on the date you purchase the Software and will
+remain in force until terminated. You may terminate the license at any time by removing the
+Software from your computer and destroying the original Software and all copies. This
+license will automatically terminate if you breach any of the terms or conditions set out in
+this License Agreement. You agree to remove the Software from your computer, and
+destroy the original Software and all copies of the Software, upon termination of this license
+for any reason.
+
+
+2.6. License Transfer
+
+You may transfer your license of the Software to another party by transferring the
+original program media and all applicable documentation, including the original of this End
+User License Agreement, to the recipient, who agrees to the terms of this End User License
+Agreement. All other copies of the Software must be deleted and/or destroyed. Any
+transfer of possession of the Software terminates your license and all associated benefits
+under this End User License Agreement. You must notify Intechnic in writing or by e-mail
+of such transfer.
+
+
+2.7. Title and Ownership
+
+The foregoing license gives you limited rights to use the Software. Title, ownership
+rights, and intellectual property rights, including all copyrights, in and to the Software and
+documentation and derivative works, if any, shall remain the property of Intechnic
+Corporation. All rights not specifically granted in this End User License Agreement,
+including Federal and International Copyrights, are reserved by Intechnic Corporation
+You agree to respect and not to remove, obliterate, or cancel from view any copyright,
+trademark, confidentiality or other proprietary notice, mark, or legend appearing on any of
+the Software or output generated by the Software, and to reproduce and include same on
+each copy of the Software, unless expressly permitted by Intechnic Corporation.
+
+
+2.8. Limited Warranty and Disclaimer.
+
+(a) LIMITED WARRANTY. INTECHNIC WARRANTS THAT, FOR A PERIOD
+OF THIRTY (30) DAYS FROM THE DATE OF PURCHASE (AS
+EVIDENCED BY A COPY OF YOUR PURCHASE RECEIPT): (I) WHEN
+USED WITH A RECOMMENDED ENVIRONMENT AND HARDWARE
+CONFIGURATION, THE SOFTWARE WILL PERFORM IN SUBSTANTIAL
+CONFORMANCE WITH THE DOCUMENTATION SUPPLIED WITH THE
+SOFTWARE; AND (II) THAT THE SOFTWARE WILL NOT BE TAMPERED
+WITH OR ALTERED IN ANY WAY OR ABUSE OR MISAPPLICATION.
+(b) NO OTHER WARRANTY. EXCEPT AS SET FORTH IN THE FOREGOING
+LIMITED WARRANTY, INTECHNIC CORPORATION DISCLAIMS ALL
+OTHER WARRANTIES, EITHER EXPRESS OR IMPLIED, OR OTHERWISE
+INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE. ALSO, THERE IS NO WARRANTY OF
+NONINFRINGEMENT, TITLE OR QUIET ENJOYMENT. IF APPLICABLE
+LAW IMPLIES ANY WARRANTIES WITH RESPECT TO THE SOFTWARE,
+ALL SUCH WARRANTIES ARE LIMITED IN DURATION TO THIRTY (30)
+DAYS FROM THE DATE OF PURCHASE. NO ORAL OR WRITTEN
+INFORMATION OR ADVICE GIVEN BY INTECHNIC, ITS EMPLOYEES,
+DISTRIBUTORS, AGENTS OR DEALERS SHALL CREATE A WARRANTY
+OR IN ANY WAY INCREASE THE SCOPE OF THIS WARRANTY.
+
+
+2.9. Exclusive Remedy
+
+Intechnic Corporation offers limited and conditional refunds for downloadable
+Software purchases in case the Software does not perform on the customer's server
+satisfying the recommended server, hardware or environment configuration and according to
+the provided documentation. Intechnic will use reasonable commercial efforts to supply you
+with a replacement copy of the Software that substantially conforms to the documentation,
+provide installation, configuration or programming services to fix the problem, or refund to
+you your purchase price for the Software, at its option. Intechnic shall have no
+responsibility if the Software has been tampered with or altered in any way, abused or
+misapplied, or if the failure arises out of use of the Software with other than a recommended
+server, hardware or environment configuration.
+
+
+2.10. Limitation of Liability
+
+(a) IN NO EVENT SHALL INTECHNIC CORPORATION, OR ITS PRINCIPALS,
+SHAREHOLDERS, OFFICERS, EMPLOYEES, AFFILIATES, CONTRACTORS,
+SUBSIDIARIES, OR PARENT ORGANIZATIONS, BE LIABLE FOR ANY
+INCIDENTAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES
+(INCLUDING DAMAGES FOR LOSS OF BUSINESS, LOSS OF PROFITS,
+BUSINESS, INTERRUPTION OR THE LIKE), ARISING OUT OF THE USE
+OR INABILITY TO USE THE SOFTWARE, OR THIS END USER LICENSE
+AGREEMENT BASED ON ANY THEORY OF LIABILITY INCLUDING
+BREACH OF CONTRACT, BREACH OF WARRANTY, TORT (INCLUDING
+NEGLIGENCE), PRODUCT LIABILITY OR OTHERWISE, EVEN IF
+INTECHNIC CORPORATION OR ITS REPRESENTATIVES HAVE BEEN
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND EVEN IF A
+REMEDY SET FORTH HEREIN IS FOUND TO HAVE FAILED OF ITS
+ESSENTIAL PURPOSE. IN ADDITION, IN NO EVENT DOES INTECHNIC
+CORPORATION AUTHORIZE YOU TO USE THE SOFTWARE IN
+APPLICATIONS OR SYSTEMS WHERE THE SOFTWARE’S FAILURE TO
+PERFORM CAN REASONABLY BE EXPECTED TO RESULT IN A
+SIGNIFICANT PHYSICAL INJURY, OR IN LOSS OF LIFE. ANY SUCH USE
+BY YOU IS ENTIRELY AT YOUR OWN RISK, AND YOU AGREE TO
+HOLD INTECHNIC CORPORATION HARMLESS FROM ANY CLAIMS OR
+LOSSES RELATING TO SUCH UNAUTHORIZED USE.
+(b) TOTAL LIABILITY TO YOU FOR ACTUAL DAMAGES FOR ANY CAUSE
+WHATSOEVER WILL BE LIMITED TO THE AMOUNT PAID BY YOU FOR
+THE SOFTWARE THAT CAUSED SUCH DAMAGE.
+
+
+2.11. Upgrades
+
+If this copy of the Software is an upgrade from an earlier version of the Software, it is
+provided to you on a license exchange basis. You agree by installation and use of this copy
+of the Software to voluntarily terminate the earlier End User License Agreement and that
+you will not transfer it to another person or entity.
+
+
+2.12. Export Controls
+
+You may not download or otherwise export or re-export the Software or any underlying
+information or technology except in full compliance with all United States and other
+applicable laws and regulations. In particular, but without limitation, none of the Software
+or underlying information or technology may be downloaded or otherwise exported or reexported
+(i) into (or to a national or resident of) Cuba, Haiti, Iraq, Libya, Yugoslavia, North
+Korea, Iran, Syria or any other country to which the U.S. has embargoed goods; or (ii) to
+anyone on the U.S. Treasury Department's list of Specially Designated Nationals or the U.S.
+Commerce Department's Table of Deny Orders. By downloading or using the Software,
+you are agreeing to the foregoing and you are representing and warranting that you are not
+located in, under the control of, or a national or resident of any such country or on any such
+list.
+
+
+2.13. Severability
+
+The provisions of this Agreement shall be deemed severable, and the invalidity or
+unenforceability of any one or more of the provisions hereof shall not affect the validity and
+enforceability of the other provisions hereof. If any provision of this Agreement is held to
+be unenforceable for any reason, such provision shall be reformed only to the extent
+necessary to make it enforceable, and such decision shall not affect the enforceability (i) of
+such provision under other circumstances or (ii) of the remaining provisions hereof under all
+circumstances. Headings shall not be considered in interpreting this Agreement.
+
+
+2.14. Governing Law
+
+This Agreement is the complete statement of the Agreement between the parties on the
+subject matter, and merges and supersedes all other or prior understandings, purchase orders,
+agreements and arrangements. This Agreement shall be governed by the laws of the State of
+Illinois. Exclusive jurisdiction and venue for all matters relating to this Agreement shall be
+in courts and fora located in the State of Illinois, and you consent to such jurisdiction and
+venue. This Agreement will not be governed by the United Nations Convention of
+Contracts for the International Sale of Goods, the application of which is hereby expressly
+excluded. All questions concerning this should be directed to Attn. Legal Department,
+Intechnic Corporation of 333 E IL 83, Suite 201, Mundelein, IL 60060.
+
+
+2.15. U.S. Government Restricted Usage
+
+Use, duplication or disclosure by the Government is subject to restrictions set forth in
+subparagraphs (a) through (d) of the Commercial Computer-Restricted Rights clause at FAR
+52.227-19 when applicable, or in subparagraph (c)(1)(ii) of the Rights in Technical Data and
+Computer, Intechnic Corporation of 333 E IL 83, Suite 201, Mundelein, IL 60060.
+
+
+2.16. Consumer End Users Outside of the U.S.
+
+The limitations or exclusions of warranties and liability contained in this End User
+License Agreement do not affect or prejudice the statutory rights of a consumer, i.e., a
+person acquiring goods otherwise than in the course of a business.
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/LICENSE
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/orders/orders_edit_billing.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/orders/orders_edit_billing.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/orders/orders_edit_billing.tpl	(revision 12131)
@@ -0,0 +1,228 @@
+<inp2:adm_SetPopupSize width="820" height="570"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord" section="in-commerce:orders" title_preset="orders_edit_billing" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('ord','<inp2:ord_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('ord','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('ord', '<inp2:ord_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('ord', '<inp2:ord_NextId/>');
+						}
+				 ) );
+
+				<inp2:m_if check="ord_OrderEditable">
+					a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+					a_toolbar.AddButton( new ToolBarButton('reset_to_user', '<inp2:m_phrase label="la_ToolTip_ResetToUser" escape="1"/>', function() {
+								submit_event('ord','OnResetToUser');
+							}
+					 ) );
+
+					a_toolbar.AddButton( new ToolBarButton('reset_to_shipping', '<inp2:m_phrase label="la_ToolTip_ResetToShipping" escape="1"/>', function() {
+								submit_event('ord','OnResetToShipping');
+							}
+					 ) );
+				</inp2:m_if>
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="ord_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="ord_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="ord_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<script type="text/javascript">
+	function OpenGWResults(field) {
+		openSelector('ord', '<inp2:m_Link template="in-commerce/orders/gw_results" pass="m,ord"/>&field=' + field, '', '500x400');
+	}
+</script>
+
+<inp2:m_DefineElement name="inp_gwresults" is_last="" as_label="" currency="" is_last="">
+	<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+		<inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" is_last="$is_last"/>
+		<td class="control-cell">
+			<inp2:m_if check="m_Param" name="display_field"><inp2:m_Param name="display_field"/>: <inp2:Field name="$field" format="$display_field"/></inp2:m_if>
+			<a href="javascript:OpenGWResults('<inp2:m_param name="field"/>')"><inp2:m_Phrase label="la_Details"/></a>
+		</td>
+		<inp2:m_RenderElement name="inp_edit_error" pass_params="1"/>
+	</tr>
+</inp2:m_DefineElement>
+
+<inp2:m_RenderElement name="inp_edit_hidden" prefix="ord" field="Status" db="db"/>
+
+<inp2:ord_SaveWarning name="grid_save_warning"/>
+<inp2:ord_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="!la_section_OrderBilling!"/>
+			<inp2:m_if check="ord_OrderEditable">
+				<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingTo" title="!la_fld_BillingTo!" size="40"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingCompany" title="!la_fld_BillingCompany!" size="40"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingPhone" title="!la_fld_BillingPhone!" size="20"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingFax" title="!la_fld_BillingFax!" size="20"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingEmail" title="!la_fld_BillingEmail!" size="20"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingAddress1" title="!la_fld_BillingAddress1!" size="40"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingAddress2" title="!la_fld_BillingAddress2!" size="40"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingCity" title="!la_fld_BillingCity!" size="20"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingState" title="!la_fld_BillingState!" size="20"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingZip" title="!la_fld_BillingZip!" size="10"/>
+				<inp2:m_RenderElement name="inp_edit_options" prefix="ord" field="BillingCountry" title="!la_fld_BillingCountry!" size="20"/>
+				<inp2:m_RenderElement name="inp_edit_options" prefix="ord" field="PaymentType" title="!la_fld_PaymentType!" onchange="submit_event('ord','OnPreSave');"/>
+
+				<inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord" field="IsRecurringBilling" title="!la_fld_IsRecurringBilling!"/>
+				<inp2:m_RenderElement name="inp_edit_date_time" prefix="ord" field="NextCharge" title="!la_fld_NextCharge!"/>
+
+				<!--<inp2:m_RenderElement name="inp_gwresults" prefix="ord" display_field="score" field="VerificationResult" title="!la_fld_VerificationResult!" />-->
+
+				<inp2:m_if check="ord_UsingCreditCard">
+					<inp2:m_RenderElement name="subsection" title="!la_section_CreditCard!"/>
+					<inp2:m_RenderElement name="inp_edit_options" prefix="ord" field="PaymentCardType" title="!la_fld_PaymentCardType!"/>
+					<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="PaymentAccount" title="!la_fld_CreditCardNumber!" size="20"/>
+					<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="PaymentNameOnCard" title="!la_fld_PaymentNameOnCard!" size="20"/>
+
+					<inp2:m_if check="ord_FieldVisible" field="PaymentCCExpDate">
+						<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+							<inp2:m_RenderElement name="inp_edit_field_caption" prefix="ord" field="PaymentCCExpDate" title="!la_fld_PaymentCCExpDate!"/>
+							<td class="control-cell">
+								<input type="text" size="3" maxlength="2" name="<inp2:ord_InputName field="PaymentCCExpMonth"/>" id="<inp2:ord_InputName field="PaymentCCExpMonth"/>" value="<inp2:ord_Field field="PaymentCCExpMonth"/>">
+								/
+								<input type="text" size="3" maxlength="2" name="<inp2:ord_InputName field="PaymentCCExpYear"/>" id="<inp2:ord_InputName field="PaymentCCExpYear"/>" value="<inp2:ord_Field field="PaymentCCExpYear"/>">
+							</td>
+							<inp2:m_RenderElement name="inp_edit_error" prefix="ord" field="PaymentCCExpDate"/>
+						</tr>
+					</inp2:m_if>
+
+					<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="PaymentCVV2" title="!la_fld_PaymentCVV2!" size="5" maxlength="5"/>
+					<inp2:m_RenderElement name="inp_edit_date_time" prefix="ord" field="PaymentExpires" title="!la_fld_PaymentExpires!" size="16"/>
+					<inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord" field="ChargeOnNextApprove" title="!la_fld_ChargeOnNextApprove!"/>
+				<inp2:m_else/>
+					<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="PaymentAccount" title="!la_fld_PaymentAccount!" size="20"/>
+					<inp2:m_RenderElement name="inp_edit_date_time" prefix="ord" field="PaymentExpires" title="!la_fld_PaymentDate!" size="16"/>
+				</inp2:m_if>
+
+				<inp2:m_if check="ord_Field" name="GWResult1" db="db">
+					<inp2:m_RenderElement name="inp_gwresults" prefix="ord" field="GWResult1" title="!la_fld_AuthorizationResult!" />
+				</inp2:m_if>
+
+				<inp2:m_if check="ord_Field" name="GWResult2" db="db">
+					<inp2:m_RenderElement name="inp_gwresults" prefix="ord" field="GWResult2" title="!la_fld_CaptureResult!" />
+				</inp2:m_if>
+			<inp2:m_else/>
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingTo" title="!la_fld_BillingTo!" size="40"/>
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingCompany" title="!la_fld_BillingCompany!" size="40"/>
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingPhone" title="!la_fld_BillingPhone!" size="20"/>
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingFax" title="!la_fld_BillingFax!" size="20"/>
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingEmail" title="!la_fld_BillingEmail!" size="20"/>
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingAddress1" title="!la_fld_BillingAddress1!" size="40"/>
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingAddress2" title="!la_fld_BillingAddress2!" size="40"/>
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingCity" title="!la_fld_BillingCity!" size="20"/>
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingState" title="!la_fld_BillingState!" size="20"/>
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingZip" title="!la_fld_BillingZip!" size="10"/>
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingCountry" title="!la_fld_BillingCountry!" size="20"/>
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentType" title="!la_fld_PaymentType!"/>
+
+				<inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord" field="IsRecurringBilling" title="!la_fld_IsRecurringBilling!"/>
+				<inp2:m_RenderElement name="inp_edit_date_time" prefix="ord" field="NextCharge" title="!la_fld_NextCharge!"/>
+
+				<inp2:m_RenderElement name="inp_gwresults" prefix="ord" field="VerificationResult" display_field="score" title="!la_fld_VerificationResult!" />
+
+				<inp2:m_if check="ord_UsingCreditCard">
+					<inp2:m_RenderElement name="subsection" title="!la_section_CreditCard!"/>
+					<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentCardType" title="!la_fld_PaymentCardType!"/>
+					<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentAccount" title="!la_fld_CreditCardNumber!"/>
+					<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentNameOnCard" title="!la_fld_PaymentNameOnCard!"/>
+
+					<inp2:m_if check="ord_FieldVisible" field="PaymentCCExpDate">
+						<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+							<inp2:m_RenderElement name="inp_edit_field_caption" prefix="ord" field="PaymentCCExpDate" title="!la_fld_PaymentCCExpDate!"/>
+							<td class="control-cell">
+								<inp2:ord_Field field="PaymentCCExpMonth"/> / <inp2:ord_Field field="PaymentCCExpYear"/>
+							</td>
+							<inp2:m_RenderElement name="inp_edit_error" prefix="ord" field="PaymentCCExpDate"/>
+						</tr>
+					</inp2:m_if>
+
+					<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentCVV2" title="!la_fld_PaymentCVV2!"/>
+					<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentExpires" title="!la_fld_PaymentExpires!"/>
+				<inp2:m_else/>
+					<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentAccount" title="!la_fld_PaymentAccount!"/>
+					<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentExpires" title="!la_fld_PaymentDate!"/>
+				</inp2:m_if>
+
+				<inp2:m_if check="ord_Field" name="GWResult1" db="db">
+					<inp2:m_RenderElement name="inp_gwresults" prefix="ord" field="GWResult1" title="!la_fld_AuthorizationResult!" />
+				</inp2:m_if>
+
+				<inp2:m_if check="ord_Field" name="GWResult2" db="db">
+					<inp2:m_RenderElement name="inp_gwresults" prefix="ord" field="GWResult2" title="!la_fld_CaptureResult!" />
+				</inp2:m_if>
+			</inp2:m_if>
+
+			<inp2:m_if check="ord_Field" name="CouponId">
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="CouponCode" title="!la_fld_CouponCode!" />
+			</inp2:m_if>
+			<inp2:m_RenderElement name="inp_label" prefix="ord" field="DiscountTotal" title="!la_fld_TotalSavings!" />
+			<inp2:m_RenderElement name="inp_label" prefix="ord" field="ReturnTotal" title="!la_fld_TotalReturns!" />
+
+			<inp2:m_if check="ord_FieldEquals" name="VAT" value="0.00">
+			<inp2:m_else />
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="AmountWithoutVAT" title="!la_fld_SubTotal!" />
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="VAT" title="!la_fld_VAT!" />
+			</inp2:m_if>
+
+			<inp2:m_if check="ord_Field" name="GiftCertificateId">
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="GiftCertificateCode" title="!la_fld_Gift_Certificate_Number!" />
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="GiftCertificateDiscount" title="!la_fld_Gift_Certificate_Amount_Applied!" />
+			</inp2:m_if>
+
+
+			<inp2:m_RenderElement name="inp_label" prefix="ord" field="TotalAmount" title="!la_fld_TotalAmount!" />
+			<inp2:m_if check="ord_HasOriginalAmount" >
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="OriginalAmount" title="!la_fld_OriginalAmount!" />
+			</inp2:m_if>
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<input type="hidden" name="to_tab" value="Billing">
+<input type="hidden" name="check_billing_address" value="true" />
+<inp2:m_if check="ord_UsingCreditCard">
+	<input type="hidden" name="check_credit_card" value="true" />
+</inp2:m_if>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/orders/orders_edit_billing.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.18.2.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/orders/orders_edit_preview.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/orders/orders_edit_preview.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/orders/orders_edit_preview.tpl	(revision 12131)
@@ -0,0 +1,390 @@
+<inp2:adm_SetPopupSize width="820" height="570"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord" section="in-commerce:orders" title_preset="orders_edit_preview" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('ord','<inp2:ord_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('ord','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('ord', '<inp2:ord_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('ord', '<inp2:ord_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.AddButton( new ToolBarButton('print', '<inp2:m_phrase label="la_ToolTip_Print" escape="1"/>', function() {
+							openSelector('ord', '<inp2:m_Link template="in-commerce/orders/orders_edit_print" pass="all"/>', '', '750x700');
+						}
+				 ) );
+
+				<inp2:m_if check="ord_OrderEditable">
+
+					a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+					a_toolbar.AddButton( new ToolBarButton('place_order', '<inp2:m_phrase label="la_ToolTip_PlaceOrder" escape="1"/>', function() {
+								submit_event('ord','OnCompleteOrder');
+							}
+					 ) );
+				</inp2:m_if>
+
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="ord_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+				<inp2:m_else/>
+					<inp2:m_if check="ord_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="ord_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:ord_SaveWarning name="grid_save_warning"/>
+<inp2:ord_ErrorWarning name="form_error_warning"/>
+
+<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
+	<inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
+	<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
+		<td class="text">
+			<inp2:m_phrase label="la_fld_OrderNumber"/>:
+		</td>
+		<td>
+			<inp2:ord_Field field="OrderNumber"/> (<inp2:ord_Field field="Status"/>)
+		</td>
+		<td>&nbsp;</td>
+	</tr>
+	<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
+		<td class="text">
+			<inp2:m_phrase label="la_fld_Date"/>:
+		</td>
+		<td>
+			<inp2:ord_Field field="OrderDate"/>
+		</td>
+		<td>&nbsp;</td>
+	</tr>
+	<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
+		<td class="text">
+			<inp2:m_phrase label="la_fld_Username"/>:
+		</td>
+		<td>
+			<inp2:ord_Field field="PortalUserId"/> (<inp2:ord_Field field="CustomerName"/>)
+		</td>
+		<td>&nbsp;</td>
+	</tr>
+</table>
+
+<table cellspacing="0" cellpadding="0" width="100%" class="tableborder">
+<tr>
+	<td>
+	<table cellspacing="0" cellpadding="2" width="100%" border="0">
+		<tr class="subsectiontitle">
+			<td colspan="2">
+				<inp2:m_Phrase label="la_comm_ShippingBillingInfo"/>
+			</td>
+		</tr>
+		<tr>
+			<inp2:m_if check="ord_Field" name="ShippingTo">
+			<td width="50%" class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>" style="vertical-align: top">
+				<!-- shipping -->
+				<table width="100%" cellpadding="0" cellspacing="0">
+					<tr>
+						<td class="order_preview_field_name"><inp2:m_phrase label="la_fld_ShippingTo"/>:</td>
+						<td class="order_preview_field_value"><inp2:ord_Field field="ShippingTo"/></td>
+					</tr>
+					<inp2:m_if check="ord_Field" name="ShippingEmail">
+					<tr>
+						<td class="order_preview_field_name"><inp2:m_phrase label="lu_field_email"/>:</td>
+						<td class="order_preview_field_value"><inp2:ord_Field field="ShippingEmail"/></td>
+					</tr>
+					</inp2:m_if>
+					<inp2:m_if check="ord_Field" name="ShippingPhone">
+					<tr>
+						<td class="order_preview_field_name"><inp2:m_phrase label="lu_comm_PhoneNumber"/>:</td>
+						<td class="order_preview_field_value"><inp2:ord_Field field="ShippingPhone"/></td>
+					</tr>
+					</inp2:m_if>
+					<inp2:m_if check="ord_Field" name="ShippingFax">
+					<tr>
+						<td class="order_preview_field_name"><inp2:m_phrase label="lu_comm_FaxNumber"/>:</td>
+						<td class="order_preview_field_value"><inp2:ord_Field field="ShippingFax"/></td>
+					</tr>
+					</inp2:m_if>
+					<inp2:m_if check="ord_Field" name="ShippingCompany">
+					<tr>
+						<td class="order_preview_field_name"><inp2:m_phrase label="lu_shipping_Company"/>:</td>
+						<td class="order_preview_field_value"><inp2:ord_Field field="ShippingCompany"/></td>
+					</tr>
+					</inp2:m_if>
+					<tr>
+						<td class="order_preview_field_name" style="vertical-align: top;">Address:</td>
+						<td class="order_preview_field_value">
+							<inp2:m_if check="ord_FieldEquals" field="ShippingAddress1" value="" inverse="inverse" >
+								<inp2:ord_Field field="ShippingAddress1"/><br>
+							</inp2:m_if>
+							<inp2:m_if check="ord_FieldEquals" field="ShippingAddress2" value="" inverse="inverse" >
+								<inp2:ord_Field field="ShippingAddress2"/><br>
+							</inp2:m_if>
+							<inp2:ord_PrintLocation type="Shipping"/>
+						</td>
+					</tr>
+				</table>
+			</td>
+			</inp2:m_if>
+
+			<inp2:m_if check="ord_Field" name="BillingTo">
+			<td width="50%" class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>" style="vertical-align: top">
+				<!-- billing -->
+				<table width="100%" cellpadding="0" cellspacing="0">
+					<tr>
+						<td class="order_preview_field_name"><inp2:m_phrase label="la_fld_BillingTo"/>:</td>
+						<td class="order_preview_field_value"><inp2:ord_Field field="BillingTo"/></td>
+					</tr>
+					<inp2:m_if check="ord_Field" name="BillingEmail">
+					<tr>
+						<td class="order_preview_field_name"><inp2:m_phrase label="lu_billing_Email"/>:</td>
+						<td class="order_preview_field_value"><inp2:ord_Field field="BillingEmail"/></td>
+					</tr>
+					</inp2:m_if>
+					<inp2:m_if check="ord_Field" name="BillingPhone">
+					<tr>
+						<td class="order_preview_field_name"><inp2:m_phrase label="lu_comm_PhoneNumber"/>:</td>
+						<td class="order_preview_field_value"><inp2:ord_Field field="BillingPhone"/></td>
+					</tr>
+					</inp2:m_if>
+					<inp2:m_if check="ord_Field" name="BillingFax">
+					<tr>
+						<td class="order_preview_field_name"><inp2:m_phrase label="lu_comm_FaxNumber"/>:</td>
+						<td class="order_preview_field_value"><inp2:ord_Field field="BillingFax"/></td>
+					</tr>
+					</inp2:m_if>
+					<inp2:m_if check="ord_Field" name="BillingCompany">
+					<tr>
+						<td class="order_preview_field_name"><inp2:m_phrase label="lu_billing_Company"/>:</td>
+						<td class="order_preview_field_value"><inp2:ord_Field field="BillingCompany"/></td>
+					</tr>
+					</inp2:m_if>
+					<tr>
+						<td class="order_preview_field_name" style="vertical-align: top;"><inp2:m_phrase label="lu_billing_Address"/>:</td>
+						<td class="order_preview_field_value">
+							<inp2:m_if check="ord_FieldEquals" field="BillingAddress1" value="" inverse="inverse" >
+								<inp2:ord_Field field="BillingAddress1"/><br>
+							</inp2:m_if>
+							<inp2:m_if check="ord_FieldEquals" field="BillingAddress2" value="" inverse="inverse" >
+								<inp2:ord_Field field="BillingAddress2"/><br>
+							</inp2:m_if>
+							<inp2:ord_PrintLocation type="Billing"/>
+						</td>
+					</tr>
+					<tr>
+						<td class="order_preview_field_name"><inp2:m_phrase label="la_fld_PaymentType"/>:</td>
+						<td class="order_preview_field_value"><inp2:ord_Field field="PaymentType"/></td>
+					</tr>
+				</table>
+			</td>
+			</inp2:m_if>
+
+			<inp2:m_if check="ord_Field" name="ShippingTo" inverse="inverse"><td width="50%" valign="top">&nbsp;</td></inp2:m_if>
+			<inp2:m_if check="ord_Field" name="BillingTo" inverse="inverse"><td width="50%" valign="top">&nbsp;</td></inp2:m_if>
+		</tr>
+
+		<tr class="subsectiontitle">
+			<td colspan="2">
+				<inp2:m_Phrase label="la_comm_OrderContents"/>
+			</td>
+		</tr>
+
+	</table>
+
+	<table cellspacing="0" cellpadding="0" width="100%" border="0" class="orders_flat_table">
+		<tr class="subsectiontitle">
+			<td width="70%"<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders"> colspan="2"</inp2:m_if> nowrap><inp2:m_Phrase label="la_col_Product"/></td>
+			<td width="10%" nowrap style="text-align: center"><inp2:m_Phrase label="la_col_Quantity"/></td>
+			<td width="10%" nowrap style="text-align: right"><inp2:m_Phrase label="la_col_Price"/></td>
+			<td width="10%" nowrap style="text-align: right"><inp2:m_Phrase label="la_col_ExtendedPrice"/></td>
+		</tr>
+
+		<inp2:m_DefineElement name="option_value_element">
+			<inp2:m_param name="value"/> <inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/> (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if>
+			<inp2:m_if check="m_ParamEquals" name="is_last" value="1"><inp2:m_else/>, </inp2:m_if>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="option_element">
+			<inp2:m_if check="m_ParamEquals" param="type" value="6"> <!-- checkboxes - multiple -->
+				<strong><inp2:m_param name="option"/>:</strong>
+					<inp2:PrintOptionValues render_as="option_value_element"/>
+			<inp2:m_else/>
+					<strong><inp2:m_param name="option"/>:</strong> <inp2:m_param name="value"/>
+						<inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/> (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if>
+			</inp2:m_if><br/>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="option_value_element_no_price">
+			<inp2:m_param name="value"/>
+			<inp2:m_if check="m_ParamEquals" name="is_last" value="1"><inp2:m_else/>, </inp2:m_if>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="option_element_no_price">
+			<inp2:m_if check="m_ParamEquals" param="type" value="6"> <!-- checkboxes - multiple -->
+				<strong><inp2:m_param name="option"/>:</strong>
+					<inp2:PrintOptionValues render_as="option_value_element_no_price"/>
+			<inp2:m_else/>
+					<strong><inp2:m_param name="option"/>:</strong> <inp2:m_param name="value"/>
+			</inp2:m_if><br/>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="product_image">
+			<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" />
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="order_detail_row">
+			<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
+				<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">
+					<td valign="top" width="120">
+						<inp2:p_Image render_as="product_image" thumbnail="1" DefaultImage="../../in-commerce/admin_templates/img/itemicons/no_picture_list.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120" />
+					</td>
+				</inp2:m_if>
+
+				<td align="left" valign="top" width="100%">
+					<strong><inp2:{$PrefixSpecial}_Field field="ProductName"/></strong><br/>
+					<small><strong>SKU: </strong><inp2:Field field="SKU"/></small>
+					<inp2:m_if check="HasOptions">
+						<br/>
+						<small>
+						<inp2:m_if check="DisplayOptionsPricing"> <!-- selectable options or overriding combination -->
+							<inp2:PrintOptions render_as="option_element"/>
+						<inp2:m_else/> <!-- listed combinations -->
+							<inp2:PrintOptions render_as="option_element_no_price"/>
+						</inp2:m_if>
+						</small>
+						<br/>
+					</inp2:m_if>
+					<inp2:m_if check="HasDiscount">
+						<br />
+						<inp2:m_Phrase label="lu_comm_RegularPrice" />: <inp2:Field name="FlatPrice" /><br />
+						<inp2:m_Phrase label="lu_comm_Discount" />: - <inp2:Field name="ItemDiscount" />
+					</inp2:m_if>
+				</td>
+				<td align="right" nowrap style="text-align: center"><inp2:{$PrefixSpecial}_Field field="Quantity"/></td>
+				<td align="right" nowrap><inp2:{$PrefixSpecial}_Field field="Price"/></td>
+				<td align="right" nowrap><inp2:{$PrefixSpecial}_Field field="ExtendedPrice"/></td>
+			</tr>
+		</inp2:m_DefineElement>
+
+		<inp2:orditems_PrintList block="order_detail_row" per_page="-1"/>
+
+		<tr style="border-top: 2px solid black">
+			<td align="left"<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders"> colspan="2"</inp2:m_if>>
+				<inp2:m_if check="ord_Field" name="CouponId">
+					<span class="order_preview_field_name"><inp2:m_Phrase label="la_CouponCode"/>:</span> <inp2:ord_Field field="CouponCode"/><br />
+				</inp2:m_if>
+
+				<inp2:m_if check="ord_FieldEquals" field="DiscountTotal" value="0.00" inverse="inverse">
+					<span class="order_preview_field_name"><inp2:m_Phrase label="la_TotalSavings"/>:</span> <inp2:ord_Field field="DiscountTotal"/><br />
+				</inp2:m_if>
+			</td>
+			<td align="right" nowrap colspan="2" class="order-totals-name"><inp2:m_Phrase label="la_SubTotal"/>:</td>
+			<td align="right" nowrap class="arial2">
+				<inp2:m_if check="ord_FieldEquals" name="VAT" value="0.00">
+					<inp2:ord_Field field="AmountWithoutVAT"/>
+				<inp2:m_else />
+					<inp2:ord_Field field="SubTotal"/>
+				</inp2:m_if>
+			</td>
+		</tr>
+
+		<inp2:m_DefineElement name="shipping_total">
+			<tr>
+				<td align="right" nowrap colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>" class="order-totals-name"><inp2:m_Phrase label="la_ShippingHandling"/><inp2:m_if check="ord_ShippingType"> (<inp2:ord_ShippingType />):</inp2:m_if></td>
+				<td align="right" nowrap class="arial2"><inp2:ord_Field field="ShippingCost"/></td>
+			</tr>
+			<tr>
+				<td align="right" nowrap colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>" class="order-totals-name"><inp2:m_Phrase label="la_Insurance_Fee"/>:</td>
+				<td align="right" nowrap class="arial2"><inp2:ord_Field field="InsuranceFee"/></td>
+			</tr>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="vat_total">
+			<tr>
+				<td align="right" nowrap colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>" class="order-totals-name"><inp2:m_Phrase label="la_VAT"/> <inp2:ord_Field field="VATPercent"/>%:</td>
+				<td align="right" nowrap class="arial2"><inp2:ord_Field field="VAT"/></td>
+			</tr>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="processing_total">
+			<tr>
+				<td align="right" nowrap colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>" class="order-totals-name"><inp2:m_Phrase label="la_ProcessingFee"/>:</td>
+				<td align="right" nowrap class="arial2"><inp2:ord_Field field="ProcessingFee"/></td>
+			</tr>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="return_total">
+			<tr>
+				<td align="right" nowrap colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>" class="order-totals-name"><inp2:m_Phrase label="la_fld_TotalReturns"/>:</td>
+				<td align="right" nowrap class="arial2">-<inp2:ord_Field field="ReturnTotal"/></td>
+			</tr>
+		</inp2:m_DefineElement>
+
+		<inp2:ord_PrintTotals
+				shipping_render_as="shipping_total"
+				processing_render_as="processing_total"
+				vat_render_as="vat_total"
+				return_render_as="return_total"/>
+
+
+		<inp2:m_if check="ord_Field" field="GiftCertificateId">
+			<tr>
+				<td align="right" nowrap colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>" class="order-totals-name"><inp2:m_Phrase label="!la_fld_Gift_Certificate_Number!"/>:</td>
+				<td align="right" nowrap class="arial2"><inp2:ord_Field field="GiftCertificateCode"/></td>
+			</tr>
+			<tr>
+				<td align="right" nowrap colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>" class="order-totals-name"><inp2:m_Phrase label="!la_fld_Gift_Certificate_Amount_Applied!"/>:</td>
+				<td align="right" nowrap class="arial2"><inp2:ord_Field field="GiftCertificateDiscount"/></td>
+			</tr>
+		</inp2:m_if>
+		<tr>
+			<td align="right" colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">3<inp2:m_else/>2</inp2:m_if>">&nbsp;</td>
+			<td align="right"><span class="order_preview_field_name">Total:</span></td>
+			<td align="right" nowrap><span class="order_preview_field_name"><inp2:ord_Field field="TotalAmount"/></span></td>
+		</tr>
+		<inp2:m_if check="ord_HasOriginalAmount" >
+		<tr>
+			<td align="right"<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders"> colspan="2"</inp2:m_if>>&nbsp;</td>
+			<td align="right" colspan="2" nowrap><span class="order_preview_field_name"><inp2:m_Phrase label="la_fld_OriginalAmount"/>:</span></td>
+			<td align="right" nowrap <span class="order_preview_field_name"><inp2:ord_Field field="OriginalAmount"/></span></td>
+		</tr>
+		</inp2:m_if>
+	</table>
+	</td>
+</tr>
+</table>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/orders/orders_edit_preview.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.20.2.6
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/orders/export/export.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/orders/export/export.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/orders/export/export.tpl	(revision 12131)
@@ -0,0 +1,173 @@
+<inp2:adm_SetPopupSize width="780" height="670"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord.export" section="in-commerce:orders" title_preset="orders_export"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+
+						document.getElementById('hidden_export_columns').value = select_to_string('<inp2:ord.export_InputName field="ExportColumns"/>');
+						submit_event('ord.export', 'OnExportBegin');
+
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('ord.export', 'OnGoBack');
+						}
+				 ) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:ord.export_SaveWarning name="grid_save_warning"/>
+<inp2:ord.export_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="ord.export" field="ExportFormat" title="la_fld_ExportFormat" use_phrases="0"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="ord.export" field="FieldsSeparatedBy" title="la_fld_FieldsSeparatedBy" size="2" maxlength="1"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="ord.export" field="FieldsEnclosedBy" title="la_fld_FieldsEnclosedBy" size="2" maxlength="1"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="ord.export" field="LineEndings" title="la_fld_LineEndings" use_phrases="0"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="ord.export" field="LineEndingsInside" title="la_fld_LineEndingsInside" use_phrases="0"/>
+
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord.export" field="IncludeFieldTitles" title="la_fld_IncludeFieldTitles"/>
+
+			<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+				<inp2:m_RenderElement name="inp_edit_field_caption" prefix="ord.export" field="ExportPresets" title="la_fld_ExportPresets"/>
+				<td class="control-cell">
+					<select tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:ord.export_InputName field="ExportPresets"/>" id="<inp2:ord.export_InputName field="ExportPresets"/>" onchange="update_fields(this.value)">
+						<inp2:ord.export_PredefinedOptions field="ExportPresets" block="inp_option_item" selected="selected"/>
+					</select>
+					&nbsp;&nbsp;
+					<input class="button" type="button" value="<inp2:m_Phrase label="la_Text_Delete"/>" onclick="delete_preset()">
+				</td>
+			</tr>
+
+			<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+				<inp2:m_RenderElement name="inp_edit_field_caption" prefix="ord.export" field="ExportColumns" title="la_fld_ExportColumns"/>
+				<td class="control-cell">
+					<table cellpadding="0" cellspacing="0" border="0">
+						<tr>
+							<td>
+								<input type="button" value="<inp2:m_phrase name="la_btn_Up"/>" onclick="move_options_up('<inp2:ord.export_InputName field="ExportColumns"/>', 1)" class="button">
+								<input type="button" value="<inp2:m_phrase name="la_btn_Down"/>" onclick="move_options_down('<inp2:ord.export_InputName field="ExportColumns"/>', 1)" class="button"><br />
+								<img src="img/s.gif" width="1" height="5" alt=""><br />
+							</td>
+							<td><img src="img/s.gif" width="45" height="1" alt=""><br></td>
+							<td><inp2:m_phrase name="la_fld_AvailableColumns"/>:</td>
+						</tr>
+						<tr>
+							<td>
+								<select multiple id="<inp2:ord.export_InputName field="ExportColumns"/>" size="15" style="width: 225px;">
+									<inp2:ord.export_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/>
+								</select>
+								<input type="hidden" id="hidden_export_columns" name="<inp2:ord.export_InputName field="ExportColumns"/>" value="<inp2:ord.export_Field field="ExportColumns"/>" />
+							</td>
+							<td align="center">
+								<input type="button" value="&nbsp;&laquo;&laquo;&nbsp;" onclick="move_selected('<inp2:ord.export_InputName field="AvailableColumns"/>', '<inp2:ord.export_InputName field="ExportColumns"/>')" class="button"><br>
+								<img src="img/s.gif" width="1" height="4" alt=""><br>
+								<input type="button" value="&nbsp;&raquo;&raquo;&nbsp;" onclick="move_selected('<inp2:ord.export_InputName field="ExportColumns"/>', '<inp2:ord.export_InputName field="AvailableColumns"/>'); select_sort('<inp2:ord.export_InputName field="AvailableColumns"/>');" class="button">
+							</td>
+							<td>
+								<select multiple id="<inp2:ord.export_InputName field="AvailableColumns"/>" size="15" style="width: 225px;">
+									<inp2:ord.export_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/>
+								</select>
+							</td>
+						</tr>
+					</table>
+				</td>
+				<inp2:m_RenderElement name="inp_edit_error" prefix="ord.export" field="ExportColumns"/>
+			</tr>
+
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord.export" field="ExportSavePreset" title="la_fld_ExportSavePreset" size="2" maxlength="1" onclick="update_preset_field(this.checked)"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="ord.export" field="ExportPresetName" title="la_fld_ExportPresetName" size="20" />
+
+			<inp2:m_RenderElement name="inp_edit_box" prefix="ord.export" field="ExportFilename" title="la_fld_ExportFilename" size="20" />
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<script type="text/javascript" src="incs/ajax.js"></script>
+<script type="text/javascript">
+	var delete_busy = false;
+
+	function delete_preset()
+	{
+		if (!confirm('<inp2:m_Phrase label="la_ConfirmDeleteExportPreset" js_escape="1"/>')) return;
+		var $kf = document.getElementById('kernel_form');
+		tmp = $kf.elements['events[ord.export]'].value;
+		$kf.elements['events[ord.export]'].value = 'OnDeleteExportPreset';
+		Request.method = 'POST';
+		Request.params = Request.serializeForm($kf);
+		$kf.elements['events[ord.export]'].value = tmp;
+		Request.makeRequest('<inp2:m_t ajax="1" ord.export_event="OnDeleteExportPreset" js_escape="1" no_amp="1"/>', delete_busy, '', function() {
+			presets = document.getElementById('<inp2:ord.export_InputName field="ExportPresets"/>');
+			for (i=0; i< presets.options.length; i++) {
+				if (presets.options(i).selected) {
+					presets.options.remove(i);
+				}
+			}
+			presets.options[0].selected = true;
+		}, function() {alert('error')} );
+	}
+
+	function update_preset_field(status)
+	{
+		if (status) {
+			presets = document.getElementById('<inp2:ord.export_InputName field="ExportPresets"/>');
+			if ( presets.value != '' ) {
+				for (i=0; i< presets.options.length; i++) {
+					if (presets.options(i).selected) {
+						preset_name = presets.options(i).text
+					}
+				}
+				document.getElementById('<inp2:ord.export_InputName field="ExportPresetName"/>').value = preset_name;
+			}
+		}
+		document.getElementById('<inp2:ord.export_InputName field="ExportPresetName"/>').disabled = !status;
+	}
+
+	function update_fields(preset)
+	{
+		$export = select_to_string(document.getElementById('<inp2:ord.export_InputName field="ExportColumns"/>'));
+		if ($export != '') {
+			string_to_selected($export, document.getElementById('<inp2:ord.export_InputName field="ExportColumns"/>'));
+			move_selected('<inp2:ord.export_InputName field="ExportColumns"/>', '<inp2:ord.export_InputName field="AvailableColumns"/>');
+		}
+
+		av = document.getElementById('<inp2:ord.export_InputName field="AvailableColumns"/>');
+		fields = preset.split('|');
+
+		for (var i=0; i<fields.length; i++) {
+			fld = fields[i];
+			var $cur = null;
+			for (var $i = 0; $i < av.length; $i++)
+			{
+				cur = av.options[$i];
+				if (cur.value == fld) {
+					av.options[$i].selected = true;
+					move_selected('<inp2:ord.export_InputName field="AvailableColumns"/>', '<inp2:ord.export_InputName field="ExportColumns"/>');
+				}
+				else {
+					av.options[$i].selected = false;
+				}
+			}
+		}
+	}
+
+	update_preset_field(document.getElementById('<inp2:ord.export_InputName field="ExportPresetName"/>').checked)
+
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/orders/export/export.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/orders/export/export_finish.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/orders/export/export_finish.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/orders/export/export_finish.tpl	(revision 12131)
@@ -0,0 +1,45 @@
+<inp2:adm_SetPopupSize width="780" height="670"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord.export" section="in-commerce:orders" title_preset="orders_export"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Close" escape="1"/>', function() {
+							submit_event('ord.export', 'OnGoBack');
+						}
+				 ) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
+
+		<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+			<inp2:m_inc param="tab_index" by="1"/>
+			<td class="label-cell">
+				<inp2:m_phrase label="la_DownloadExportFile"/>
+			</td>
+			<td class="control-mid">&nbsp;</td>
+			<td class="control-cell">
+				<a href="<inp2:ord.export_ExportPath as_url="1"/>"><inp2:ord.export_ExportPath /></a>
+			</td>
+		</tr>
+
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/orders/export/export_finish.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/orders/export/export_progress.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/orders/export/export_progress.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/orders/export/export_progress.tpl	(revision 12131)
@@ -0,0 +1,16 @@
+<inp2:adm_SetPopupSize width="780" height="670"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord.export" section="in-commerce:orders" title_preset="orders_export"/>
+
+<inp2:m_RenderElement name="ajax_progress_bar" cancel_action="cancel_action();"/>
+
+<script type="text/javascript">
+	function cancel_action() {
+		submit_event('ord.export', 'OnExportCancel');
+	}
+
+	$ProductExport = new AjaxProgressBar('<inp2:m_t t="in-commerce/orders/export/export_status_xml" no_amp="1"/>');
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/orders/export/export_progress.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/orders/export/export_status_xml.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/orders/export/export_status_xml.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/orders/export/export_status_xml.tpl	(revision 12131)
@@ -0,0 +1 @@
+<inp2:m_if check="m_CheckPermission" permissions="in-commerce:orders.view" system="1"><inp2:ord.export_ExportStatus/><inp2:m_else/>100</inp2:m_if>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/orders/export/export_status_xml.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/orders/gw_results.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/orders/gw_results.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/orders/gw_results.tpl	(revision 12131)
@@ -0,0 +1,49 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord" section="in-commerce:orders" title_preset="orders_gw_result"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+	  	<td>
+	  		<script type="text/javascript">
+					a_toolbar = new ToolBar();
+
+		  			a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+								window_close();
+							}
+					 	) );
+
+					a_toolbar.Render();
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:ord_SaveWarning name="grid_save_warning"/>
+<inp2:ord_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+
+		<inp2:m_DefineElement name="a_field">
+			<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+				<td class="label-cell">
+					<inp2:m_Param name="field"/>:
+				</td>
+				<td class="control-mid">&nbsp;</td>
+				<td class="control-cell">
+					<inp2:m_Param name="value"/>
+				</td>
+			</tr>
+		</inp2:m_DefineElement>
+
+		<inp2:ord_PrintSerializedFields render_as="a_field"/>
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<!--<inp2:s_HiddenSelection/>-->
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/orders/gw_results.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/orders/orders_edit.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/orders/orders_edit.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/orders/orders_edit.tpl	(revision 12131)
@@ -0,0 +1,137 @@
+<inp2:adm_SetPopupSize width="820" height="570"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord" section="in-commerce:orders" title_preset="orders_edit_general" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('ord','<inp2:ord_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('ord','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('ord', '<inp2:ord_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('ord', '<inp2:ord_NextId/>');
+						}
+				 ) );
+
+//				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="ord_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+//					a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="ord_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="ord_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="inp_edit_hidden" prefix="ord" field="Status" db="db"/>
+
+<inp2:ord_SaveWarning name="grid_save_warning"/>
+<inp2:ord_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
+
+			<inp2:m_RenderElement name="inp_id_label" prefix="ord" field="OrderId" title="!la_fld_OrderId!"/>
+
+			<inp2:m_if check="ord_OrderEditable">
+				<inp2:m_if check="ord_FieldVisible" field="Number">
+					<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+						<inp2:m_RenderElement name="inp_edit_field_caption" prefix="ord" field="Number" title="!la_fld_OrderNumber!"/>
+						<td class="control-cell">
+							<input type="text" name="<inp2:ord_InputName field="Number"/>" id="<inp2:ord_InputName field="Number"/>" value="<inp2:ord_Field field="Number"/>" tabindex="<inp2:m_get param="tab_index"/>" size="6" maxlength="6" class="text">
+							-<inp2:m_inc param="tab_index" by="1"/>
+							<input type="text" name="<inp2:ord_InputName field="SubNumber"/>" id="<inp2:ord_InputName field="SubNumber"/>" value="<inp2:ord_Field field="SubNumber"/>" tabindex="<inp2:m_get param="tab_index"/>" size="2" maxlength="3" class="text">
+						</td>
+						<inp2:m_RenderElement name="inp_edit_error" prefix="ord" field="OrderNumber"/>
+					</tr>
+				</inp2:m_if>
+
+				<inp2:m_if check="m_IsDebugMode" >
+					<inp2:m_RenderElement name="inp_edit_options" prefix="ord" field="Status" title="!la_fld_Status!"/>
+				<inp2:m_else/>
+					<inp2:m_RenderElement name="inp_label" prefix="ord" field="Status" title="!la_fld_Status!"/>
+				</inp2:m_if>
+
+				<inp2:m_RenderElement name="inp_edit_date_time" prefix="ord" field="OrderDate" title="!la_fld_Date!"/>
+
+				<inp2:m_RenderElement name="inp_edit_user" prefix="ord" field="PortalUserId" title="!la_fld_Username!" size="15"/>
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="OrderIP" title="!la_fld_OrderIP!"/>
+				<inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord" field="OnHold" title="la_fld_OnHold"/>
+
+				<inp2:m_RenderElement name="subsection" title="!la_section_Affiliate!"/>
+					<inp2:m_if check="ord_FieldEquals" field="AffiliateId" value="0">
+						<inp2:m_RenderElement name="inp_label" prefix="ord" field="AffiliateId" title="!la_fld_AffiliateUser!" as_label="1"/>
+					<inp2:m_else/>
+						<inp2:m_RenderElement name="inp_label" prefix="ord" field="AffiliateId" title="!la_fld_AffiliateUser!"/>
+					</inp2:m_if>
+					<inp2:m_RenderElement name="inp_label" prefix="ord" field="AffiliateCommission" title="!la_fld_AffiliateCommission!" currency="selected"/>
+
+				<inp2:m_RenderElement name="subsection" title="!la_section_Comments!"/>
+					<inp2:m_RenderElement name="inp_edit_textarea" prefix="ord" field="UserComment" title="!la_fld_UserComment!" control_options="{min_height: 100}" rows="10" cols="40"/>
+					<inp2:m_RenderElement name="inp_edit_textarea" prefix="ord" field="AdminComment" title="!la_fld_AdminComment!" control_options="{min_height: 100}" rows="10" cols="40"/>
+			<inp2:m_else/>
+				<inp2:m_if check="ord_FieldVisible" field="Number">
+					<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+						<inp2:m_RenderElement name="inp_edit_field_caption" prefix="ord" field="Number" title="!la_fld_OrderNumber!"/>
+						<td class="control-cell">
+							<inp2:ord_Field field="Number"/>-<inp2:ord_Field field="SubNumber"/>
+						</td>
+						<inp2:m_RenderElement name="inp_edit_error" prefix="ord" field="OrderNumber"/>
+					</tr>
+				</inp2:m_if>
+
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="Status" title="!la_fld_Status!"/>
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="OrderDate" title="!la_fld_Date!"/>
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="PortalUserId" title="!la_fld_Username!" size="15"/>
+
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="OrderIP" title="!la_fld_OrderIP!"/>
+				<inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord" field="OnHold" title="la_fld_OnHold"/>
+
+				<inp2:m_RenderElement name="subsection" title="!la_section_Affiliate!"/>
+					<inp2:m_if check="ord_FieldEquals" field="AffiliateId" value="0">
+						<inp2:m_RenderElement name="inp_label" prefix="ord" field="AffiliateId" title="!la_fld_AffiliateUser!" as_label="1"/>
+					<inp2:m_else/>
+						<inp2:m_RenderElement name="inp_label" prefix="ord" field="AffiliateId" title="!la_fld_AffiliateUser!"/>
+					</inp2:m_if>
+					<inp2:m_RenderElement name="inp_label" prefix="ord" field="AffiliateCommission" title="!la_fld_AffiliateCommission!" currency="selected"/>
+
+				<inp2:m_RenderElement name="subsection" title="!la_section_Comments!"/>
+					<inp2:m_RenderElement name="inp_label" prefix="ord" field="UserComment" title="!la_fld_UserComment!" control_options="{min_height: 100}" rows="10" cols="40"/>
+					<inp2:m_RenderElement name="inp_edit_textarea" prefix="ord" field="AdminComment" title="!la_fld_AdminComment!" control_options="{min_height: 100}" rows="10" cols="40"/>
+			</inp2:m_if>
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/orders/orders_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.17.2.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/orders/orders_edit_shipping.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/orders/orders_edit_shipping.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/orders/orders_edit_shipping.tpl	(revision 12131)
@@ -0,0 +1,250 @@
+<inp2:adm_SetPopupSize width="820" height="570"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord" section="in-commerce:orders" title_preset="orders_edit_shipping" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('ord','<inp2:ord_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('ord','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('ord', '<inp2:ord_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('ord', '<inp2:ord_NextId/>');
+						}
+				 ) );
+				<inp2:m_if check="ord_OrderEditable">
+					a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+
+					a_toolbar.AddButton( new ToolBarButton('reset_to_user', '<inp2:m_phrase label="la_ToolTip_ResetToUser" escape="1"/>', function() {
+								submit_event('ord','OnResetToUser');
+							}
+					 ) );
+
+					a_toolbar.AddButton( new ToolBarButton('reset_to_billing', '<inp2:m_phrase label="la_ToolTip_ResetToBilling" escape="1"/>', function() {
+								submit_event('ord','OnResetToBilling');
+							}
+					 ) );
+				</inp2:m_if>
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="ord_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="ord_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="ord_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="inp_edit_hidden" prefix="ord" field="Status" db="db"/>
+
+<inp2:ord_SaveWarning name="grid_save_warning"/>
+
+<inp2:m_if check="m_Recall" name="usps_errors">
+	<table width="100%" border="0" cellspacing="0" cellpadding="4" class="warning-table">
+  		<tr>
+    		<td valign="top" class="form-warning">
+    			<inp2:m_Recall name="usps_errors" />
+    			<inp2:m_RemoveVar name="usps_errors"/>
+    		</td>
+  		</tr>
+	</table>
+</inp2:m_if>
+
+<inp2:ord_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="!la_section_OrderShipping!"/>
+
+			<inp2:m_if check="ord_OrderEditable">
+
+				<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingTo" title="!la_fld_ShippingTo!" size="40"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingCompany" title="!la_fld_ShippingCompany!" size="40"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingPhone" title="!la_fld_ShippingPhone!" size="20"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingFax" title="!la_fld_ShippingFax!" size="20"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingEmail" title="!la_fld_ShippingEmail!" size="20"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingAddress1" title="!la_fld_ShippingAddress1!" size="40"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingAddress2" title="!la_fld_ShippingAddress2!" size="40"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingCity" title="!la_fld_ShippingCity!" size="20"/>
+
+				<script type="text/javascript">
+					function update_address()
+					{
+						submit_event('ord','OnQuietPreSave');
+					}
+				</script>
+
+				<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingState" title="!la_fld_ShippingState!" size="20" />
+				<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingZip" title="!la_fld_ShippingZip!" size="10"/>
+				<inp2:m_RenderElement name="inp_edit_options" prefix="ord" field="ShippingCountry" title="!la_fld_ShippingCountry!" size="20" />
+
+				<inp2:m_DefineElement name="order_option">
+					<input onclick="submit_event('ord','OnQuietPreSave');"  class="simple" type="radio" <inp2:m_param name="checked"/> name="<inp2:InputName field="$field"/>" id="<inp2:InputName field="$field"/>_<inp2:m_param name="key"/>" value="<inp2:m_param name="key"/>"><label for="<inp2:InputName field="$field"/>_<inp2:m_param name="key"/>"><inp2:m_phrase label="$option"/></label>&nbsp;<br>
+				</inp2:m_DefineElement>
+
+				<!-- <inp2:m_RenderElement name="inp_edit_radio" prefix="ord" field="ShippingOption" title="!la_fld_ShippingOption!" size="20" /> -->
+
+				<inp2:m_DefineElement name="order_shipping_type">
+					<option <inp2:m_param name="selected"/> value="<inp2:m_param name="ShippingId"/>"><inp2:m_param name="ShippingName"/> (<inp2:m_param name="TotalCost"/>)
+				</inp2:m_DefineElement>
+
+				<inp2:m_DefineElement name="order_shipment">
+					<tr class="<inp2:m_odd_even var="shipping_odd_even" odd="table-color1" even="table-color2"/>">
+						<td style="border-right: 1px solid black"><inp2:m_param name="shipment"/></td>
+						<td>
+							<select style="width:230px;" name="<inp2:m_param name="field_name"/>" id="<inp2:m_param name="field_name"/>">
+								<inp2:ord_PrintShippingTypes block="order_shipping_type" />
+							</select>
+						</td>
+					</tr>
+				</inp2:m_DefineElement>
+
+				<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+					<inp2:m_inc param="tab_index" by="1"/>
+					<td class="label-cell">
+						<inp2:m_Phrase label="la_fld_ShippingOptions"/>:
+					</td>
+					<td class="control-mid">&nbsp;</td>
+					<td class="control-cell">
+						<inp2:ord_PredefinedOptions field="ShippingOption" block="order_option" selected="checked" />
+					</td>
+				</tr>
+
+				<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+					<inp2:m_inc param="tab_index" by="1"/>
+					<td class="label-cell">
+						<inp2:m_Phrase label="la_fld_ShippingType"/>:
+					</td>
+					<td class="control-mid">&nbsp;</td>
+					<td class="control-cell">
+						<table border="0" cellspacing="1" cellpadding="3" width="100%" style="border: 1px solid black; border-collapse: collapse">
+							<tr class="subsectiontitle" style="border-bottom: 1px solid black">
+								<td width="25%" style="border-right: 1px solid black"><b><inp2:m_Phrase label="lu_ship_Shipment" /></b></td>
+								<td width="45%" style="border-right: 1px solid black"><b><inp2:m_Phrase label="lu_ship_ShippingType" /></b></td>
+							</tr>
+
+							<inp2:ord_PrintShippings block="order_shipment"/>
+						</table>
+					</td>
+				</tr>
+
+				<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingCost" title="!la_fld_ShippingCost!" size="10"/>
+
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="InsuranceFee" title="!la_fld_InsuranceFee!" size="10" format="$ %.2f"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingCustomerAccount" title="!la_fld_ShippingCustomerAccount!" size="30"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingTracking" title="!la_fld_ShippingTracking!" size="30"/>
+				<inp2:m_RenderElement name="inp_edit_date_time" prefix="ord" field="ShippingDate" title="!la_fld_ShippingDate!" size="16"/>
+
+			<inp2:m_else/>
+
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingTo" title="!la_fld_ShippingTo!" size="40"/>
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingCompany" title="!la_fld_ShippingCompany!" size="40"/>
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingPhone" title="!la_fld_ShippingPhone!" size="20"/>
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingFax" title="!la_fld_ShippingFax!" size="20"/>
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingEmail" title="!la_fld_ShippingEmail!" size="20"/>
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingAddress1" title="!la_fld_ShippingAddress1!" size="40"/>
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingAddress2" title="!la_fld_ShippingAddress2!" size="40"/>
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingCity" title="!la_fld_ShippingCity!" size="20"/>
+
+				<script type="text/javascript">
+					function update_address()
+					{
+						submit_event('ord','OnQuietPreSave');
+					}
+				</script>
+
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingCountry" title="!la_fld_ShippingCountry!" size="20"/>
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingState" title="!la_fld_ShippingState!" size="20"/>
+
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingZip" title="!la_fld_ShippingZip!" size="10"/>
+
+				<inp2:m_DefineElement name="order_option_label">
+					<inp2:m_param name="key"/> <inp2:m_phrase label="$option"/>
+				</inp2:m_DefineElement>
+
+				<!--inp2:m_ParseBlock name="inp_edit_radio" prefix="ord" field="ShippingOption" title="!la_fld_ShippingOption!" size="20"/-->
+
+				<inp2:m_DefineElement name="order_shipping_type">
+					<option <inp2:m_param name="selected"/> value="<inp2:m_param name="ShippingId"/>"><inp2:m_param name="ShippingName"/> (<inp2:m_param name="TotalCost"/>)
+				</inp2:m_DefineElement>
+
+				<inp2:m_DefineElement name="order_shipment_label">
+					<inp2:m_param name="shipment"/> - <inp2:ord_PrintShippingTypes block="order_shipping_type" selected_only="1"/>
+				</inp2:m_DefineElement>
+
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingOption" title="!la_fld_ShippingOptions!" size="10"/>
+
+				<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+					<inp2:m_inc param="tab_index" by="1"/>
+					<td class="label-cell">
+						<inp2:m_Phrase label="la_fld_ShippingType"/>:
+					</td>
+					<td class="control-mid">&nbsp;</td>
+					<td class="control-cell">
+						<inp2:ord_PrintShippings block="order_shipment_label"/>
+					</td>
+				</tr>
+
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingCost" title="!la_fld_ShippingCost!" size="10" format="$ %.2f"/>
+
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="InsuranceFee" title="!la_fld_InsuranceFee!" size="10" format="$ %.2f"/>
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingCustomerAccount" title="!la_fld_ShippingCustomerAccount!" size="30"/>
+
+				<inp2:m_DefineElement name="inp_shipping_label" is_last="" as_label="" currency="" is_last="">
+					<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+						<inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" is_last="$is_last"/>
+						<td valign="top" class="control-cell">
+							<inp2:{$prefix}_Field field="$field" as_label="$as_label" currency="$currency"/>
+
+							<inp2:m_if check="{$prefix}_USPSLabelFound" field="$field">
+								&nbsp; &nbsp;<a href="#" onClick="javascript:submit_event('<inp2:m_Param name="prefix"/>', 'OnDownloadLabel'); return false;"><inp2:m_Phrase label="la_ViewLabel"/></a>
+							</inp2:m_if>
+						</td>
+					</tr>
+				</inp2:m_DefineElement>
+
+				<inp2:m_RenderElement name="inp_shipping_label" prefix="ord" field="ShippingTracking" title="!la_fld_ShippingTracking!" size="30"/>
+
+
+				<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingDate" title="!la_fld_ShippingDate!" size="16"/>
+
+			</inp2:m_if>
+
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<input type="hidden" name="to_tab" value="Shipping">
+<input type="hidden" name="check_shipping_address" value="true" />
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/orders/orders_edit_shipping.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.13.2.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/orders/order_product_edit.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/orders/order_product_edit.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/orders/order_product_edit.tpl	(revision 12131)
@@ -0,0 +1,159 @@
+<inp2:adm_SetPopupSize width="820" height="570"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord" section="in-commerce:orders" title_preset="orders_product_edit"/>
+
+<inp2:m_SetParam use_grid="0"/>
+<inp2:m_if check="p_ShouldListOptions">
+	<inp2:m_if check="p_FieldEquals" field="OptionsSelectionMode" value="1"> <!-- Listable options (combinations) -->
+		<inp2:m_SetParam use_grid="1"/>
+	</inp2:m_if>
+</inp2:m_if>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							if (Grids['poc']) {
+								if (Grids['poc'].SelectedCount == 0)  {
+									return;
+								}
+								set_hidden_field('qty[<inp2:p_Field name="ProductId"/>]['+Grids['poc'].GetSelected()[0]+']',1)
+							}
+							submit_event('ord','<inp2:m_if check="orditems_IsNewItem">OnAddToCart<inp2:m_else/>OnUpdateItemOptions</inp2:m_if>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('orditems','OnCancel');
+						}
+				 ) );
+
+				<inp2:m_if check="m_Param" name="use_grid">
+					a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+				</inp2:m_if>
+
+				a_toolbar.Render();
+			</script>
+		</td>
+
+		<inp2:m_if check="m_Param" name="use_grid">
+			<inp2:m_RenderElement name="search_main_toolbar" prefix="poc" grid="Radio"/>
+		</inp2:m_if>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_if check="p_ShouldListOptions">
+	<input type="hidden" name="p_id" value="<inp2:p_Field name='ProductId'/>">
+
+	<inp2:m_if check="p_OptionsHaveError">
+		<table width="100%" border="0" cellspacing="0" cellpadding="4" class="warning-table">
+  		<tr>
+    		<td valign="top" class="hint_red">
+    			<inp2:p_OptionsError required="lu_comm_OptionsRequired" not_available="lu_comm_OptionsNotAvailable"/>
+    		</td>
+  		</tr>
+		</table>
+	</inp2:m_if>
+
+	<inp2:m_if check="p_FieldEquals" field="OptionsSelectionMode" value="1"> <!-- Listable options (combinations) -->
+		<script type="text/javascript">
+			function edit() {
+				set_hidden_field('qty[<inp2:p_Field name="ProductId"/>]['+Grids['poc'].GetSelected()[0]+']',1)
+				submit_event('ord','<inp2:m_if check="orditems_IsNewItem">OnAddToCart<inp2:m_else/>OnUpdateItemOptions</inp2:m_if>');
+			}
+		</script>
+
+		<inp2:m_DefineElement name="combination_option_element">
+			<strong><inp2:m_Param name="option_name" />: </strong>
+			<inp2:m_Param name="option_value" /><inp2:m_if check="m_ParamEquals" param="is_last" value="1"><inp2:m_else/>, </inp2:m_if>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="grid_combination_td">
+			<inp2:ShowCombination render_as="combination_option_element"/>
+		</inp2:m_DefineElement>
+
+		<inp2:m_RenderElement name="grid" main_special="" PrefixSpecial="poc" IdField="CombinationId" grid="Radio"/>
+	<inp2:m_else/> <!-- Selectable options -->
+		<inp2:m_DefineElement name="option_select_element">
+				<option value="<inp2:m_param name="id"/>" <inp2:m_param name="selected"/>><inp2:m_param name="value"/><inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/>: (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if></option>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="option_cb_element">
+				<input type="checkbox" <inp2:m_param name="selected"/>
+							name="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>][]"
+							id="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]_<inp2:m_param name="id"/>"
+							value="<inp2:m_param name="id"/>" />
+					<label for="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]_<inp2:m_param name="id"/>">
+						<inp2:m_param name="value"/><inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/>: (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if>&nbsp;&nbsp;
+					</label>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="option_radio_element">
+				<input type="radio" <inp2:m_param name="selected"/>
+							name="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]"
+							id="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]_<inp2:m_param name="id"/>"
+							value="<inp2:m_param name="id"/>" />
+					<label for="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]_<inp2:m_param name="id"/>">
+						<inp2:m_param name="value"/><inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/>: (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if>&nbsp;&nbsp;
+					</label>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="option_element">
+			<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+				<inp2:m_inc param="tab_index" by="1"/>
+				<td class="label-cell">
+					<inp2:Field name="Name"/><inp2:m_if check="FieldEquals" field="Required" value="1"><span class="error">*</span></inp2:m_if>:
+				</td>
+				<td class="control-mid">&nbsp;</td>
+				<td class="control-cell">
+					<inp2:m_if check="FieldEquals" field="OptionType" value="1"> <!-- drop-down -->
+						<select name="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]">
+							<option value=""></option>
+							<inp2:ShowOptions render_as="option_select_element" currency="selected" preselect_first="1"/>
+						</select>
+					</inp2:m_if>
+
+					<inp2:m_if check="FieldEquals" field="OptionType" value="5"> <!-- editbox -->
+						<input type="text" name="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]" value="<inp2:OptionData/>"/>
+					</inp2:m_if>
+
+					<inp2:m_if check="FieldEquals" field="OptionType" value="4"> <!-- textarea -->
+						<textarea cols="50" rows="5" name="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]"><inp2:OptionData/></textarea>
+					</inp2:m_if>
+
+					<inp2:m_if check="FieldEquals" field="OptionType" value="6"> <!-- checkboxeS -->
+						<inp2:ShowOptions render_as="option_cb_element" currency="selected"/>
+					</inp2:m_if>
+
+					<inp2:m_if check="FieldEquals" field="OptionType" value="3"> <!-- radio buttons -->
+						<inp2:ShowOptions render_as="option_radio_element" currency="selected" preselect_first="1"/>
+					</inp2:m_if>
+				</td>
+			</tr>
+		</inp2:m_DefineElement>
+
+		<div id="scroll_container">
+			<table class="edit-form">
+				<inp2:m_RenderElement name="subsection" title="!lu_comm_SelectOptions!"/>
+
+				<inp2:p_ListOptions no_table="1" per_page="-1" render_as="option_element" row_start_render_as="html:" row_end_render_as="html:"/>
+				<inp2:m_RenderElement name="inp_edit_filler"/>
+			</table>
+		</div>
+	</inp2:m_if>
+<inp2:m_else/>
+		Product Doesn't Use Options.
+</inp2:m_if>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/orders/order_product_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5.2.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/orders/orders_toship_list.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/orders/orders_toship_list.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/orders/orders_toship_list.tpl	(revision 12131)
@@ -0,0 +1,84 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord.toship" section="in-commerce:orders" title_preset="orders_toship" pagination="1" tabs="in-commerce/orders/orders_list_tabs"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+  			//do not rename - this function is used in default grid for double click!
+  			function edit()
+  			{
+  				set_hidden_field('remove_specials[ord.toship]',1);
+  				std_edit_item('ord.toship', 'in-commerce/orders/orders_edit');
+  			}
+
+  			var a_toolbar = new ToolBar();
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+				a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone" escape="1"/>', function() {
+							set_hidden_field('remove_specials[ord.toship]',1);
+							submit_event('ord.toship','OnMassClone');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('ship', '<inp2:m_phrase label="la_ToolTip_Ship" escape="1"/>', function() {
+							submit_event('ord.toship','OnMassOrderShip');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('deny', '<inp2:m_phrase label="la_ToolTip_Deny" escape="1"/>', function() {
+							submit_event('ord.toship','OnMassOrderDeny');
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarButton('archive', '<inp2:m_phrase label="la_ToolTip_Archive" escape="1"/>', function() {
+							submit_event('ord.toship','OnMassOrderArchive');
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarSeparator('sep4') );
+
+				 a_toolbar.AddButton( new ToolBarButton('print', '<inp2:m_phrase label="la_ToolTip_Print" escape="1"/>', function() {
+							print_orders('ord.toship', 'in-commerce/orders/orders_print');
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="ord.toship" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_DefineElement name="usps_errors">
+	<table width="100%" border="0" cellspacing="0" cellpadding="4" class="warning-table">
+  		<tr>
+    		<td valign="top" class="form-warning">
+    			Order: <inp2:m_Param name="order_number"/>. USPS error: <inp2:m_Param name="error_description"/>
+    		</td>
+  		</tr>
+	</table>
+</inp2:m_DefineElement>
+
+<inp2:ord_PrintUSPSErrors render_as="usps_errors" />
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="ord.toship" IdField="OrderId" grid="Default"/>
+<script type="text/javascript">
+	Grids['ord.toship'].SetDependantToolbarButtons( new Array('edit','delete','clone','ship','deny','archive','print') );
+</script>
+<inp2:m_include t="incs/footer"/>
+<script type="text/javascript">
+	set_hidden_field('order_type','toship');
+</script>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/orders/orders_toship_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/orders/orders_backorders_list.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/orders/orders_backorders_list.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/orders/orders_backorders_list.tpl	(revision 12131)
@@ -0,0 +1,72 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord.backorders" section="in-commerce:orders" title_preset="orders_backorders" pagination="1" tabs="in-commerce/orders/orders_list_tabs"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+  			//do not rename - this function is used in default grid for double click!
+  			function edit()
+  			{
+  				set_hidden_field('remove_specials[ord.backorders]',1);
+  				std_edit_item('ord.backorders', 'in-commerce/orders/orders_edit');
+  			}
+
+  			var a_toolbar = new ToolBar();
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+				a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone" escape="1"/>', function() {
+							set_hidden_field('remove_specials[ord.backorders]',1);
+							submit_event('ord.backorders','OnMassClone');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('process', '<inp2:m_phrase label="la_ToolTip_Process" escape="1"/>', function() {
+							submit_event('ord.backorders','OnMassOrderProcess');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('deny', '<inp2:m_phrase label="la_ToolTip_Deny" escape="1"/>', function() {
+							submit_event('ord.backorders','OnMassOrderDeny');
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarButton('archive', '<inp2:m_phrase label="la_ToolTip_Archive" escape="1"/>', function() {
+							submit_event('ord.backorders','OnMassOrderArchive');
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarSeparator('sep4') );
+
+				 a_toolbar.AddButton( new ToolBarButton('print', '<inp2:m_phrase label="la_ToolTip_Print" escape="1"/>', function() {
+							print_orders('ord.backorders', 'in-commerce/orders/orders_print');
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="ord.backorders" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="ord.backorders" IdField="OrderId" grid="Default"/>
+<script type="text/javascript">
+	Grids['ord.backorders'].SetDependantToolbarButtons( new Array('edit','delete','clone','process','deny','archive','print') );
+</script>
+<inp2:m_include t="incs/footer"/>
+<script type="text/javascript">
+	set_hidden_field('order_type','backorders');
+</script>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/orders/orders_backorders_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/orders/orders_pending_list.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/orders/orders_pending_list.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/orders/orders_pending_list.tpl	(revision 12131)
@@ -0,0 +1,74 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord.pending" section="in-commerce:orders" title_preset="orders_pending" pagination="1" tabs="in-commerce/orders/orders_list_tabs"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+  			//do not rename - this function is used in default grid for double click!
+  			function edit()
+  			{
+  				set_hidden_field('remove_specials[ord.pending]',1);
+  				std_edit_item('ord.pending', 'in-commerce/orders/orders_edit');
+  			}
+
+  			var a_toolbar = new ToolBar();
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+				a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone" escape="1"/>', function() {
+							set_hidden_field('remove_specials[ord.pending]',1);
+							submit_event('ord.pending','OnMassClone');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
+							submit_event('ord.pending','OnMassOrderApprove');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('deny', '<inp2:m_phrase label="la_ToolTip_Deny" escape="1"/>', function() {
+							submit_event('ord.pending','OnMassOrderDeny');
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarSeparator('sep4') );
+
+//				 a_toolbar.AddButton( new ToolBarSeparator('sep5') );
+
+				 a_toolbar.AddButton( new ToolBarButton('print', '<inp2:m_phrase label="la_ToolTip_Print" escape="1"/>', function() {
+							print_orders('ord.pending', 'in-commerce/orders/orders_print');
+						}
+				 ) );
+
+				//  a_toolbar.AddButton( new ToolBarButton('pdf', '<inp2:m_phrase label="la_ToolTip_Pdf" escape="1"/>', function() {
+				//			submit_event('ord.pending','OnGeneratePDF');
+				//		}
+				//  ) );
+
+				 a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="ord.pending" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="ord.pending" IdField="OrderId" grid="Default"/>
+<script type="text/javascript">
+	Grids['ord.pending'].SetDependantToolbarButtons( new Array('edit','delete','clone','approve','deny','archive','print') );
+</script>
+<inp2:m_include t="incs/footer"/>
+<script type="text/javascript">
+	set_hidden_field('order_type','pending');
+</script>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/orders/orders_pending_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.10.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/orders/orders_archived_list.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/orders/orders_archived_list.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/orders/orders_archived_list.tpl	(revision 12131)
@@ -0,0 +1,60 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord.archived" section="in-commerce:orders" title_preset="orders_archived" pagination="1" tabs="in-commerce/orders/orders_list_tabs"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+  			//do not rename - this function is used in default grid for double click!
+  			function edit()
+  			{
+  				set_hidden_field('remove_specials[ord.archived]',1);
+  				std_edit_item('ord.archived', 'in-commerce/orders/orders_edit');
+  			}
+
+  			var a_toolbar = new ToolBar();
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('ord.archived')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+				 a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone" escape="1"/>', function() {
+							set_hidden_field('remove_specials[ord.archived]',1);
+							submit_event('ord.archived','OnMassClone');
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarButton('print', '<inp2:m_phrase label="la_ToolTip_Print" escape="1"/>', function() {
+							print_orders('ord.archived', 'in-commerce/orders/orders_print');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="ord.archived" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="ord.archived" IdField="OrderId" grid="Default"/>
+<script type="text/javascript">
+	Grids['ord.archived'].SetDependantToolbarButtons( new Array('edit','delete','clone','print') );
+</script>
+<inp2:m_include t="incs/footer"/>
+
+<script type="text/javascript">
+	set_hidden_field('order_type','archived');
+</script>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/orders/orders_archived_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.8.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/orders/orders_processed_list.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/orders/orders_processed_list.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/orders/orders_processed_list.tpl	(revision 12131)
@@ -0,0 +1,67 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord.processed" section="in-commerce:orders" title_preset="orders_processed" pagination="1" tabs="in-commerce/orders/orders_list_tabs"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+  			//do not rename - this function is used in default grid for double click!
+  			function edit()
+  			{
+  				set_hidden_field('remove_specials[ord.processed]',1);
+  				std_edit_item('ord.processed', 'in-commerce/orders/orders_edit');
+  			}
+
+  			var a_toolbar = new ToolBar();
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+				a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone" escape="1"/>', function() {
+							set_hidden_field('remove_specials[ord.processed]',1);
+							submit_event('ord.processed','OnMassClone');
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarButton('archive', '<inp2:m_phrase label="la_ToolTip_Archive" escape="1"/>', function() {
+							submit_event('ord.processed','OnMassOrderArchive');
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarButton('deny', '<inp2:m_phrase label="la_ToolTip_Deny" escape="1"/>', function() {
+							submit_event('ord.processed','OnMassOrderDeny');
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarSeparator('sep4') );
+
+				 a_toolbar.AddButton( new ToolBarButton('print', '<inp2:m_phrase label="la_ToolTip_Print" escape="1"/>', function() {
+							print_orders('ord.processed', 'in-commerce/orders/orders_print');
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="ord.processed" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="ord.processed" IdField="OrderId" grid="Default"/>
+<script type="text/javascript">
+	Grids['ord.processed'].SetDependantToolbarButtons( new Array('edit','delete', 'deny', 'clone','archive','print') );
+</script>
+<inp2:m_include t="incs/footer"/>
+<script type="text/javascript">
+	set_hidden_field('order_type','processed');
+</script>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/orders/orders_processed_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.8.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/orders/orders_denied_list.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/orders/orders_denied_list.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/orders/orders_denied_list.tpl	(revision 12131)
@@ -0,0 +1,73 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord.denied" section="in-commerce:orders" title_preset="orders_denied" pagination="1" tabs="in-commerce/orders/orders_list_tabs"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+  			//do not rename - this function is used in default grid for double click!
+  			function edit()
+  			{
+  				set_hidden_field('remove_specials[ord.denied]',1);
+  				std_edit_item('ord.denied', 'in-commerce/orders/orders_edit');
+  			}
+
+  			var a_toolbar = new ToolBar();
+//				a_toolbar.AddButton( new ToolBarButton('new_order', '<inp2:m_phrase label="la_ToolTip_New_Order" escape="1"/>',
+//						function() {
+//							set_hidden_field('remove_specials[ord.denied]',1);
+//							std_precreate_item('ord.denied', 'in-commerce/orders/orders_edit')
+//						} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('ord.denied')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+				a_toolbar.AddButton( new ToolBarButton('reset_to_pending', '<inp2:m_phrase label="la_ToolTip_ResetToPending" escape="1"/>', function() {
+							set_hidden_field('remove_specials[ord.denied]',1);
+							submit_event('ord.denied','OnResetToPending');
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarSeparator('sep4') );
+
+				 a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone" escape="1"/>', function() {
+							set_hidden_field('remove_specials[ord.denied]',1);
+							submit_event('ord.denied','OnMassClone');
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarButton('print', '<inp2:m_phrase label="la_ToolTip_Print" escape="1"/>', function() {
+							print_orders('ord.denied', 'in-commerce/orders/orders_print');
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="ord.denied" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="ord.denied" IdField="OrderId" grid="Default"/>
+<script type="text/javascript">
+	Grids['ord.denied'].SetDependantToolbarButtons( new Array('edit','delete','reset_to_pending', 'clone','print') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
+<script type="text/javascript">
+	set_hidden_field('order_type','denied');
+</script>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/orders/orders_denied_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/orders/orders_edit_items.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/orders/orders_edit_items.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/orders/orders_edit_items.tpl	(revision 12131)
@@ -0,0 +1,251 @@
+<inp2:adm_SetPopupSize width="820" height="570"/>
+
+<inp2:m_include t="incs/header"/>
+
+<inp2:m_if check="ord_OrderEditable">
+	<inp2:m_SetParam grid="Default"/>
+<inp2:m_else/>
+	<inp2:m_SetParam grid="NotEditable"/>
+</inp2:m_if>
+
+<inp2:m_RenderElement name="combined_header" prefix="ord" section="in-commerce:orders" title_preset="orders_edit_items" grid="$grid" pagination="1" pagination_prefix="orditems" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('ord','<inp2:ord_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('ord','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('ord', '<inp2:ord_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('ord', '<inp2:ord_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				function edit(){
+					std_edit_temp_item('orditems', 'in-commerce/orders/order_product_edit');
+				}
+
+				<inp2:m_if check="ord_OrderEditable">
+
+					//Order items related:
+					a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_Add_Items" escape="1"/>',
+							function() {
+								openSelector('orditems', '<inp2:adm_SelectorLink prefix="ord" selection_mode="single" tab_prefixes="p"/>', '', null, 'OnSaveItems');
+							} ) );
+
+					a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+							function() {
+								std_delete_items('orditems')
+							} ) );
+
+
+					a_toolbar.AddButton( new ToolBarButton('recalculate_order', '<inp2:m_phrase label="la_RecalculateOrder"/>',
+								function() {
+									submit_event('ord', 'OnRecalculateItems');
+								}	) );
+
+					a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+				</inp2:m_if>
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="ord_Status" is_not="incomplete">
+					a_toolbar.HideButton('arrange');
+				</inp2:m_if>
+
+				<inp2:m_if check="ord_IsSingle">
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					//a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="ord_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="ord_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+
+				// stuff for updating extended price based on price & quantity entered
+				function CalculateSubtotal($prefix_special, $price_field, $result_id) {
+					if (typeof(Grids[$prefix_special]) != 'object') {
+						return false;
+					}
+
+					var $sub_total = 0;
+					var $grid_items = Grids[$prefix_special].Items;
+
+					for (var $i in $grid_items) {
+						$id = $grid_items[$i].ItemId;
+						var $price_control = document.getElementById($prefix_special + '['+$id+'][' + $price_field + ']');
+						$sub_total += NumberFormatter.Parse($price_field == 'ExtendedPrice' ? $price_control.innerHTML : $price_control.value);
+					}
+					document.getElementById($result_id).innerHTML = NumberFormatter.Format($sub_total.toFixed(2));
+				}
+
+				function UpdateExtendedPrice($prefix_special, $id)
+				{
+					<inp2:m_if check="ord_OrderEditable">
+						// 1. calculate current row extended price
+						var $qty = NumberFormatter.Parse(document.getElementById($prefix_special+'['+$id+'][Quantity]').value);
+						var $price = NumberFormatter.Parse(document.getElementById($prefix_special+'['+$id+'][Price]').value);
+
+						var $ext_price = Math.round($qty*$price*100)/100;
+						document.getElementById($prefix_special+'['+$id+'][ExtendedPrice]').innerHTML = NumberFormatter.Format($ext_price.toFixed(2));
+
+						// 2. recalculate subtotal
+						CalculateSubtotal($prefix_special, 'ExtendedPrice', 'order_subtotal');
+					</inp2:m_if>
+
+					// 3. recalculate return total
+					CalculateSubtotal('orditems', 'ReturnAmount', 'order_returntotal');
+				}
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="orditems" grid="$grid"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_DefineElement name="option_value_element">
+	<inp2:m_param name="value"/> <inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/> (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if>
+	<inp2:m_if check="m_ParamEquals" name="is_last" value="1"><inp2:m_else/>, </inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="option_element">
+	<inp2:m_if check="m_ParamEquals" param="type" value="6"> <!-- checkboxes - multiple -->
+		<strong><inp2:m_param name="option"/>:</strong>
+			<inp2:PrintOptionValues render_as="option_value_element"/>
+	<inp2:m_else/>
+			<strong><inp2:m_param name="option"/>:</strong> <inp2:m_param name="value"/>
+				<inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/> (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if>
+	</inp2:m_if><br/>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="option_value_element_no_price">
+	<inp2:m_param name="value"/>
+	<inp2:m_if check="m_ParamEquals" name="is_last" value="1"><inp2:m_else/>, </inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="option_element_no_price">
+	<inp2:m_if check="m_ParamEquals" param="type" value="6"> <!-- checkboxes - multiple -->
+		<strong><inp2:m_param name="option"/>:</strong>
+			<inp2:PrintOptionValues render_as="option_value_element_no_price"/>
+	<inp2:m_else/>
+			<strong><inp2:m_param name="option"/>:</strong> <inp2:m_param name="value"/>
+	</inp2:m_if><br/>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="product_image">
+	<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" /><br/>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="grid_productname_td" format="" module="">
+	<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">
+		<div style="width: 120px;">
+			<inp2:p_Image render_as="product_image" thumbnail="1" DefaultImage="noimage.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120" />
+		</div>
+	</inp2:m_if>
+
+	<inp2:Field field="$field" first_chars="50"/> (<inp2:Field field="ProductId"/>)
+	<inp2:m_if check="ord_BackOrderFlag"><span class="error"><inp2:m_Phrase label="la_ItemBackordered"/></span></inp2:m_if>
+	<inp2:m_if check="HasOptions">
+		<br/>
+		<small>
+			<inp2:m_if check="FieldEquals" field="OptionsSelectionMode" value="0">
+				<!-- selectable options -->
+				<inp2:PrintOptions render_as="option_element"/>
+			<inp2:m_else/>
+				<!-- listed combinations -->
+				<inp2:PrintOptions render_as="option_element_no_price"/>
+			</inp2:m_if>
+		</small>
+	</inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="grid_edit_td">
+	<input type="text" onkeyup="UpdateExtendedPrice('<inp2:m_param name="PrefixSpecial"/>', <inp2:{$PrefixSpecial}_Field field="OrderItemId"/>);" class="text" name="<inp2:{$PrefixSpecial}_InputName field="$field"/>" id="<inp2:{$PrefixSpecial}_InputName field="$field"/>" value="<inp2:{$PrefixSpecial}_field field="$field" grid="$grid"/>" size="4">
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="grid_quantity_td">
+	<inp2:m_if check="FieldEquals" field="Type" value="1">
+		<input type="text" onkeyup="UpdateExtendedPrice('<inp2:m_param name="PrefixSpecial"/>', <inp2:{$PrefixSpecial}_Field field="OrderItemId"/>);" class="text" name="<inp2:{$PrefixSpecial}_InputName field="$field"/>" id="<inp2:{$PrefixSpecial}_InputName field="$field"/>" value="<inp2:{$PrefixSpecial}_field field="$field" grid="$grid"/>" size="4">
+	<inp2:m_else />
+		<span class="text"><inp2:{$PrefixSpecial}_field field="$field" grid="$grid"/></span>
+		<inp2:m_RenderElement name="inp_edit_hidden" prefix="$PrefixSpecial" field="$field"/>
+	</inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="grid_price_td">
+	<input type="text" onkeyup="UpdateExtendedPrice('<inp2:m_param name="PrefixSpecial"/>', <inp2:{$PrefixSpecial}_Field field="OrderItemId"/>);" class="text" name="<inp2:{$PrefixSpecial}_InputName field="$field"/>" id="<inp2:{$PrefixSpecial}_InputName field="$field"/>" value="<inp2:{$PrefixSpecial}_field field="$field" grid="$grid"/>" size="5">
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="grid_extendedprice_td">
+	<span id="<inp2:InputName field="$field"/>"><inp2:Field field="$field" grid="$grid" format="%.2f"/></span>
+	<script type="text/javascript">UpdateExtendedPrice('<inp2:m_param name="PrefixSpecial"/>',<inp2:Field field="OrderItemId"/>);</script>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="orderitems_total_td">
+	<inp2:m_if check="FieldOption" field="$field" option="totals">
+		<inp2:FieldOption field="$field" option="totals" result_to_var="totals"/>
+		'<inp2:FieldTotal field="$field" function="$totals"/>'
+	<inp2:m_else/>
+		<inp2:m_if check="m_Param" name="field" equals_to="ReturnAmount">
+			'<span id="order_returntotal">0.00</span>'
+		</inp2:m_if>
+
+		<inp2:m_if check="m_Param" name="field" equals_to="ExtendedPrice">
+			<inp2:m_if check="ord_OrderEditable">
+				'<span id="order_subtotal">0.00</span>'
+			<inp2:m_else/>
+				'<span id="order_subtotal"><inp2:ord_Field name="SubTotal"/></span>'
+			</inp2:m_if>
+		</inp2:m_if>
+
+		<inp2:m_ifnot check="m_Param" name="field" equals_to="ReturnAmount|ExtendedPrice">
+		'&nbsp;'
+		</inp2:m_ifnot>
+	</inp2:m_if>
+	<inp2:m_ifnot check="m_Param" name="is_last">, </inp2:m_ifnot>
+</inp2:m_DefineElement>
+
+<inp2:m_RenderElement name="grid" grid="$grid" PrefixSpecial="orditems" IdField="OrderItemId" totals_block="orderitems_total_td" totals_render_as="grid_total_row"/>
+
+<script type="text/javascript">
+	Grids['orditems'].SetDependantToolbarButtons( new Array('delete') );
+
+	<inp2:m_if check="ord_OrderEditable">
+		CalculateSubtotal('orditems', 'ExtendedPrice', 'order_subtotal');
+	</inp2:m_if>
+
+	CalculateSubtotal('orditems', 'ReturnAmount', 'order_returntotal');
+</script>
+
+<input type="hidden" name="main_prefix" id="main_prefix" value="ord">
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/orders/orders_edit_items.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.18.2.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/orders/orders_incomplete_list.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/orders/orders_incomplete_list.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/orders/orders_incomplete_list.tpl	(revision 12131)
@@ -0,0 +1,80 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord.incomplete" section="in-commerce:orders" title_preset="orders_incomplete" pagination="1" tabs="in-commerce/orders/orders_list_tabs"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+  			//do not rename - this function is used in default grid for double click!
+  			function edit()
+  			{
+  				set_hidden_field('remove_specials[ord.incomplete]',1);
+  				std_edit_item('ord.incomplete', 'in-commerce/orders/orders_edit');
+  			}
+
+  			var a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('new_order', '<inp2:m_phrase label="la_ToolTip_New_Order" escape="1"/>',
+						function() {
+							set_hidden_field('remove_specials[ord.incomplete]',1);
+							std_precreate_item('ord.incomplete', 'in-commerce/orders/orders_edit')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+				a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone" escape="1"/>', function() {
+						set_hidden_field('remove_specials[ord.incomplete]',1);
+						submit_event('ord.incomplete','OnMassClone');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('deny', '<inp2:m_phrase label="la_ToolTip_Deny" escape="1"/>', function() {
+							submit_event('ord.incomplete','OnMassOrderDeny');
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarButton('in-commerce:archive', '<inp2:m_phrase label="la_ToolTip_Archive" escape="1"/>', function() {
+							submit_event('ord.incomplete','OnMassOrderArchive');
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarButton('in-commerce:place_order', '<inp2:m_phrase label="la_ToolTip_PlaceOrder" escape="1"/>', function() {
+							submit_event('ord.incomplete','OnMassPlaceOrder');
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarSeparator('sep4') );
+
+//				 a_toolbar.AddButton( new ToolBarSeparator('sep5') );
+
+				 a_toolbar.AddButton( new ToolBarButton('print', '<inp2:m_phrase label="la_ToolTip_Print" escape="1"/>', function() {
+				 			print_orders('ord.incomplete', 'in-commerce/orders/orders_print');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="ord.incomplete" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="ord.incomplete" IdField="OrderId" grid="Default"/>
+<script type="text/javascript">
+	Grids['ord.incomplete'].SetDependantToolbarButtons( new Array('edit','delete','clone','deny','archive','place_order','print') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
+<script type="text/javascript">
+	set_hidden_field('order_type','incomplete');
+</script>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/orders/orders_incomplete_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.15.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/orders/orders_print.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/orders/orders_print.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/orders/orders_print.tpl	(revision 12131)
@@ -0,0 +1,19 @@
+<inp2:m_RequireLogin permissions="in-commerce:orders.view" system="1"/>
+<inp2:m_include t="incs/header" nobody="yes"/>
+
+<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF" onload="window.print();">
+	<link rel="stylesheet" rev="stylesheet" href="<inp2:adm_ModulePath module='In-Commerce'/>incs/order_print.css" type="text/css" />
+
+	<script type="text/javascript">
+		$(document).ready(
+			function() {
+				set_window_title('Orders Print');
+			}
+		)
+	</script>
+
+	<inp2:m_include t="in-commerce/orders/orders_blocks"/>
+
+	<inp2:ord_PrintList block="order_print_element"/>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/orders/orders_print.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/orders/orders_returns_list.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/orders/orders_returns_list.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/orders/orders_returns_list.tpl	(revision 12131)
@@ -0,0 +1,56 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord.returns" section="in-commerce:orders" title_preset="orders_returns" pagination="1" tabs="in-commerce/orders/orders_list_tabs"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+  			//do not rename - this function is used in default grid for double click!
+  			function edit()
+  			{
+  				set_hidden_field('remove_specials[ord.returns]',1);
+  				std_edit_item('ord.returns', 'in-commerce/orders/orders_edit');
+  			}
+
+  			var a_toolbar = new ToolBar();
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+				 a_toolbar.AddButton( new ToolBarButton('archive', '<inp2:m_phrase label="la_ToolTip_Archive" escape="1"/>', function() {
+							submit_event('ord.returns','OnMassOrderArchive');
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarSeparator('sep4') );
+
+				 a_toolbar.AddButton( new ToolBarButton('print', '<inp2:m_phrase label="la_ToolTip_Print" escape="1"/>', function() {
+							print_orders('ord.returns', 'in-commerce/orders/orders_print');
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="ord.returns" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="ord.returns" IdField="OrderId" grid="Default"/>
+<script type="text/javascript">
+	Grids['ord.returns'].SetDependantToolbarButtons( new Array('edit','delete', 'deny', 'clone','archive','print') );
+</script>
+<inp2:m_include t="incs/footer"/>
+<script type="text/javascript">
+	set_hidden_field('order_type','processed');
+</script>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/orders/orders_returns_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/orders/orders_search_list.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/orders/orders_search_list.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/orders/orders_search_list.tpl	(revision 12131)
@@ -0,0 +1,71 @@
+<inp2:m_include t="incs/header"/>
+
+<inp2:m_RenderElement name="combined_header" prefix="ord.search" section="in-commerce:orders" grid="Search" title_preset="orders_search" pagination="1" tabs="in-commerce/orders/orders_list_tabs"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  		<td>
+	  		<script type="text/javascript">
+	  			//do not rename - this function is used in default grid for double click!
+	  			function edit()
+	  			{
+	  				set_hidden_field('remove_specials[ord.search]',1);
+	  				std_edit_item('ord.search', 'in-commerce/orders/orders_edit');
+	  			}
+
+	  			var a_toolbar = new ToolBar();
+
+  				a_toolbar.AddButton( new ToolBarButton('goto_order', '<inp2:m_phrase label="la_ToolTip_GoToOrder" escape="1"/>',
+						function() {
+							submit_event('ord.search','OnGoToOrder');
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+ 				a_toolbar.AddButton( new ToolBarButton('export', '<inp2:m_phrase label="la_ToolTip_Export" escape="1"/>', function() {
+				 			set_hidden_field('export_finish_t', 'in-commerce/orders/export/export_finish');
+				 			set_hidden_field('export_progress_t', 'in-commerce/orders/export/export_progress');
+							open_popup('ord.search', 'OnExport', 'in-commerce/orders/export/export');
+						}
+				 	) );
+
+
+				 a_toolbar.AddButton( new ToolBarButton('print', '<inp2:m_phrase label="la_ToolTip_Print" escape="1"/>', function() {
+							print_orders('ord.search', 'in-commerce/orders/orders_print');
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="ord.search" grid="Search"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="ord.search" IdField="OrderId" grid="Search" menu_filters="yes"/>
+
+<script type="text/javascript">
+	Grids['ord.search'].SetDependantToolbarButtons( new Array('edit','delete','print','goto_order','archive') );
+
+	function processUserSelector($field, $selector) {
+		var $user_id = parseInt( $selector.Grids['u'].GetSelected() );
+		var $field_mask = '<inp2:ord.search_SearchInputName field="#FIELD_NAME#" filter_type="like" grid="Search"/>';
+
+		document.getElementById( $field_mask.replace('#FIELD_NAME#', $field) ).value = $selector.$user_logins[ $user_id ];
+	}
+</script>
+<inp2:m_include t="incs/footer"/>
+<script type="text/javascript">
+	set_hidden_field('order_type','search');
+</script>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/orders/orders_search_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.18.2.6
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/orders/orders_list_tabs.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/orders/orders_list_tabs.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/orders/orders_list_tabs.tpl	(revision 12131)
@@ -0,0 +1,28 @@
+<inp2:m_include template="in-commerce/orders/order_blocks"/>
+
+<inp2:m_DefineElement name="orders_tabs">
+	<inp2:m_RenderElement name="tab_direct" title="la_tab_Pending" t="in-commerce/orders/orders_pending_list"/>
+	<inp2:m_RenderElement name="tab_direct" title="la_tab_BackOrders" t="in-commerce/orders/orders_backorders_list"/>
+	<inp2:m_RenderElement name="tab_direct" title="la_tab_ToShip" t="in-commerce/orders/orders_toship_list"/>
+	<inp2:m_RenderElement name="tab_direct" title="la_tab_Processed" t="in-commerce/orders/orders_processed_list"/>
+	<inp2:m_RenderElement name="tab_direct" title="la_tab_Denied" t="in-commerce/orders/orders_denied_list"/>
+	<inp2:m_RenderElement name="tab_direct" title="la_tab_Returns" t="in-commerce/orders/orders_returns_list"/>
+	<inp2:m_RenderElement name="tab_direct" title="la_tab_Archived" t="in-commerce/orders/orders_archived_list"/>
+	<inp2:m_RenderElement name="tab_direct" title="la_tab_Incomplete" t="in-commerce/orders/orders_incomplete_list"/>
+	<inp2:m_RenderElement name="tab_direct" title="la_tab_Search" t="in-commerce/orders/orders_search_list"/>
+</inp2:m_DefineElement>
+
+<inp2:m_RenderElement name="tabs_container" tabs_render_as="orders_tabs"/>
+
+<script type="text/javascript">
+
+	function print_orders($prefix_special, $t) {
+		if ($prefix_special.match(/(.*)\.(.*)/)) {
+			set_hidden_field('order_type', RegExp.$2);
+		}
+
+		set_hidden_field('remove_specials[' + $prefix_special + ']', 1);
+
+		open_popup($prefix_special, 'OnLoadSelected', $t, '750x700');
+	}
+</script>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/orders/orders_list_tabs.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.8.2.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/orders/order_blocks.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/orders/order_blocks.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/orders/order_blocks.tpl	(revision 12131)
@@ -0,0 +1,19 @@
+<inp2:m_DefineElement name="grid_ordernumber_td">
+	<a href="javascript:edit();"><inp2:Field field="$field" grid="$grid"/></a>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="grid_userlink_td">
+	<inp2:m_if check="UserFound" user_field="$user_field">
+		<a href="<inp2:UserLink edit_template='users/users_edit' user_field="$user_field"/>" onclick="return direct_edit('<inp2:m_Param name="PrefixSpecial"/>', this.href);" title="<inp2:m_phrase name="la_Edit_User"/>"><inp2:Field field="$field" grid="$grid"/></a>
+	<inp2:m_else/>
+		<inp2:Field field="$field" grid="$grid"/>
+	</inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="grid_previewlink_td">
+	<a href="<inp2:OrderLink edit_template="in-commerce/orders/orders_edit_preview"/>" onclick="return direct_edit('<inp2:m_Param name="PrefixSpecial"/>', this.href);" title="<inp2:m_phrase name="la_Order_Preview"/>"><inp2:Field field="$field" grid="$grid"/></a>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="grid_billinglink_td">
+	<a href="<inp2:OrderLink edit_template="in-commerce/orders/orders_edit_billing"/>" onclick="return direct_edit('<inp2:m_Param name="PrefixSpecial"/>', this.href);" title="<inp2:m_phrase name="la_Order_Billing_Information"/>"><inp2:Field field="$field" grid="$grid"/></a>
+</inp2:m_DefineElement>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/orders/order_blocks.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.3
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/orders/orders_blocks.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/orders/orders_blocks.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/orders/orders_blocks.tpl	(revision 12131)
@@ -0,0 +1,302 @@
+<inp2:m_DefineElement name="product_image">
+	<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" />
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="order_print_element">
+	<table cellspacing="0" cellpadding="2" width="100%" border="0" class="order_print_defaults">
+		<tr>
+			<td colspan="3" align="left">
+				<table width="100%" cellpadding="0" cellspacing="0">
+					<tr>
+						<td width="50%" align="left" valign="top">
+							<h2><inp2:m_GetConfig name="Comm_StoreName"/></h2>
+						</td>
+						<td width="50%" align="right">
+							<inp2:m_if check="m_ConfigEquals" name="Comm_AddressLine1" value="" inverse="inverse">
+								<inp2:m_GetConfig name="Comm_AddressLine1"/><br>
+							</inp2:m_if>
+							<inp2:m_if check="m_ConfigEquals" name="Comm_AddressLine2" value="" inverse="inverse">
+								<inp2:m_GetConfig name="Comm_AddressLine2"/><br>
+							</inp2:m_if>
+							<inp2:ord_PrintLocation type="Company"/><br />
+							E-Mail: <inp2:m_GetConfig name="Comm_Contacts_Email"/><br />
+							Phone: <inp2:m_GetConfig name="Comm_Contacts_Phone"/><br />
+							Fax: <inp2:m_GetConfig name="Comm_Contacts_Fax"/><br />
+						</td>
+					</tr>
+				</table>
+			</td>
+		</tr>
+
+		<tr>
+			<td colspan="3">
+				<br />
+				<center>
+					<h3>Order Number: <inp2:ord_Field field="OrderNumber"/></h3>
+					<inp2:ord_Field field="OrderDate" format="_regional_DateFormat"/><br />
+				</center>
+				<br />
+			</td>
+		</tr>
+
+		<inp2:m_if check="ord_Field" name="ShippingTo">
+		<tr>
+			<td width="50%" valign="top">
+				<br />
+				<!-- shipping -->
+				<table width="100%" cellpadding="0" cellspacing="0">
+					<tr>
+						<td class="order_preview_field_name">Ship To:</td>
+						<td><inp2:ord_Field field="ShippingTo"/></td>
+					</tr>
+					<inp2:m_if check="ord_Field" name="ShippingEmail">
+					<tr>
+						<td class="order_preview_field_name">Email Address:</td>
+						<td><inp2:ord_Field field="ShippingEmail"/></td>
+					</tr>
+					</inp2:m_if>
+					<inp2:m_if check="ord_Field" name="ShippingPhone">
+					<tr>
+						<td class="order_preview_field_name">Phone:</td>
+						<td><inp2:ord_Field field="ShippingPhone"/></td>
+					</tr>
+					</inp2:m_if>
+					<inp2:m_if check="ord_Field" name="ShippingFax">
+					<tr>
+						<td class="order_preview_field_name">Fax Number:</td>
+						<td><inp2:ord_Field field="ShippingFax"/></td>
+					</tr>
+					</inp2:m_if>
+					<inp2:m_if check="ord_Field" name="ShippingCompany">
+					<tr>
+						<td class="order_preview_field_name">Company:</td>
+						<td><inp2:ord_Field field="ShippingCompany"/></td>
+					</tr>
+					</inp2:m_if>
+					<tr>
+						<td class="order_preview_field_name" style="vertical-align: top;">Address:</td>
+						<td>
+							<inp2:m_if check="ord_FieldEquals" field="ShippingAddress1" value="" inverse="inverse" >
+								<inp2:ord_Field field="ShippingAddress1"/><br>
+							</inp2:m_if>
+							<inp2:m_if check="ord_FieldEquals" field="ShippingAddress2" value="" inverse="inverse" >
+								<inp2:ord_Field field="ShippingAddress2"/><br>
+							</inp2:m_if>
+							<inp2:ord_PrintLocation type="Shipping"/>
+						</td>
+					</tr>
+				</table>
+			</td>
+			</inp2:m_if>
+
+			<inp2:m_if check="ord_Field" name="BillingTo">
+			<td width="50%" valign="top">
+				<!-- billing -->
+				<br />
+				<table width="100%" cellpadding="0" cellspacing="0">
+					<tr>
+						<td class="order_preview_field_name">Bill To:</td>
+						<td><inp2:ord_Field field="BillingTo"/></td>
+					</tr>
+					<inp2:m_if check="ord_Field" name="BillingEmail">
+					<tr>
+						<td class="order_preview_field_name">Email Address:</td>
+						<td><inp2:ord_Field field="BillingEmail"/></td>
+					</tr>
+					</inp2:m_if>
+					<inp2:m_if check="ord_Field" name="BillingPhone">
+					<tr>
+						<td class="order_preview_field_name">Phone:</td>
+						<td><inp2:ord_Field field="BillingPhone"/></td>
+					</tr>
+					</inp2:m_if>
+					<inp2:m_if check="ord_Field" name="BillingFax">
+					<tr>
+						<td class="order_preview_field_name">Fax Number:</td>
+						<td><inp2:ord_Field field="BillingFax"/></td>
+					</tr>
+					</inp2:m_if>
+					<inp2:m_if check="ord_Field" name="BillingCompany">
+					<tr>
+						<td class="order_preview_field_name">Company:</td>
+						<td><inp2:ord_Field field="BillingCompany"/></td>
+					</tr>
+					</inp2:m_if>
+					<tr>
+						<td class="order_preview_field_name" style="vertical-align: top;">Address:</td>
+						<td>
+							<inp2:m_if check="ord_FieldEquals" field="BillingAddress1" value="" inverse="inverse" >
+								<inp2:ord_Field field="BillingAddress1"/><br>
+							</inp2:m_if>
+							<inp2:m_if check="ord_FieldEquals" field="BillingAddress2" value="" inverse="inverse" >
+								<inp2:ord_Field field="BillingAddress2"/><br>
+							</inp2:m_if>
+							<inp2:ord_PrintLocation type="Billing"/>
+						</td>
+					</tr>
+				</table>
+			</td>
+			</inp2:m_if>
+
+			<inp2:m_if check="ord_Field" name="ShippingTo" inverse="inverse"><td width="50%" valign="top">&nbsp;</td></inp2:m_if>
+			<inp2:m_if check="ord_Field" name="BillingTo" inverse="inverse"><td width="50%" valign="top">&nbsp;</td></inp2:m_if>
+		</tr>
+	</table>
+
+	<br /><br />
+
+	<table cellspacing="0" cellpadding="0" width="100%" border="0" class="orders_print_flat_table"<inp2:m_if check="ord_NextId"> style="page-break-after: always;"</inp2:m_if>>
+		<tr class="order_print_preview_header">
+			<td width="70%"<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders"> colspan="2"</inp2:m_if>>Product</td>
+			<td width="10%">Quantity</td>
+			<td width="10%">Price</td>
+			<td width="10%">Total</td>
+		</tr>
+
+		<inp2:m_DefineElement name="option_value_element">
+			<inp2:m_param name="value"/> <inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/> (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if>
+			<inp2:m_if check="m_ParamEquals" name="is_last" value="1"><inp2:m_else/>, </inp2:m_if>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="option_element">
+			<inp2:m_if check="m_ParamEquals" param="type" value="6"> <!-- checkboxes - multiple -->
+				<strong><inp2:m_param name="option"/>:</strong>
+					<inp2:PrintOptionValues render_as="option_value_element"/>
+			<inp2:m_else/>
+					<strong><inp2:m_param name="option"/>:</strong> <inp2:m_param name="value"/>
+						<inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/> (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if>
+			</inp2:m_if><br/>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="option_value_element_no_price">
+			<inp2:m_param name="value"/>
+			<inp2:m_if check="m_ParamEquals" name="is_last" value="1"><inp2:m_else/>, </inp2:m_if>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="option_element_no_price">
+			<inp2:m_if check="m_ParamEquals" param="type" value="6"> <!-- checkboxes - multiple -->
+				<strong><inp2:m_param name="option"/>:</strong>
+					<inp2:PrintOptionValues render_as="option_value_element_no_price"/>
+			<inp2:m_else/>
+					<strong><inp2:m_param name="option"/>:</strong> <inp2:m_param name="value"/>
+			</inp2:m_if><br/>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="order_detail_row">
+			<tr>
+				<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">
+					<td valign="top" width="120">
+						<inp2:p_Image render_as="product_image" thumbnail="1" DefaultImage="../../in-commerce/admin_templates/img/itemicons/no_picture_list.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120" />
+					</td>
+				</inp2:m_if>
+				<td align="left" width="100%">
+					<inp2:{$PrefixSpecial}_Field field="ProductName"/><br/>
+					<small><strong>SKU: </strong><inp2:Field field="SKU"/></small>
+					<inp2:m_if check="HasOptions">
+						<br/>
+						<small>
+						<inp2:m_if check="DisplayOptionsPricing"> <!-- selectable options or overriding combination -->
+							<inp2:PrintOptions render_as="option_element"/>
+						<inp2:m_else/> <!-- listed combinations -->
+							<inp2:PrintOptions render_as="option_element_no_price"/>
+						</inp2:m_if>
+						</small>
+						<br/>
+					</inp2:m_if>
+					<inp2:m_if check="HasDiscount">
+						<br />
+						<inp2:m_Phrase label="lu_comm_RegularPrice" />: <inp2:Field name="FlatPrice" /><br />
+						<inp2:m_Phrase label="lu_comm_Discount" />: - <inp2:Field name="ItemDiscount" />
+					</inp2:m_if>
+				</td>
+				<td align="right" nowrap><inp2:{$PrefixSpecial}_Field field="Quantity"/></td>
+				<td align="right" nowrap><inp2:{$PrefixSpecial}_Field field="Price"/></td>
+				<td align="right" nowrap><inp2:{$PrefixSpecial}_Field field="ExtendedPrice"/></td>
+			</tr>
+		</inp2:m_DefineElement>
+
+		<inp2:orditems_PrintList block="order_detail_row" per_page="-1" requery="1"/>
+
+		<tr>
+			<td align="left"<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders"> colspan="2"</inp2:m_if>>
+				<inp2:m_if check="ord_Field" name="CouponId">
+					<span class="order_preview_field_name"><inp2:m_Phrase label="la_CouponCode"/>:</span> <inp2:ord_Field field="CouponCode"/><br />
+				</inp2:m_if>
+
+				<inp2:m_if check="ord_FieldEquals" field="DiscountTotal" value="0.00" inverse="inverse">
+					<span class="order_preview_field_name"><inp2:m_Phrase label="la_TotalSavings"/>:</span> <inp2:ord_Field field="DiscountTotal"/><br />
+				</inp2:m_if>
+			</td>
+			<td align="right" nowrap colspan="2" class="order-totals-name"><inp2:m_Phrase label="la_SubTotal"/></td>
+			<td align="right" nowrap>
+				<inp2:m_if check="ord_FieldEquals" name="VAT" value="0.00">
+					<inp2:ord_Field field="AmountWithoutVAT"/>
+				<inp2:m_else />
+					<inp2:ord_Field field="SubTotal"/>
+				</inp2:m_if>
+			</td>
+		</tr>
+
+		<inp2:m_DefineElement name="shipping_total">
+			<tr>
+				<td align="right" nowrap colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>" class="order-totals-name"><inp2:m_Phrase label="la_ShippingHandling"/><inp2:m_if check="ord_ShippingType"> (<inp2:ord_ShippingType />)</inp2:m_if></td>
+				<td align="right" nowrap><inp2:ord_Field field="ShippingCost"/></td>
+			</tr>
+
+			<tr>
+				<td align="right" nowrap colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>" class="order-totals-name"><inp2:m_Phrase label="la_Insurance_Fee"/>:</td>
+				<td align="right" nowrap class="arial2"><inp2:ord_Field field="InsuranceFee"/></td>
+			</tr>
+
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="vat_total">
+			<tr>
+				<td align="right" nowrap colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>" class="order-totals-name"><inp2:m_Phrase label="la_VAT"/> <inp2:ord_Field field="VATPercent"/>%</td>
+				<td align="right" nowrap><inp2:ord_Field field="VAT"/></td>
+			</tr>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="processing_total">
+			<tr>
+				<td align="right" nowrap colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>" class="order-totals-name"><inp2:m_Phrase label="la_ProcessingFee"/> :</td>
+				<td align="right" nowrap><inp2:ord_Field field="ProcessingFee"/></td>
+			</tr>
+		</inp2:m_DefineElement>
+		
+		<inp2:m_DefineElement name="return_total">
+			<tr>
+				<td align="right" nowrap colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>" class="order-totals-name"><inp2:m_Phrase label="la_fld_TotalReturns"/>:</td>
+				<td align="right" nowrap class="arial2">-<inp2:ord_Field field="ReturnTotal"/></td>
+			</tr>
+		</inp2:m_DefineElement>
+
+		<inp2:ord_PrintTotals
+				shipping_render_as="shipping_total"
+				processing_render_as="processing_total"
+				vat_render_as="vat_total"
+				return_render_as="return_total"/>
+
+		<inp2:m_if check="ord_Field" field="GiftCertificateId">
+			<tr>
+				<td align="right" nowrap colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>" class="order-totals-name"><inp2:m_Phrase label="!la_fld_Gift_Certificate_Number!"/>:</td>
+				<td align="right" nowrap class="arial2"><inp2:ord_Field field="GiftCertificateCode"/></td>
+			</tr>
+			<tr>
+				<td align="right" nowrap colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>" class="order-totals-name"><inp2:m_Phrase label="!la_fld_Gift_Certificate_Amount_Applied!"/>:</td>
+				<td align="right" nowrap class="arial2"><inp2:ord_Field field="GiftCertificateDiscount"/></td>
+			</tr>
+		</inp2:m_if>
+
+		<tr>
+			<td align="right" colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>"><span class="order_preview_field_name">Total:</span></td>
+			<td align="right" nowrap><span class="order_preview_field_name"><inp2:ord_Field field="TotalAmount"/></span></td>
+		</tr>
+		<inp2:m_if check="ord_HasOriginalAmount" >
+		<tr>
+			<td align="right" colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>"><span class="order_preview_field_name">Original Amount:</span></td>
+			<td align="right" nowrap><span class="order_preview_field_name"><inp2:ord_Field field="OriginalAmount"/></span></td>
+		</tr>
+		</inp2:m_if>
+	</table>
+</inp2:m_DefineElement>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/orders/orders_blocks.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.11.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/orders/orders_edit_print.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/orders/orders_edit_print.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/orders/orders_edit_print.tpl	(revision 12131)
@@ -0,0 +1,9 @@
+<inp2:m_RequireLogin permissions="in-commerce:orders.view" system="1"/>
+<inp2:m_include t="incs/header" nobody="yes"/>
+
+<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF" onload="window.print();">
+	<inp2:m_include t="in-commerce/orders/orders_blocks"/>
+	<inp2:m_RenderElement name="order_print_element"/>
+	
+<inp2:m_include t="incs/footer"/>
+		
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/orders/orders_edit_print.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/manufacturers/manufacturers_edit.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/manufacturers/manufacturers_edit.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/manufacturers/manufacturers_edit.tpl	(revision 12131)
@@ -0,0 +1,83 @@
+<inp2:adm_SetPopupSize width="780" height="580"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" section="in-commerce:manufacturers" prefix="manuf" title_preset="manuf_edit"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('manuf','<inp2:manuf_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('manuf','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('manuf', '<inp2:manuf_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('manuf', '<inp2:manuf_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="manuf_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+				<inp2:m_else/>
+					<inp2:m_if check="manuf_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="manuf_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+
+			<script src="js/swfobject.js" type="text/javascript"></script>
+			<script type="text/javascript" src="js/uploader.js"></script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:manuf_SaveWarning name="grid_save_warning"/>
+<inp2:manuf_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+			<inp2:m_RenderElement name="subsection" title="la_title_General"/>
+				<inp2:m_RenderElement name="inp_id_label" prefix="manuf" field="ManufacturerId" title="!la_fld_Id!"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="manuf" field="Name" title="!la_fld_Name!" size="40"/>
+				<inp2:m_RenderElement name="inp_edit_textarea" prefix="manuf" field="Description" title="!la_fld_Description!" control_options="{min_height: 100}" cols="40" rows="5"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="manuf" field="URL" title="!la_fld_URL!" size="40"/>
+				<inp2:m_RenderElement name="inp_edit_swf_upload" prefix="manuf" field="Logo" thumbnail="120x120" title="la_fld_Logo"/>
+				<inp2:m_RenderElement name="inp_edit_checkbox" prefix="manuf" field="IsPopular" title="la_fld_Popular"/>
+
+			<inp2:m_RenderElement name="subsection" title="la_title_ContactInformation"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="manuf" field="Address1" title="!la_fld_Address1!" size="40"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="manuf" field="Address2" title="!la_fld_Address2!" size="40"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="manuf" field="City" title="!la_fld_City!" size="40"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="manuf" field="State" title="!la_fld_State!" size="40"/>
+				<inp2:m_RenderElement name="inp_edit_options" has_empty="1" prefix="manuf" field="Country" title="!la_fld_Country!" size="40"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="manuf" field="Zip" title="!la_fld_Zip!" size="40"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="manuf" field="Phone" title="!la_fld_Phone!" size="40"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="manuf" field="Fax" title="!la_fld_Fax!" size="40"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="manuf" field="Email" title="!la_fld_Email!" size="40"/>
+			<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/manufacturers/manufacturers_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7.2.9
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/manufacturers/manufacturers_list.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/manufacturers/manufacturers_list.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/manufacturers/manufacturers_list.tpl	(revision 12131)
@@ -0,0 +1,50 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="manuf" section="in-commerce:manufacturers" title_preset="manuf_list" pagination="1"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+  			//do not rename - this function is used in default grid for double click!
+  			function edit()
+  			{
+  				std_edit_item('manuf', 'in-commerce/manufacturers/manufacturers_edit');
+  			}
+
+  			var a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('new_manufacturer', '<inp2:m_phrase label="la_ToolTip_NewManufacturer" escape="1"/>',
+						function() {
+							std_precreate_item('manuf', 'in-commerce/manufacturers/manufacturers_edit')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('manuf')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="manuf" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="manuf" IdField="ManufacturerId" grid="Default"/>
+<script type="text/javascript">
+	Grids['manuf'].SetDependantToolbarButtons( new Array('edit','delete') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/manufacturers/manufacturers_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.8.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/shipping/shipping_type_groups.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/shipping/shipping_type_groups.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/shipping/shipping_type_groups.tpl	(revision 12131)
@@ -0,0 +1,118 @@
+<inp2:adm_SetPopupSize width="850" height="610"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="s" section="in-commerce:shipping" title_preset="groups" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							document.getElementById('<inp2:s_InputName field="PortalGroups"/>').value = select_to_string('selected_groups');
+							submit_event('s','<inp2:s_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('s','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('s', '<inp2:s_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('s', '<inp2:s_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="s_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="s_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="s_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+
+				function go_to_tab(prefix_special, tab)
+				{
+					set_hidden_field(prefix_special+'_GoTab', tab);
+					document.getElementById('<inp2:s_InputName field="PortalGroups"/>').value = select_to_string('selected_groups');
+					submit_event(prefix_special,'OnPreSaveAndGoToTab',null);
+				}
+
+				function go_to_id(prefix_special, id)
+				{
+					set_hidden_field(prefix_special+'_GoId', id);
+					document.getElementById('<inp2:s_InputName field="PortalGroups"/>').value = select_to_string('selected_groups');
+				 	submit_event(prefix_special,'OnPreSaveAndGo')
+				}
+
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:s_SaveWarning name="grid_save_warning"/>
+<inp2:s_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="inp_id_label" prefix="s" field="ShippingID" title="!la_fld_Id!"/>
+		<inp2:m_RenderElement name="inp_edit_hidden" prefix="s" field="PortalGroups" title="!la_fld_Groups!" size="40"/>
+			<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+				<inp2:m_inc param="tab_index" by="1"/>
+				<td class="label-cell">
+					<inp2:m_phrase label="la_fld_Groups"/>:
+				</td>
+				<td class="control-mid">&nbsp;</td>
+				<td class="control-cell">
+						<table style="width: 300px">
+							<tr>
+								<td>
+									<inp2:m_DefineElement name="group_option">
+										<option value="<inp2:m_param name="GroupId"/>"><inp2:m_param name="Name"/></option>
+									</inp2:m_DefineElement>
+
+									<inp2:m_phrase label="la_fld_SelectedGroups"/><br />
+									<select id="selected_groups" name="selected_groups[]" multiple="multiple" size="20" style="width: 200px">
+										<inp2:s_ListGroups mode="selected" render_as="group_option"/>
+									</select>
+								</td>
+								<td align="center">
+									<input type="button" value="&nbsp;&laquo;&laquo;&nbsp;" onclick="move_selected('available_groups', 'selected_groups'); select_sort('selected_groups')" class="button"><br>
+									<img src="img/s.gif" width="1" height="4" alt=""><br>
+									<input type="button" value="&nbsp;&raquo;&raquo;&nbsp;" onclick="move_selected('selected_groups', 'available_groups'); select_sort('available_groups');" class="button">
+								</td>
+								<td>
+									<inp2:m_phrase label="la_fld_AvailableGroups"/><br />
+									<select id="available_groups" name="available_groups[]" multiple="multiple" size="20" style="width: 200px">
+										<inp2:s_ListGroups render_as="group_option"/>
+									</select>
+								</td>
+							</tr>
+						</table>
+
+				</td>
+			</tr>
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/shipping/shipping_type_groups.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/shipping/shipping_edit.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/shipping/shipping_edit.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/shipping/shipping_edit.tpl	(revision 12131)
@@ -0,0 +1,80 @@
+<inp2:adm_SetPopupSize width="850" height="610"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="s" section="in-commerce:shipping" title_preset="shipping_type_edit" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+						submit_event('s','<inp2:s_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+						submit_event('s','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('s', '<inp2:s_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('s', '<inp2:s_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="s_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="s_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="s_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:s_SaveWarning name="grid_save_warning"/>
+<inp2:s_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="!la_Text_Shipping_Type!"/>
+			<inp2:m_RenderElement name="inp_id_label" prefix="s" field="ShippingID" title="!la_fld_Id!"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="s" field="Code" title="!la_fld_ShippingCode!" size="20"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="s" field="Name" title="!la_fld_ShippingName!" size="40"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="s" field="SpeedCode" title="!la_fld_SpeedCode!" size="20"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="s" field="Status" title="!la_fld_Status!"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="s" field="Type" title="!la_fld_ShippingType!"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="s" field="BaseFee" title="!la_fld_BaseFee!"/>
+			<inp2:m_RenderElement name="inp_edit_options" use_phrases="1" prefix="s" field="InsuranceType" title="!la_fld_Insurance_Type!"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="s" field="InsuranceFee" title="!la_fld_Insurance_Fee!" size="4"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="s" field="FreeShippingMinAmount" title="!la_fld_FreeShippingMinAmount!"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="s" field="IsFreePromoShipping" title="!la_fld_IsFreePromoShipping!"/>
+
+			<!-- <inp2:m_RenderElement name="inp_edit_box" prefix="s" field="CODFlatSurcharge" title="!la_fld_CODFlatSurcharge!" size="10" /> -->
+			<!-- <inp2:m_RenderElement name="inp_edit_box" prefix="s" field="CODPercentSurcharge" title="!la_fld_CODPercentSurcharge!" size="10" /> -->
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/shipping/shipping_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/shipping/shipping_quote_engine_edit.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/shipping/shipping_quote_engine_edit.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/shipping/shipping_quote_engine_edit.tpl	(revision 12131)
@@ -0,0 +1,116 @@
+<inp2:adm_SetPopupSize width="780" height="580"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="sqe" section="in-commerce:shipping_quote_engines" title_preset="engine_edit"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+						submit_event('sqe','<inp2:sqe_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+						submit_event('sqe','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_DefineElement name="carrier">
+	<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+		<inp2:m_inc param="tab_index" by="1"/>
+		<td class="label-cell">
+			<input type="hidden" id="<inp2:sqe_InputName field="{$carrier}Enabled"/>" name="<inp2:sqe_InputName field="{$carrier}Enabled"/>" value="<inp2:sqe_Field field="{$carrier}Enabled" db="db"/>">
+			<input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="_cb_<inp2:sqe_InputName field="{$carrier}Enabled"/>" name="_cb_<inp2:sqe_InputName field="{$carrier}Enabled"/>" <inp2:sqe_Field field="{$carrier}Enabled" checked="checked" db="db"/> onclick="update_checkbox(this, document.getElementById('<inp2:sqe_InputName field="{$carrier}Enabled"/>'))" onchange="check_carrier('_cb_<inp2:sqe_InputName field="{$carrier}Enabled"/>', '<inp2:sqe_InputName field="{$carrier}Account" />', '_cb_<inp2:sqe_InputName field="{$carrier}Invoiced"/>')">
+
+			<inp2:m_param name="title" />
+		</td>
+		<td class="control-mid">&nbsp;</td>
+		<td class="control-cell">
+			<inp2:m_phrase label="la_AccountLogin" />:
+			<input type="text" name="<inp2:sqe_InputName field="{$carrier}Account" />" id="<inp2:sqe_InputName field="{$carrier}Account" />" value="<inp2:sqe_Field field="{$carrier}Account" />" tabindex="<inp2:m_get param="tab_index"/>">
+
+			<inp2:m_phrase label="la_Invoiced" />:
+			<input type="hidden" id="<inp2:sqe_InputName field="{$carrier}Invoiced"/>" name="<inp2:sqe_InputName field="{$carrier}Invoiced"/>" value="<inp2:sqe_Field field="{$carrier}Invoiced" db="db"/>">
+			<input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="_cb_<inp2:sqe_InputName field="{$carrier}Invoiced"/>" name="_cb_<inp2:sqe_InputName field="{$carrier}Invoiced"/>" <inp2:sqe_Field field="{$carrier}Invoiced" checked="checked" db="db"/> onclick="update_checkbox(this, document.getElementById('<inp2:sqe_InputName field="{$carrier}Invoiced"/>'))">
+		</td>
+	</tr>
+	<script type="text/javascript">
+		check_carrier('_cb_<inp2:sqe_InputName field="{$carrier}Enabled"/>', '<inp2:sqe_InputName field="{$carrier}Account" />', '_cb_<inp2:sqe_InputName field="{$carrier}Invoiced"/>');
+	</script>
+</inp2:m_DefineElement>
+
+<script type="text/javascript">
+
+function check_carrier(carrier_checkbox, account_field, invoiced_checkbox)
+{
+	if(document.getElementById(carrier_checkbox).checked)
+	{
+		document.getElementById(account_field).disabled = false;
+		document.getElementById(invoiced_checkbox).disabled = false;
+	}
+	else
+	{
+		document.getElementById(account_field).disabled = true;
+		document.getElementById(invoiced_checkbox).disabled = true;
+	}
+}
+
+</script>
+
+<inp2:sqe_SaveWarning name="grid_save_warning"/>
+<inp2:sqe_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="!la_Text_General!"/>
+			<inp2:m_RenderElement name="inp_label" prefix="sqe" field="EngineId" title="!la_fld_Id!"/>
+			<inp2:m_RenderElement name="inp_label" prefix="sqe" field="Name" title="!la_fld_ShippingQuoteEngineName!"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="sqe" field="Status" title="!la_fld_Enabled!"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="sqe" field="AccountLogin" title="!la_fld_Login!" />
+
+			<inp2:m_if check="sqe_FieldVisible" field="AccountPassword">
+				<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+					<inp2:m_RenderElement name="inp_edit_field_caption" prefix="sqe" field="AccountPassword" title="!la_fld_Password!" />
+					<td class="control-cell">
+						<input type="password" name="<inp2:sqe_InputName field="AccountPassword" />" id="<inp2:sqe_InputName field="AccountPassword" />" value="">
+					</td>
+					<inp2:m_RenderElement name="inp_edit_error" prefix="sqe" field="AccountPassword"/>
+				</tr>
+			</inp2:m_if>
+
+	<inp2:m_if check="sqe_Field" field="ClassName" equals_to="Intershipper" db="db">
+		<inp2:m_RenderElement name="subsection" title="!la_Text_Carriers!"/>
+			<inp2:m_RenderElement name="carrier" carrier="UPS" title="UPS" />
+			<inp2:m_RenderElement name="carrier" carrier="FDX" title="FedEx" />
+			<inp2:m_RenderElement name="carrier" carrier="DHL" title="DHL" />
+			<inp2:m_RenderElement name="carrier" carrier="USP" title="USPS" />
+			<inp2:m_RenderElement name="carrier" carrier="ARB" title="Airborne" />
+
+		<inp2:m_RenderElement name="subsection" title="!la_Text_Delivery!"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="sqe" field="1DYEnabled" title="!la_fld_FirstDayDelivery!"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="sqe" field="2DYEnabled" title="!la_fld_SecondDayDelivery!"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="sqe" field="3DYEnabled" title="!la_fld_ThirdDayDelivery!"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="sqe" field="GNDEnabled" title="!la_fld_GroundDelivery!"/>
+
+		<inp2:m_RenderElement name="subsection" title="!la_Text_Other!"/>
+			<inp2:m_RenderElement name="inp_edit_options" prefix="sqe" field="ShipMethod" title="!la_fld_ShipMethod!"/>
+
+			<inp2:m_RenderElement name="inp_edit_box" prefix="sqe" field="FlatSurcharge" title="!la_fld_FlatSurcharge!" size="10"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="sqe" field="PercentSurcharge" title="!la_fld_PercentSurcharge!" size="10"/>
+	</inp2:m_if>
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/shipping/shipping_quote_engine_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.11.2.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/shipping/zone_edit.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/shipping/zone_edit.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/shipping/zone_edit.tpl	(revision 12131)
@@ -0,0 +1,384 @@
+<inp2:adm_SetPopupSize width="650" height="480"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="s" section="in-commerce:shipping" title_preset="zones_edit"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							SelectAll(document.getElementById('location_list[]'));
+							SelectToString(document.getElementById('location_list[]'));
+							submit_event('z','<inp2:z_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('z','OnCancel');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('z', '<inp2:z_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('z', '<inp2:z_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="z_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="z_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="z_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_DefineElement name="destination_block">
+	<option value="<inp2:m_param name="id"/>" <inp2:m_param name="selected"/>><inp2:m_param name="destination_title"/></option>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="countries_multiple">
+	<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+		<inp2:m_inc param="tab_index" by="1"/>
+		<td class="label-cell">&nbsp;</td>
+		<td class="control-mid">&nbsp;</td>
+		<td class="control-cell">
+			<table>
+			<tr><td>
+				<inp2:m_Phrase label="la_zones_SelectedCountries"/>:<br/>
+				<select name="location_list[]" id="location_list[]" multiple onchange="SelectToString(this)" size="10" style="width: 200px">
+					<inp2:z_ShowCountries block="destination_block" show="current"/>
+				</select>
+
+			</td>
+			<td>
+				<input class="button" type=button onclick="MoveSelected(this.form.ShippingZoneIdChooser, document.getElementById('location_list[]'))" value="&lt;"><br/>
+				<input class="button" type=button onclick="MoveSelected(document.getElementById('location_list[]'), this.form.ShippingZoneIdChooser)" value="&gt;">
+			</td>
+			<td>
+				<inp2:m_Phrase label="la_zones_AvailableCountries"/>:<br/>
+				<select name="ShippingZoneIdChooser" multiple size="10" size="10" style="width: 200px">
+					<inp2:z_ShowCountries block="destination_block" show="available"/>
+				</select>
+			</td>
+			</tr>
+			</table>
+		</td>
+	</tr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="states_multiple">
+	<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+		<td class="label-cell">&nbsp;</td>
+		<td class="control-mid">&nbsp;</td>
+		<td class="control-cell">
+				<select name="CountrySelector" onChange="change_country()">
+					<inp2:z_ShowCountries block="destination_block" show="has_states"/>
+				</select>
+					<br />
+			<table>
+			<tr><td>
+				<inp2:m_Phrase label="la_zones_SelectedStates"/>:<br/>
+				<select name="location_list[]" id="location_list[]" multiple onchange="SelectToString(this)" size="10" style="width: 200px">
+					<inp2:z_ShowStates block="destination_block" show="current"/>
+				</select>
+			</td>
+			<td>
+				<input class="button" type=button onclick="MoveSelected(this.form.ShippingZoneIdChooser, document.getElementById('location_list[]'))" value="&lt;"><br/>
+				<input class="button" type=button onclick="MoveSelected(document.getElementById('location_list[]'), this.form.ShippingZoneIdChooser)" value="&gt;">
+			</td>
+			<td>
+				<inp2:m_Phrase label="la_zones_AvailableStates"/>:<br/>
+				<select name="ShippingZoneIdChooser" multiple size="10" style="width: 200px">
+					<inp2:z_ShowStates block="destination_block" show="available"/>
+				</select>
+			</td>
+			</tr>
+			</table>
+		</td>
+	</tr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="zips_multiple">
+	<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+		<td class="label-cell">&nbsp;</td>
+		<td class="control-mid">&nbsp;</td>
+		<td class="control-cell">
+				<select name="CountrySelector" onChange="change_country()">
+					<inp2:z_ShowCountries block="destination_block" show="all"/>
+				</select>
+					<br />
+			<table>
+			<tr><td>
+				<inp2:m_Phrase label="la_zones_SelectedZips"/>:<br/>
+				<select name="location_list[]" id="location_list[]" multiple onchange="SelectToString(this)" size="10" style="width: 200px">
+					<inp2:z_ShowZips block="destination_block" show="current"/>
+				</select>
+			</td>
+			<td>
+				<input class="button" type=button onclick="MoveSelected(this.form.ShippingZoneIdChooser, document.getElementById('location_list[]'))" value="&lt;"><br/>
+				<input class="button" type=button onclick="MoveSelected(document.getElementById('location_list[]'), this.form.ShippingZoneIdChooser)" value="&gt;">
+			</td>
+			<td>
+				<inp2:m_Phrase label="la_zones_AvailableZips"/>:<br/>
+				<select name="ShippingZoneIdChooser" multiple size="10" style="width: 200px">
+					<inp2:z_ShowZips block="destination_block" show="available"/>
+				</select>
+			</td>
+			</tr>
+			</table>
+			<br>
+			<input type="text" name="zone_add" id="zone_add"> <input type="button" onClick="add_zone(document.getElementById('location_list[]'))" value="<inp2:m_Phrase label='la_btn_AddLocation'/>" class="button"/>
+		</td>
+	</tr>
+</inp2:m_DefineElement>
+
+
+<inp2:z_SaveWarning name="grid_save_warning"/>
+<inp2:z_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="!la_section_ShippingZone!"/>
+			<inp2:m_RenderElement name="inp_id_label" prefix="z" field="ZoneID" title="!la_fld_Id!"/>
+
+			<inp2:m_RenderElement name="inp_label" prefix="z" field="ShippingTypeID" title="!la_fld_ShippingTypeId!"/>
+
+			<inp2:m_RenderElement name="inp_edit_box" prefix="z" field="Name" title="!la_fld_Zone_Name!" size="40"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="z" field="CODallowed" title="!la_fld_CODallowed!"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="z" field="Type" title="!la_fld_Zone_Type!"/>
+
+			<!-- <inp2:z_ShowDestinations block="destination_block" /> -->
+
+			<inp2:m_if check="z_fieldequals" field="Type" value="1"  >
+				<inp2:m_RenderElement name="countries_multiple" prefix="z" />
+			</inp2:m_if>
+
+			<inp2:m_if check="z_fieldequals" field="Type" value="2"  >
+				<inp2:m_RenderElement name="states_multiple" prefix="z" />
+			</inp2:m_if>
+
+			<inp2:m_if check="z_fieldequals" field="Type" value="3"  >
+				<inp2:m_RenderElement name="zips_multiple" prefix="z" />
+			</inp2:m_if>
+
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<input type="hidden" value="" name="location_id" id="location_id">
+<input type="hidden" value="" name="selected_destinations" id="selected_destinations">
+<input type="hidden" name="z_OriginalSaveEvent" id="z_OriginalSaveEvent" value="<inp2:z_SaveEvent/>">
+
+<input type="hidden" name="z[<inp2:z_field field="ZoneID"/>][ShippingTypeID]" id="z[<inp2:z_field field="ZoneID"/>][ShippingTypeID]" value="<inp2:z_field field="ShippingTypeID"/>">
+<input type="hidden" name="z_id" id="z_id" value="<inp2:z_Field field="ZoneID"/>">
+
+<script>
+	document.getElementById('z[<inp2:z_field field="ZoneID"/>][Type]_1').onchange = change_type;
+	document.getElementById('z[<inp2:z_field field="ZoneID"/>][Type]_2').onchange = change_type;
+	document.getElementById('z[<inp2:z_field field="ZoneID"/>][Type]_3').onchange = change_type;
+
+	function change_type()
+	{
+		submit_event('z','OnTypeChange');
+	}
+
+	function change_country()
+	{
+		submit_event('z','OnCountryChange');
+	}
+
+	function remove_location(location_id)
+	{
+		document.getElementById('location_id').value = location_id;
+		submit_event('z', 'OnRemoveLocation');
+	}
+
+	function SelectToString(aSelect)
+	{
+		// written by Slava, patched by Alex, modified by SergeyG
+		var result = '';
+		for (var i=0; i < aSelect.length; i++)
+		{
+			cur = aSelect.options[i];
+			if(aSelect.options[i].selected == true) result += cur.value+',';
+		}
+		if(result.length > 0) result = result.substring(0,result.length-1);
+		document.getElementById('selected_destinations').value = result;
+		return result;
+	}
+
+	function add_zone(aSelect){
+		var el = document.getElementById('zone_add');
+		if (el)
+		{
+			if (el.value=='') return;
+			var found = false;
+			var valueArray;
+
+			for (i = 0; i < aSelect.options.length; i++){
+				valueArray = aSelect.options[i].value.split("|");
+				if (valueArray[1] == el.value){
+					found = true;
+					break;
+				}
+			}
+			if (!found){
+				aSelect.options[aSelect.length] = new Option(el.value, '0|'+el.value);
+				el.value='';
+			}
+		}
+	}
+
+function SelectContainsValue(selectObject, searchValue)
+{
+	for (i = 0; i < selectObject.options.length; i++){
+		if (selectObject.options[i].text == searchValue){
+			return true;
+		}
+	}
+	return false;
+}
+
+function SelectToArray(aSelect)
+{
+	var an_arr = new Array();
+	for (var i=0; i < aSelect.length; i++)
+	{
+		cur = aSelect.options[i];
+		an_arr[an_arr.length] = new Array(cur.text, cur.value, cur.selected);
+	}
+	return an_arr;
+}
+
+function ArrayToSelect(anArray, aSelect)
+{
+	var initial_length = aSelect.length;
+	for (var i=initial_length-1; i >= 0; i--) {	aSelect.options[i] = null; }
+
+	for (var i=0; i < anArray.length; i++)
+	{
+		cur = anArray[i];
+		aSelect.options[aSelect.length] = new Option(cur[0], cur[1]);
+	}
+}
+
+function SelectCompare(a, b)
+{
+	if (a[0] < b[0])
+		return -1;
+	if (a[0] > b[0])
+		return 1;
+	return 0;
+}
+
+function MoveSelected(FromList, ToList)
+{
+	FromArr = SelectToArray(FromList);
+	ToArr = SelectToArray(ToList);
+
+	NewFrom = Array();
+
+	for (var i=FromArr.length-1; i >= 0; i--)
+	{
+		cur = FromArr[i];
+		if (cur[2] && !SelectContainsValue(ToList, cur[0])) {
+			ToArr[ToArr.length] = cur;
+		}
+		else if(SelectContainsValue(ToList, cur[0])) {
+
+		}
+		else {
+			NewFrom[NewFrom.length] = cur;
+		}
+	}
+
+	NewFrom.sort(SelectCompare);
+	ToArr.sort(SelectCompare);
+
+	FromList = ArrayToSelect(NewFrom, FromList);
+	ToList = ArrayToSelect(ToArr, ToList);
+}
+
+function SelectToString2(aSelect)
+{
+	var result = '';
+	for (var i=0; i < aSelect.length; i++)
+	{
+		cur = aSelect.options[i];
+		result += cur.value+',';
+	}
+	return result;
+}
+
+
+function SelectAll(aSelect)
+{
+	for (var i=0; i < aSelect.length; i++)
+	{
+		cur = aSelect.options[i];
+		aSelect.options[i].selected = true;
+	}
+// -----------
+}
+
+function OnlySelectedToString(aSelect)
+{
+	var result = '';
+	for (var i=0; i < aSelect.length; i++)
+	{
+		cur = aSelect.options[i];
+		if (cur.selected)
+			result += cur.value+',';
+	}
+	return result;
+}
+
+function SelectMultipleSelected(aSelect, aStr)
+{
+	for (var i=0; i < aSelect.length; i++)
+	{
+		cur = aSelect.options[i];
+		if (aStr.match("(^|\,)+"+cur.value+"(,|$)+") ) {
+			aSelect.options[i].selected = true;
+			}
+	}
+}
+
+function SelectAll(aSelect)
+{
+	for (var i=0; i < aSelect.length; i++)
+	{
+		cur = aSelect.options[i];
+		aSelect.options[i].selected = true;
+	}
+}
+
+// --------------
+
+</SCRIPT>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/shipping/zone_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.12.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/shipping/shipping_brackets.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/shipping/shipping_brackets.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/shipping/shipping_brackets.tpl	(revision 12131)
@@ -0,0 +1,267 @@
+<inp2:adm_SetPopupSize width="850" height="610"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="s" section="in-commerce:shipping" title_preset="brackets" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+
+  				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('s','<inp2:s_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('s','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('s', '<inp2:s_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('s', '<inp2:s_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				function add_brackets()
+	  			{
+	  				submit_event('br', 'OnMoreBrackets')
+	  			}
+				a_toolbar.AddButton( new ToolBarButton('more_brackets', '<inp2:m_phrase label="la_ToolTip_MoreBrackets" escape="1"/>', add_brackets) );
+
+				function infinity()
+	  			{
+					submit_event('br', 'OnInfinity');
+	  			}
+				a_toolbar.AddButton( new ToolBarButton('infinity', '<inp2:m_phrase label="la_ToolTip_Infinity" escape="1"/>', infinity) );
+
+				function arrange_brackets()
+	  			{
+					submit_event('br', 'OnArrange')
+	  			}
+				a_toolbar.AddButton( new ToolBarButton('arrange', '<inp2:m_phrase label="la_ToolTip_Arrange" escape="1"/>', arrange_brackets) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="s_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+				<inp2:m_else/>
+					<inp2:m_if check="s_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="s_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_DefineElement name="br_edit_box" >
+<td>
+	<input type="text" size="<inp2:m_param name="size"/>" name="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
+				id="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
+				tabindex="<inp2:m_get param="tab_index"/>"
+				value="<inp2:m_param name="$field"/>"
+			>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="br_edit_max" >
+<td>
+			<inp2:m_if check="s_FieldEquals" name="Type" value="1">
+				<inp2:m_if check="lang.current_FieldEquals" field="UnitSystem" value="1">
+					<input type="text"
+						<inp2:m_inc param="tab_index" by="1"/> tabindex="<inp2:m_get param="tab_index"/>"
+						name="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
+						id="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
+						value="<inp2:m_param name="max"/>" size="10"
+						<inp2:m_if check="m_ParamEquals" param="next_min_id" value="">
+						<inp2:m_else />
+							onchange="set_start(<inp2:m_param name="id"/>, <inp2:m_param name="next_min_id"/>,'<inp2:m_param name="PrefixSpecial"/>', 'Start', 'End')"
+						</inp2:m_if>
+					/>
+					<inp2:m_phrase label="la_kg" />
+				</inp2:m_if>
+				<inp2:m_if check="lang.current_FieldEquals" field="UnitSystem" value="2">
+					<input type="text"
+						<inp2:m_inc param="tab_index" by="1"/> tabindex="<inp2:m_get param="tab_index"/>"
+						name="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>_a]"
+						id="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>_a]"
+						value="<inp2:m_param name="max_a"/>" size="10"
+						<inp2:m_if check="m_ParamEquals" param="next_min_id" value="">
+						<inp2:m_else />
+							onchange="set_start(<inp2:m_param name="id"/>, <inp2:m_param name="next_min_id"/>,'<inp2:m_param name="PrefixSpecial"/>', 'Start_a', 'End_a')"
+						</inp2:m_if>
+					/>
+					<inp2:m_phrase label="la_lbs" />
+					<input type="text"
+						<inp2:m_inc param="tab_index" by="1"/> tabindex="<inp2:m_get param="tab_index"/>"
+						name="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>_b]"
+						id="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>_b]"
+						value="<inp2:m_param name="max_b"/>" size="10"
+						<inp2:m_if check="m_ParamEquals" param="next_min_id" value="">
+						<inp2:m_else />
+							onchange="set_start(<inp2:m_param name="id"/>, <inp2:m_param name="next_min_id"/>,'<inp2:m_param name="PrefixSpecial"/>', 'Start_b', 'End_b')"
+						</inp2:m_if>
+					/>
+					<inp2:m_phrase label="la_oz" />
+				</inp2:m_if>
+			<inp2:m_else />
+				<input type="text" size="10"
+					<inp2:m_inc param="tab_index" by="1"/> tabindex="<inp2:m_get param="tab_index"/>"
+					name="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
+					id="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
+					value="<inp2:m_param name="max"/>"
+					<inp2:m_if check="m_ParamEquals" param="next_min_id" value="">
+					<inp2:m_else />
+						onchange="set_start(<inp2:m_param name="id"/>, <inp2:m_param name="next_min_id"/>,'<inp2:m_param name="PrefixSpecial"/>', 'Start', 'End')"
+					</inp2:m_if>
+				/>
+			</inp2:m_if>
+</td>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="br_edit_min" >
+<td>
+			<input type="hidden" name="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="IdField"/>]" id="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="IdField"/>]" value="<inp2:m_param name="id"/>">
+
+			<inp2:m_if check="s_FieldEquals" name="Type" value="1">
+				<inp2:m_if check="lang.current_FieldEquals" field="UnitSystem" value="1">
+					<input type="text"
+						<inp2:m_if check="m_ParamEquals" param="first" value="1">
+							<inp2:m_inc param="tab_index" by="1"/>
+							tabindex="<inp2:m_get param="tab_index"/>"
+						<inp2:m_else/>
+							readonly
+						</inp2:m_if>
+						name="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
+						id="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
+						value="<inp2:m_param name="min"/>" size="10"
+						<inp2:m_if check="m_ParamEquals" param="first" value="1"><inp2:m_else/>disabled</inp2:m_if>/>
+					<inp2:m_phrase label="la_kg" />
+				</inp2:m_if>
+				<inp2:m_if check="lang.current_FieldEquals" field="UnitSystem" value="2">
+					<input type="text"
+						<inp2:m_if check="m_ParamEquals" param="first" value="1">
+							<inp2:m_inc param="tab_index" by="1"/>
+							tabindex="<inp2:m_get param="tab_index"/>"
+						<inp2:m_else/>
+							readonly
+						</inp2:m_if>
+						name="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>_a]"
+						id="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>_a]"
+						value="<inp2:m_param name="min_a"/>" size="10"
+						<inp2:m_if check="m_ParamEquals" param="first" value="1"><inp2:m_else/>disabled</inp2:m_if>/>
+					<inp2:m_phrase label="la_lbs" />
+					<input type="text"
+						<inp2:m_if check="m_ParamEquals" param="first" value="1">
+							<inp2:m_inc param="tab_index" by="1"/>
+							tabindex="<inp2:m_get param="tab_index"/>"
+						<inp2:m_else/>
+							readonly
+						</inp2:m_if>
+						name="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>_b]"
+						id="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>_b]"
+						value="<inp2:m_param name="min_b"/>" size="10"
+						<inp2:m_if check="m_ParamEquals" param="first" value="1"><inp2:m_else/>disabled</inp2:m_if>/>
+					<inp2:m_phrase label="la_oz" />
+				</inp2:m_if>
+			<inp2:m_else />
+				<input type="text" size="10"
+					<inp2:m_if check="m_ParamEquals" param="first" value="1">
+						<inp2:m_inc param="tab_index" by="1"/>
+						tabindex="<inp2:m_get param="tab_index"/>"
+					<inp2:m_else/>
+						readonly
+					</inp2:m_if>
+					name="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
+					id="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
+					value="<inp2:m_param name="min"/>"
+					<inp2:m_if check="m_ParamEquals" param="first" value="1"><inp2:m_else/>disabled</inp2:m_if>
+				/>
+			</inp2:m_if>
+</td>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="bracket">
+	<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
+
+		<inp2:m_RenderElement name="br_edit_min" IdField="$IdField" PrefixSpecial="$PrefixSpecial" field="Start" size="40" pass_params="true"/>
+
+		<inp2:m_RenderElement name="br_edit_max" IdField="$IdField" PrefixSpecial="$PrefixSpecial" field="End" size="40" pass_params="true"/>
+
+	</tr>
+</inp2:m_DefineElement>
+
+
+<script type="text/javascript" >
+
+	NumberFormatter.ThousandsSep = '<inp2:lang.current_Field name="ThousandSep" js_escape="1"/>';
+	NumberFormatter.DecimalSep = '<inp2:lang.current_Field name="DecimalPoint" js_escape="1"/>';
+
+	function set_start(id, next_id, prefix_special, start_field, end_field)
+	{
+		//var next_id = id - 1;
+		var input_id = prefix_special + '[' + next_id + '][' + start_field + ']';
+		//var orig_id = prefix_special + '[' + id + '][Start]';
+		//alert('here');
+		if(document.getElementById(input_id) != null)
+		{
+			var new_value = NumberFormatter.Parse(document.getElementById(prefix_special + '[' + id + '][' + end_field + ']').value);
+			//alert(prefix_special + '[' + id + '][' + end_field + ']');
+			if( isNaN(new_value) ) new_value = 0;
+			document.getElementById(prefix_special + '[' + id + '][' + end_field + ']').value = NumberFormatter.Format(new_value);
+			document.getElementById(input_id).value = NumberFormatter.Format(new_value);
+		}
+	}
+
+	function enableKernelFormFields()
+	{
+		var kForm = document.forms.kernel_form;
+		var elem = false;
+		for (var i=0; i<kForm.elements.length; i++){
+			elem = kForm.elements[i];
+			if (elem.type == "text" && elem.disabled == true){
+				elem.disabled = false;
+			}
+		}
+	}
+
+</script>
+
+<inp2:m_DefineElement name="br_grid_th" >
+	<td class="columntitle_small"><inp2:m_phrase label="$phrase" /></td>
+</inp2:m_DefineElement>
+
+<inp2:br_SaveWarning name="grid_save_warning"/>
+<inp2:br_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
+		<tr nowrap="nowrap" class="grid-header-row-0">
+			<inp2:m_RenderElement name="br_grid_th" phrase="!la_col_Start!"/>
+			<inp2:m_RenderElement name="br_grid_th" phrase="!la_col_End!"/>
+		</tr>
+		<inp2:br_ShowBracketsForm block="bracket" IdField="BracketId"/>
+	</table>
+</div>
+<inp2:m_include t="incs/footer"/>
+
+<script>
+	document.forms.kernel_form.onsubmit =  enableKernelFormFields;
+</script>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/shipping/shipping_brackets.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.12.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/shipping/shipping_costs.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/shipping/shipping_costs.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/shipping/shipping_costs.tpl	(revision 12131)
@@ -0,0 +1,220 @@
+<inp2:adm_SetPopupSize width="850" height="610"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="s" section="in-commerce:shipping" title_preset="costs" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				var $checked_count = 0;
+
+  				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+						submit_event('s','<inp2:s_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+						submit_event('s','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('s', '<inp2:s_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('s', '<inp2:s_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.AddButton( new ToolBarButton('flip', '<inp2:m_phrase label="la_ToolTip_Flip" escape="1"/>',
+							function() {
+								submit_event('s','OnFlip');
+							} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('clear_all', '<inp2:m_phrase label="la_ToolTip_ClearAll" escape="1"/>', function() {
+							if(confirm('<inp2:m_phrase label="la_ClearCostsWarning"/>'))
+								submit_event('sc','OnClearAll');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('modify', '<inp2:m_phrase label="la_ToolTip_Modify" escape="1"/>',
+							function() {
+								openSelector('s', '<inp2:m_t t="in-commerce/shipping/modify_selector" pass="all,sc" sc_event="OnSaveCreated"/>');
+							} ) );
+				a_toolbar.Render();
+
+				a_toolbar.DisableButton('modify');
+
+				<inp2:m_if check="s_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+				<inp2:m_else/>
+					<inp2:m_if check="s_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="s_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+
+				function reflect_toolbar($prefix_special, $id, $field)
+				{
+					var $element = document.getElementById($prefix_special+'['+$id+']['+$field+']');
+					if($element.checked)
+					{
+						$checked_count++;
+					}
+					else
+					{
+						$checked_count--;
+					}
+
+					if($checked_count)
+					{
+						a_toolbar.EnableButton('modify');
+					}
+					else
+					{
+						a_toolbar.DisableButton('modify');
+					}
+				}
+
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_DefineElement name="precision_field">
+	<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+		<inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field_name="$field" title="$title"/>
+		<td class="control-cell">
+			<select tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:{$prefix}_InputName field="PrecisionBeforeSep"/>" id="<inp2:{$prefix}_InputName field="PrecisionBeforeSep"/>">
+				<inp2:m_if check="m_ParamEquals" name="use_phrases" value="1" >
+					<inp2:{$prefix}_PredefinedOptions field="PrecisionBeforeSep" block="inp_option_phrase" selected="selected"/>
+				<inp2:m_else/>
+					<inp2:{$prefix}_PredefinedOptions field="PrecisionBeforeSep" block="inp_option_item" selected="selected"/>
+				</inp2:m_if>
+			</select>&nbsp;,&nbsp;<select tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:{$prefix}_InputName field="PrecisionAfterSep"/>" id="<inp2:{$prefix}_InputName field="PrecisionAfterSep"/>">
+				<inp2:m_if check="m_ParamEquals" name="use_phrases" value="1" >
+					<inp2:{$prefix}_PredefinedOptions field="PrecisionAfterSep" block="inp_option_phrase" selected="selected"/>
+				<inp2:m_else/>
+					<inp2:{$prefix}_PredefinedOptions field="PrecisionAfterSep" block="inp_option_item" selected="selected"/>
+				</inp2:m_if>
+			</select>
+		</td>
+	</tr>
+</inp2:m_DefineElement>
+
+
+<inp2:m_DefineElement name="row_header">
+	<td>
+		<input type="checkbox" name="<inp2:{$prefix}_InputName field="$IdField"/>" id="<inp2:{$prefix}_InputName field="$IdField"/>" value="<inp2:{$prefix}_field field="$IdField"/>" onclick="reflect_toolbar('<inp2:m_param name="prefix"/>', <inp2:{$prefix}_field field="$IdField"/>, '<inp2:m_param name="IdField"/>')">
+		<inp2:m_RenderElement name="$header_caption"/>
+		<a href="javascript:propagate_values('<inp2:m_param name="prefix"/>', <inp2:{$prefix}_field field="$IdField"/>)"><img src="<inp2:m_TemplatesBase module='In-Commerce'/>/img/list_horiz_propagate.gif" alt="<inp2:m_phrase label="la_PropagateValues"/>" border="0"></a>
+	</td>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="column_header">
+	<td align="center" style="border-left:1px solid black">
+		<input type="checkbox" name="<inp2:{$prefix}_InputName field="$IdField"/>" id="<inp2:{$prefix}_InputName field="$IdField"/>" value="<inp2:{$prefix}_field field="$IdField"/>" onclick="reflect_toolbar('<inp2:m_param name="prefix"/>', <inp2:{$prefix}_field field="$IdField"/>, '<inp2:m_param name="IdField"/>')">
+		<inp2:m_RenderElement name="$header_caption"/>
+		<a href="javascript:propagate_values('<inp2:m_param name="prefix"/>', <inp2:{$prefix}_field field="$IdField"/>)"><img src="<inp2:m_TemplatesBase module='In-Commerce'/>/img/list_vertic_propagate.gif" alt="<inp2:m_phrase label="la_PropagateValues"/>" border="0"></a>
+	</td>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="zone_caption">
+	<nobr><inp2:z_field field="Name"/></nobr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="bracket_caption">
+	<inp2:m_if check="s_FieldEquals" name="Type" value="1">
+		<inp2:m_if check="lang.current_FieldEquals" field="UnitSystem" value="1">
+			<inp2:br_field field="Start"/>&nbsp;<inp2:m_Phrase label="la_kg" /> - <inp2:m_if check="br_fieldequals" field="End" value="-1">&infin;<inp2:m_else/><inp2:br_field field="End"/>&nbsp;<inp2:m_Phrase label="la_kg" /></inp2:m_if>
+		</inp2:m_if>
+		<inp2:m_if check="lang.current_FieldEquals" field="UnitSystem" value="2">
+			<inp2:br_field field="Start_a"/>&nbsp;<inp2:m_Phrase label="la_lbs" />&nbsp;<inp2:br_field field="Start_b"/>&nbsp;<inp2:m_Phrase label="la_oz" /> - <inp2:m_if check="br_fieldequals" field="End" value="-1">&infin;<inp2:m_else/><inp2:br_field field="End_a"/>&nbsp;<inp2:m_Phrase label="la_lbs" />&nbsp;<inp2:br_field field="End_b"/>&nbsp;<inp2:m_Phrase label="la_oz"  /></inp2:m_if>
+		</inp2:m_if>
+	<inp2:m_else />
+		<nobr><inp2:br_field field="Start"/> - <inp2:m_if check="br_fieldequals" field="End" value="-1">&infin;<inp2:m_else/><inp2:br_field field="End" /></inp2:m_if></nobr>
+	</inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="cost_cell">
+	<td style="border-left:1px solid black" align="center">
+		<nobr>$ <input type="text" maxlength="<inp2:s_CostInputSize/>" size="<inp2:s_CostInputSize/>" name="<inp2:sc_InputName field="Flat"/><inp2:m_if check="s_fieldequals" field="CostType" value="2">_input</inp2:m_if>" id="<inp2:sc_InputName field="Flat"/><inp2:m_if check="s_fieldequals" field="CostType" value="2" >_input</inp2:m_if>" value="<inp2:sc_field field="Flat" />"<inp2:m_if check="s_fieldequals" field="CostType" value="2" > disabled</inp2:m_if>>
+		% <input type="text" maxlength="<inp2:s_CostInputSize/>" size="<inp2:s_CostInputSize/>" name="<inp2:sc_InputName field="PerUnit"/><inp2:m_if check="s_fieldequals" field="CostType" value="1">_input</inp2:m_if>" id="<inp2:sc_InputName field="PerUnit"/><inp2:m_if check="s_fieldequals" field="CostType" value="1" >_input</inp2:m_if>" value="<inp2:sc_field field="PerUnit" />"<inp2:m_if check="s_fieldequals" field="CostType" value="1" > disabled</inp2:m_if>></nobr>
+
+		<inp2:m_if check="s_fieldequals" field="CostType" value="2" >
+			<input type="hidden" name="<inp2:sc_InputName field="Flat"/>" id="<inp2:sc_InputName field="Flat"/>" value="<inp2:sc_field field="Flat"/>">
+		</inp2:m_if>
+		<inp2:m_if check="s_fieldequals" field="CostType" value="1" >
+			<input type="hidden" name="<inp2:sc_InputName field="PerUnit"/>" id="<inp2:sc_InputName field="PerUnit"/>" value="<inp2:sc_field field="PerUnit"/>">
+		</inp2:m_if>
+
+		<input type="hidden" name="<inp2:sc_InputName field="BracketId"/>" id="<inp2:sc_InputName field="BracketId"/>" value="<inp2:br_field field="BracketId"/>">
+		<input type="hidden" name="<inp2:sc_InputName field="ZoneID"/>" id="<inp2:sc_InputName field="ZoneID"/>" value="<inp2:z_field field="ZoneID"/>">
+	</td>
+</inp2:m_DefineElement>
+
+<inp2:sc_SaveWarning name="grid_save_warning"/>
+<inp2:sc_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container" mode="minimal">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
+			<inp2:m_RenderElement name="inp_edit_options" prefix="s" field="CostType" title="!la_fld_CostType!"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="s" field="ZeroIfEmpty" title="!la_fld_EmptyCellsAre!" size="20"/>
+			<inp2:m_RenderElement name="precision_field" prefix="s" title="!la_Precision!"/>
+			<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<table class="edit-form">
+	<inp2:m_RenderElement name="subsection" title="!la_section_ShippingCosts!"/>
+</table>
+
+<div id="cost_container" style="overflow: auto;">
+	<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder" style="border-top:none">
+		<inp2:s_ShowCostsTable/>
+	</table>
+</div>
+
+<input type="hidden" name="z_propagate_id" id="z_propagate_id" value="">
+<input type="hidden" name="br_propagate_id" id="br_propagate_id" value="">
+
+<script type="text/javascript">
+	function propagate_values(prefix,id)
+	{
+		document.getElementById(prefix + '_propagate_id').value = id;
+		submit_event('sc', 'OnPropagate');
+	}
+
+	document.getElementById('<inp2:s_InputName field="CostType"/>').onchange = saveShipping;
+	document.getElementById('<inp2:s_InputName field="PrecisionBeforeSep"/>').onchange = saveShipping;
+	document.getElementById('<inp2:s_InputName field="PrecisionAfterSep"/>').onchange = saveShipping;
+
+	function saveShipping()
+	{
+		submit_event('s', 'OnPreSave');
+	}
+
+	$(document).ready(
+		function() {
+			maximizeElement('#cost_container');
+
+
+		}
+	);
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/shipping/shipping_costs.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.13.2.6
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/shipping/shipping_custom_list.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/shipping/shipping_custom_list.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/shipping/shipping_custom_list.tpl	(revision 12131)
@@ -0,0 +1,69 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="s" section="in-commerce:shipping" pagination="1" title_preset="shipping_list" tabs="in-commerce/shipping/shipping_tabs"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+
+				a_toolbar.AddButton( new ToolBarButton('new_shipping', '<inp2:m_phrase label="la_ToolTip_New_Shipping" escape="1"/>',
+						function() {
+							std_precreate_item('s', 'in-commerce/shipping/shipping_edit')
+						} ) );
+
+				function edit()
+				{
+				  	std_edit_item('s', 'in-commerce/shipping/shipping_edit');
+				}
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('s')
+						} ) );
+
+				function clone_items()
+		  	{
+		  		submit_event('s','onMassClone');
+		  	}
+
+			  	a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone" escape="1"/>', clone_items) );
+
+			  	a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+			  	a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
+							submit_event('s','OnMassApprove');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
+							submit_event('s','OnMassDecline');
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="s" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="s" IdField="ShippingID" grid="Default" menu_filters="yes"/>
+<script type="text/javascript">
+	Grids['s'].SetDependantToolbarButtons( new Array('edit','delete','clone','approve','decline') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/shipping/shipping_custom_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.8.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/shipping/modify_selector.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/shipping/modify_selector.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/shipping/modify_selector.tpl	(revision 12131)
@@ -0,0 +1,73 @@
+<inp2:adm_SetPopupSize width="400" height="180"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="s" section="in-commerce:shipping" title_preset="select_modifier"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+	  	<td>
+	  		<script type="text/javascript">
+					a_toolbar = new ToolBar();
+
+	  				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+								submit_event('s','OnApplyModifier');
+							}
+						) );
+					a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+								window_close();
+							}
+					 	) );
+
+					a_toolbar.Render();
+			</script>
+
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:sc_SaveWarning name="grid_save_warning"/>
+<inp2:sc_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
+			<inp2:m_inc param="tab_index" by="1"/>
+			<td class="label-cell">
+				<label for="operation"><inp2:m_phrase label="la_ModifyOperation"/>:</label>
+			</td>
+			<td class="control-mid">&nbsp;</td>
+			<td class="control-cell">
+				<select name="operation" id="operation">
+					<option value="*">&nbsp;*&nbsp;</option>
+					<option value="/">&nbsp;/&nbsp;</option>
+					<option value="+">&nbsp;+&nbsp;</option>
+					<option value="-">&nbsp;-&nbsp;</option>
+				</select>
+			</td>
+		</tr>
+
+		<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
+			<inp2:m_inc param="tab_index" by="1"/>
+			<td class="label-cell">
+				<label for="modify_by"><inp2:m_phrase label="la_ModifyByValue"/>:</label>
+			</td>
+			<td class="control-mid">&nbsp;</td>
+			<td class="control-cell">
+				<input name="modify_by" id="modify_by" value="" size="5">
+			</td>
+		</tr>
+
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:s_HiddenSelection/>
+
+<inp2:m_include t="incs/footer"/>
+
+<script type="text/javascript">
+	set_event('sc', '');
+</script>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/shipping/modify_selector.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/shipping/shipping_list.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/shipping/shipping_list.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/shipping/shipping_list.tpl	(revision 12131)
@@ -0,0 +1,53 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="sqe" section="in-commerce:shipping_quote_engines" pagination="1" title_preset="engine_list" tabs="in-commerce/shipping/shipping_tabs"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+
+				function edit()
+				{
+				  	std_edit_item('sqe', 'in-commerce/shipping/shipping_quote_engine_edit');
+				}
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+
+			  	a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+			  	a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
+							submit_event('sqe','OnMassApprove');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
+							submit_event('sqe','OnMassDecline');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="sqe" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="sqe" IdField="EngineId" grid="Default" menu_filters="yes"/>
+<script type="text/javascript">
+	Grids['sqe'].SetDependantToolbarButtons( new Array('edit','approve','decline') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/shipping/shipping_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.8.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/shipping/shipping_zones.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/shipping/shipping_zones.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/shipping/shipping_zones.tpl	(revision 12131)
@@ -0,0 +1,93 @@
+<inp2:adm_SetPopupSize width="850" height="610"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="s" section="in-commerce:shipping" title_preset="zones" pagination="1" pagination_prefix="z" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+
+  				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('s','<inp2:s_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('s','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('s', '<inp2:s_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('s', '<inp2:s_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Zone" escape="1"/>',
+						function() {
+							std_new_item('z', 'in-commerce/shipping/zone_edit')
+						} ) );
+
+				function edit()
+	  			{
+  					opener_action('d');
+						submit_event('z', 'OnLoadZoneForm', 'in-commerce/shipping/zone_edit')
+	  			}
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('z')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone" escape="1"/>',
+						function() {
+							submit_event('z', 'OnMassClone')
+						} ) );
+
+				 a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="s_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+				<inp2:m_else/>
+					<inp2:m_if check="s_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="s_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="z" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="z" IdField="ZoneID" grid="Default"/>
+<script type="text/javascript">
+	Grids['z'].SetDependantToolbarButtons( new Array('edit','delete','clone') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/shipping/shipping_zones.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.8.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/shipping/shipping_tabs.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/shipping/shipping_tabs.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/shipping/shipping_tabs.tpl	(revision 12131)
@@ -0,0 +1,5 @@
+<inp2:m_DefineElement name="shipping_tabs">
+	<inp2:adm_ListTabs render_as="tab_direct" section_name="in-commerce:shipping_folder"/>
+</inp2:m_DefineElement>
+
+<inp2:m_RenderElement name="tabs_container" tabs_render_as="shipping_tabs"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/shipping/shipping_tabs.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_plans_edit.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_plans_edit.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_plans_edit.tpl	(revision 12131)
@@ -0,0 +1,107 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ap" section="in-commerce:affiliate_plans" title_preset="affiliate_plans_edit" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+						submit_event('ap','<inp2:ap_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+						submit_event('ap','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('ap', '<inp2:ap_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('ap', '<inp2:ap_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="ap_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="ap_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="ap_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:ap_SaveWarning name="grid_save_warning"/>
+<inp2:ap_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
+			<inp2:m_RenderElement name="inp_label" prefix="ap" field="AffiliatePlanId" title="!la_fld_Id!"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="ap" field="Name" title="!la_fld_Name!" size="40"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="ap" field="PlanType" title="!la_fld_PlanType!"/>
+			<inp2:m_RenderElement name="inp_edit_options" prefix="ap" field="ResetInterval" title="!la_fld_Period!"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="ap" field="IsPrimary" title="!la_fld_Primary!" onchange="check_status()" />
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="ap" field="Enabled" title="!la_fld_Enabled!" onchange="check_primary()"/>
+
+			<inp2:m_if check="ap_FieldVisible" field="MinPaymentAmount">
+				<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+					<inp2:m_RenderElement name="inp_edit_field_caption" prefix="ap" field="MinPaymentAmount" title="la_fld_MinimumPaymentAmount" />
+					<td class="control-cell">
+						<input type="text" name="<inp2:ap_InputName field='MinPaymentAmount' />" id="<inp2:ap_InputName field='MinPaymentAmount' />" value="<inp2:ap_Field name='MinPaymentAmount' />" tabindex="<inp2:m_get param='tab_index'/>" size="8">
+						<span class="small">(<inp2:curr_PrimaryCurrencyISO />)</span>
+					</td>
+					<inp2:m_RenderElement name="inp_edit_error" prefix="ap" field="MinPaymentAmount"/>
+				</tr>
+			</inp2:m_if>
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<script type="text/javascript">
+	if(document.getElementById('_cb_<inp2:ap_InputName field="IsPrimary"/>').checked)
+	{
+		document.getElementById('_cb_<inp2:ap_InputName field="IsPrimary"/>').disabled = true;
+		document.getElementById('_cb_<inp2:ap_InputName field="Enabled"/>').disabled = true;
+	}
+
+	function check_status()
+	{
+		if(document.getElementById('_cb_<inp2:ap_InputName field="IsPrimary"/>').checked)
+		{
+			document.getElementById('_cb_<inp2:ap_InputName field="Enabled"/>').checked = true;
+			document.getElementById('<inp2:ap_InputName field="Enabled"/>').value = 1;
+		}
+	}
+
+	function check_primary()
+	{
+		if(!document.getElementById('_cb_<inp2:ap_InputName field="Enabled"/>').checked)
+		{
+			document.getElementById('_cb_<inp2:ap_InputName field="IsPrimary"/>').checked = false;
+			document.getElementById('<inp2:ap_InputName field="IsPrimary"/>').value = 0;
+		}
+	}
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_plans_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.16.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_payment_types_edit.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_payment_types_edit.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_payment_types_edit.tpl	(revision 12131)
@@ -0,0 +1,95 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="apt" section="in-commerce:affiliate_payment_types" title_preset="affiliate_payment_types_edit"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('apt','<inp2:apt_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('apt','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('apt', '<inp2:apt_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('apt', '<inp2:apt_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="apt_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="apt_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="apt_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:apt_SaveWarning name="grid_save_warning"/>
+<inp2:apt_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="inp_id_label" prefix="apt" field="PaymentTypeId" title="!la_fld_Id!"/>
+		<inp2:m_RenderElement name="inp_edit_box" prefix="apt" field="Name" title="!la_fld_Name!" size="40"/>
+		<inp2:m_RenderElement name="inp_edit_checkbox" prefix="apt" field="IsPrimary" title="!la_fld_IsPrimary!" onchange="check_status()"/>
+		<inp2:m_RenderElement name="inp_edit_checkbox" prefix="apt" field="Status" title="!la_fld_Enabled!"  onchange="check_primary()"/>
+		<inp2:m_RenderElement name="inp_edit_box" prefix="apt" field="Priority" title="!la_fld_Priority!" size="5"/>
+		<inp2:m_RenderElement name="inp_edit_textarea" prefix="apt" field="Description" title="!la_fld_Description!" cols="40" rows="5"/>
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<script type="text/javascript">
+	if(document.getElementById('_cb_<inp2:apt_InputName field="IsPrimary"/>').checked)
+	{
+		document.getElementById('_cb_<inp2:apt_InputName field="IsPrimary"/>').disabled = true;
+		document.getElementById('_cb_<inp2:apt_InputName field="Status"/>').disabled = true;
+	}
+
+	function check_status()
+	{
+		if(document.getElementById('_cb_<inp2:apt_InputName field="IsPrimary"/>').checked)
+		{
+			document.getElementById('_cb_<inp2:apt_InputName field="Status"/>').checked = true;
+			document.getElementById('<inp2:apt_InputName field="Status"/>').value = 1;
+		}
+	}
+
+	function check_primary()
+	{
+		if(!document.getElementById('_cb_<inp2:apt_InputName field="Status"/>').checked)
+		{
+			document.getElementById('_cb_<inp2:apt_InputName field="IsPrimary"/>').checked = false;
+			document.getElementById('<inp2:apt_InputName field="IsPrimary"/>').value = 0;
+		}
+	}
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_payment_types_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliates_edit.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliates_edit.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliates_edit.tpl	(revision 12131)
@@ -0,0 +1,100 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="affil" section="in-commerce:affiliates" title_preset="affiliates_edit" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+						submit_event('affil','<inp2:affil_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+						submit_event('affil','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('affil', '<inp2:affil_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('affil', '<inp2:affil_NextId/>');
+						}
+				 ) );
+
+				<inp2:m_if check="affil_IsNewMode" inverse="inverse">
+					a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+					a_toolbar.AddButton( new ToolBarButton('in-commerce:pay_out', '<inp2:m_phrase label="la_ToolTip_PayOut" escape="1"/>', function() {
+						direct_edit('affil', '<inp2:m_t t="in-commerce/affiliate_plans/affiliates_payout" m_opener="d" apayments_event="OnNew" pass="all,apayments"/>');
+						}
+					) );
+				</inp2:m_if>
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="affil_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					//a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="affil_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="affil_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:affil_SaveWarning name="grid_save_warning"/>
+<inp2:affil_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
+			<inp2:m_RenderElement name="inp_id_label" prefix="affil" field="AffiliateId" title="!la_fld_Id!"/>
+			<inp2:m_RenderElement name="inp_edit_user" prefix="affil" field="PortalUserId" title="!la_fld_Username!"/>
+			<inp2:m_RenderElement name="inp_edit_options" prefix="affil" field="AffiliatePlanId" title="!la_fld_AffiliatePlan!"/>
+			<inp2:m_RenderElement name="inp_edit_options" prefix="affil" field="PaymentTypeId" title="!la_fld_PaymentType!"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="affil" field="SSN" title="!la_fld_SSN!" />
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="affil" field="Status" title="!la_fld_Status!"/>
+			<inp2:m_RenderElement name="inp_edit_date" prefix="affil" field="CreatedOn" title="!la_fld_RegisteredOn!" />
+			<inp2:m_RenderElement name="inp_edit_textarea" prefix="affil" field="Comments" title="!la_fld_Comments!" cols="40" rows="5"/>
+
+			<inp2:m_if check="affil_IsNewMode" inverse="inverse">
+				<inp2:m_RenderElement name="subsection" title="!la_section_AdvertisingMaterials!"/>
+					<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+						<inp2:m_inc param="tab_index" by="1"/>
+						<td class="label-cell">
+							<inp2:m_phrase label="la_fld_AffiliateLink"/>:
+						</td>
+						<td class="control-mid">&nbsp;</td>
+						<td class="control-cell">
+							<a href="<inp2:affil_GetAffiliateLink template='index'/>" target="_blank"><inp2:affil_GetAffiliateLink template="index" prefix="_FRONT_"/></a>
+						</td>
+					</tr>
+					<inp2:m_RenderElement name="inp_label" prefix="affil" field="AffiliateCode" title="la_fld_AffiliateCode"/>
+
+				<inp2:m_RenderElement name="subsection" title="!la_section_Statistics!"/>
+					<inp2:m_RenderElement name="inp_label" prefix="affil" field="AccumulatedAmount" title="la_fld_AccumulatedAmount" currency="selected"/>
+					<inp2:m_RenderElement name="inp_label" prefix="affil" field="ItemsSold" title="la_fld_ItemsSold"/>
+					<inp2:m_RenderElement name="inp_label" prefix="affil" field="AmountToPay" title="la_fld_AmountToPay" currency="selected"/>
+					<inp2:m_RenderElement name="inp_label" prefix="affil" field="LastPaymentDate_date" title="la_fld_LastPaymentDate"/>
+			</inp2:m_if>
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliates_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.22.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_plans_brackets.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_plans_brackets.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_plans_brackets.tpl	(revision 12131)
@@ -0,0 +1,176 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ap" section="in-commerce:affiliate_plans" title_preset="affiliate_plans_brackets" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('ap','<inp2:ap_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('ap','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('ap', '<inp2:ap_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('ap', '<inp2:ap_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				function add_brackets()
+	  			{
+	  				submit_event('apbrackets', 'OnMoreBrackets')
+	  			}
+				a_toolbar.AddButton( new ToolBarButton('more_brackets', '<inp2:m_phrase label="la_ToolTip_MoreBrackets" escape="1"/>', add_brackets) );
+
+				function infinity()
+	  			{
+					submit_event('apbrackets', 'OnInfinity');
+	  			}
+				a_toolbar.AddButton( new ToolBarButton('infinity', '<inp2:m_phrase label="la_ToolTip_Infinity" escape="1"/>', infinity) );
+
+				function arrange_brackets()
+	  			{
+					submit_event('apbrackets', 'OnArrange')
+	  			}
+				a_toolbar.AddButton( new ToolBarButton('arrange', '<inp2:m_phrase label="la_ToolTip_Arrange" escape="1"/>', arrange_brackets) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="ap_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					//a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="ap_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="ap_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_DefineElement name="pr_edit_box" >
+<td>
+	<input type="text" size="<inp2:m_param name="size"/>" name="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
+				id="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
+				tabindex="<inp2:m_get param="tab_index"/>"
+				value="<inp2:m_param name="$field"/>"
+			>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="pr_edit_max" >
+<td>
+			<input type="text" size="10" name="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
+				id="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
+				tabindex="<inp2:m_get param="tab_index"/>"
+				value="<inp2:m_param name="max"/>"
+				<inp2:m_if check="m_ParamEquals" param="next_min_id" value="">
+				<inp2:m_else />
+				onchange="set_start(<inp2:m_param name="id"/>, <inp2:m_param name="next_min_id"/>,'<inp2:m_param name="PrefixSpecial"/>')"
+				</inp2:m_if>
+
+			>
+</td>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="pr_edit_min" >
+<td>
+			<input type="hidden" name="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="IdField"/>]" id="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="IdField"/>]" value="<inp2:m_param name="id"/>">
+			<input type="text" size="10"
+				<inp2:m_if check="m_ParamEquals" param="first" value="1">
+					<inp2:m_inc param="tab_index" by="1"/>
+					tabindex="<inp2:m_get param="tab_index"/>"
+				<inp2:m_else/>
+					readonly
+				</inp2:m_if>
+				name="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
+				id="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
+				value="<inp2:m_param name="min"/>"
+				<inp2:m_if check="m_ParamEquals" param="first" value="1"><inp2:m_else/>disabled</inp2:m_if>
+			>
+</td>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="prbracket">
+	<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
+
+		<inp2:m_RenderElement name="pr_edit_min" IdField="$IdField" PrefixSpecial="$PrefixSpecial" field="FromAmount" size="40" pass_params="true"/>
+
+		<inp2:m_RenderElement name="pr_edit_max" IdField="$IdField" PrefixSpecial="$PrefixSpecial" field="ToAmount" size="40" pass_params="true"/>
+
+		<inp2:m_RenderElement name="pr_edit_box" IdField="$IdField" PrefixSpecial="$PrefixSpecial" field="Percent" size="4" pass_params="true"/>
+
+	</tr>
+</inp2:m_DefineElement>
+
+
+<script>
+
+	function set_start(id, next_id, prefix_special)
+	{
+		//var next_id = id - 1;
+		var input_id = prefix_special + '[' + next_id + '][FromAmount]';
+		//var orig_id = prefix_special + '[' + id + '][FromAmount]';
+		if(document.getElementById(input_id) != null)
+		{
+			var new_value = parseInt(document.getElementById(prefix_special + '[' + id + '][ToAmount]').value);
+			if( isNaN(new_value) ) new_value = 0;
+			document.getElementById(prefix_special + '[' + id + '][ToAmount]').value = new_value;
+			document.getElementById(input_id).value = new_value;
+		}
+	}
+
+	function enableKernelFormFields()
+	{
+		var kForm = document.forms.kernel_form;
+		var elem = false;
+		for (var i=0; i<kForm.elements.length; i++){
+			elem = kForm.elements[i];
+			if (elem.type == "text" && elem.disabled == true){
+				elem.disabled = false;
+			}
+		}
+	}
+
+</script>
+
+<inp2:m_DefineElement name="pr_grid_th" >
+	<td class="columntitle_small"><inp2:m_phrase label="$phrase" /></td>
+</inp2:m_DefineElement>
+
+<inp2:apbrackets_SaveWarning name="grid_save_warning"/>
+<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
+	<tr nowrap="nowrap" class="grid-header-row-0">
+		<inp2:m_RenderElement name="pr_grid_th" phrase="!la_col_FromAmount!"/>
+		<inp2:m_RenderElement name="pr_grid_th" phrase="!la_col_ToAmount!"/>
+		<inp2:m_RenderElement name="pr_grid_th" phrase="!la_col_Percent!"/>
+	</tr>
+	<inp2:apbrackets_ShowPricingForm block="prbracket" IdField="AffiliateBracketId"/>
+</table>
+
+<inp2:m_include t="incs/footer"/>
+
+<script>
+	document.forms.kernel_form.onsubmit =  enableKernelFormFields;
+</script>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_plans_brackets.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.8.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_plans_items.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_plans_items.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_plans_items.tpl	(revision 12131)
@@ -0,0 +1,114 @@
+<inp2:m_include t="incs/header"/>
+
+<inp2:m_if check="api_IsEntireOrder">
+	<inp2:m_SetParam grid="Default"/>
+<inp2:m_else/>
+	<inp2:m_SetParam grid="AffiliatePlansItems"/>
+</inp2:m_if>
+
+<inp2:m_RenderElement name="combined_header" prefix="ap" section="in-commerce:affiliate_plans" grid="$grid" title_preset="affiliate_plans_items" pagination="1" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('ap','<inp2:ap_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('ap','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('ap', '<inp2:ap_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('ap', '<inp2:ap_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Products" escape="1"/>',
+						function() {
+							openSelector('api', '<inp2:adm_SelectorLink prefix="api" selection_mode="multi" tabs_dependant="no" tab_prefixes="p"/>', '');
+						} ) );
+
+
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('api')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('entire_order', '<inp2:m_phrase label="la_ToolTip_EntireOrder" escape="1"/>',
+						function() {
+							if (inpConfirm('<inp2:m_phrase label="la_EntireOrderConfirmation"/>'))
+							{
+								submit_event('api', 'OnEntireOrder');
+							}
+						} ) );
+				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="ap_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					//a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="ap_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="ap_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+
+				function edit()
+				{
+					// required for correct row selection
+				}
+
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="api" grid="$grid"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_DefineElement name="grid_item_checkbox_td">
+	<inp2:m_if check="FieldEquals" field="ItemType" value="1">
+		<inp2:Field field="ProductId" no_special="no_special"/>
+	<inp2:m_else/>
+		<inp2:Field field="CategoryId" no_special="no_special"/>
+	</inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="api" IdField="AffiliateItemId" grid="$grid"/>
+
+<script type="text/javascript">
+	<inp2:m_if check="api_IsEntireOrder" >
+			a_toolbar.DisableButton('new_item');
+	</inp2:m_if>
+
+	Grids['api'].SetDependantToolbarButtons( new Array('delete') );
+</script>
+
+<input type="hidden" name="main_prefix" id="main_prefix" value="api">
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_plans_items.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.10.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliates_list.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliates_list.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliates_list.tpl	(revision 12131)
@@ -0,0 +1,66 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="affil" section="in-commerce:affiliates" title_preset="affiliates_list" pagination="1" tabs="in-commerce/affiliate_plans/affiliate_list_tabs"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+
+				function edit()
+				{
+				  	std_edit_item('affil', 'in-commerce/affiliate_plans/affiliates_edit');
+				}
+
+				a_toolbar.AddButton( new ToolBarButton('new_affiliate', '<inp2:m_phrase label="la_ToolTip_New_Affiliate" escape="1"/>',
+						function() {
+							std_precreate_item('affil', 'in-commerce/affiliate_plans/affiliates_edit')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('affil')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
+							submit_event('affil','OnMassApprove');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
+							submit_event('affil','OnMassDecline');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="affil" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_DefineElement name="grid_userlink_td" format="">
+	<a href="<inp2:UserLink edit_template='users/users_edit'/>" onclick="return direct_edit('<inp2:m_Param name="PrefixSpecial"/>', this.href);" title="<inp2:m_phrase name="la_Edit_User"/>"><inp2:Field field="$field" no_special="no_special" grid="$grid" format="$format"/></a>
+</inp2:m_DefineElement>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="affil" IdField="AffiliateId" grid="Default"/>
+<script type="text/javascript">
+	Grids['affil'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliates_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.10.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliates_payout.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliates_payout.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliates_payout.tpl	(revision 12131)
@@ -0,0 +1,45 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="affil" section="in-commerce:affiliates" title_preset="affiliates_payout"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_PayOut" escape="1"/>', function() {
+						submit_event('apayments','OnCreate');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+						submit_event('apayments','OnGoBack');
+						}
+				 ) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:apayments_SaveWarning name="grid_save_warning"/>
+<inp2:apayments_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
+			<inp2:m_RenderElement name="inp_edit_hidden" prefix="apayments" field="AffiliateId"/>
+			<inp2:m_RenderElement name="inp_label" prefix="apayments" field="AffiliateId" title="!la_fld_Username!"/>
+
+			<inp2:m_RenderElement name="inp_edit_box" prefix="apayments" field="Amount" title="la_fld_Amount"/>
+			<inp2:m_RenderElement name="inp_edit_options" prefix="apayments" field="PaymentTypeId" title="la_fld_PaymentTypeId"/>
+			<inp2:m_RenderElement name="inp_edit_date_time" prefix="apayments" field="PaymentDate" title="la_fld_PaymentDate"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="apayments" field="PaymentReference" title="la_fld_PaymentReference"/>
+			<inp2:m_RenderElement name="inp_edit_textarea" prefix="apayments" field="Comment" title="la_fld_Comment" rows="10" cols="40"/>
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliates_payout.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_edit_payments.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_edit_payments.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_edit_payments.tpl	(revision 12131)
@@ -0,0 +1,69 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="affil" section="in-commerce:affiliates" title_preset="affiliate_payments" pagination="1" pagination_prefix="apayments" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('affil','<inp2:affil_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('affil','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('affil', '<inp2:affil_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('affil', '<inp2:affil_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="affil_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					//a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="affil_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="affil_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+
+				function edit()
+				{
+					// required for correct row selection
+				}
+
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="apayments" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="apayments" IdField="AffiliatePaymentId" grid="Default"/>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_edit_payments.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_plans_list.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_plans_list.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_plans_list.tpl	(revision 12131)
@@ -0,0 +1,74 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ap" section="in-commerce:affiliate_plans" title_preset="affiliate_plans_list" pagination="1" tabs="in-commerce/affiliate_plans/affiliate_list_tabs"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+
+				function edit()
+				{
+				  	std_edit_item('ap', 'in-commerce/affiliate_plans/affiliate_plans_edit');
+				}
+
+				a_toolbar.AddButton( new ToolBarButton('new_affiliate_plan', '<inp2:m_phrase label="la_ToolTip_New_Affiliate_Plan" escape="1"/>',
+						function() {
+							std_precreate_item('ap', 'in-commerce/affiliate_plans/affiliate_plans_edit')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('ap')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone" escape="1"/>', function() {
+						submit_event('ap','OnMassClone');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.AddButton( new ToolBarButton('primary_affiliate_plan', '<inp2:m_phrase label="la_ToolTip_setPrimary" escape="1"/>', function() {
+							submit_event('ap','OnSetPrimary');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
+							submit_event('ap','OnMassApprove');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
+							submit_event('ap','OnMassDecline');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="ap" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="ap" IdField="AffiliatePlanId" grid="Default"/>
+<script type="text/javascript">
+	Grids['ap'].SetDependantToolbarButtons( new Array('edit','delete','clone', 'approve','decline','primary_affiliate_plan') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_plans_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.10.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_payment_types_list.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_payment_types_list.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_payment_types_list.tpl	(revision 12131)
@@ -0,0 +1,77 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="apt" section="in-commerce:affiliate_payment_types" title_preset="affiliate_payment_types_list" pagination="1" tabs="in-commerce/affiliate_plans/affiliate_list_tabs"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+  			//do not rename - this function is used in default grid for double click!
+  			function edit()
+  			{
+  				std_edit_item('apt', 'in-commerce/affiliate_plans/affiliate_payment_types_edit');
+  			}
+
+  			var a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('new_affiliate_payment_type', '<inp2:m_phrase label="la_ToolTip_NewAffiliatePaymentType" escape="1"/>',
+						function() {
+							std_precreate_item('apt', 'in-commerce/affiliate_plans/affiliate_payment_types_edit')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('apt')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep6') );
+
+				a_toolbar.AddButton( new ToolBarButton('primary_affiliate_payment_type', '<inp2:m_phrase label="la_ToolTip_setPrimary" escape="1"/>', function() {
+							submit_event('apt','OnSetPrimary');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
+							submit_event('apt','OnMassApprove');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
+							submit_event('apt','OnMassDecline');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
+							submit_event('apt','OnMassMoveUp');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
+							submit_event('apt','OnMassMoveDown');
+						}
+				 ) );
+
+				a_toolbar.Render();
+
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="apt" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_DefineElement name="affiliate_payment_type_caption_td">
+	<inp2:Field field="$field" grid="$grid"/>
+	<inp2:m_ifnot check="Field" field="Priority" equals_to="0"><span class="priority"><sup><inp2:Field field="Priority"/></sup></span></inp2:m_ifnot>
+</inp2:m_DefineElement>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="apt" IdField="PaymentTypeId" grid="Default"/>
+<script type="text/javascript">
+	Grids['apt'].SetDependantToolbarButtons( new Array('edit','delete','primary_affiliate_payment_type','approve','decline','move_up','move_down') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_payment_types_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_list_tabs.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_list_tabs.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_list_tabs.tpl	(revision 12131)
@@ -0,0 +1,5 @@
+<inp2:m_DefineElement name="affiliate_tabs">
+	<inp2:adm_ListTabs render_as="tab_direct" section_name="in-commerce:affiliates_folder"/>
+</inp2:m_DefineElement>
+
+<inp2:m_RenderElement name="tabs_container" tabs_render_as="affiliate_tabs"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/affiliate_plans/affiliate_list_tabs.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/taxes/taxes_edit.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/taxes/taxes_edit.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/taxes/taxes_edit.tpl	(revision 12131)
@@ -0,0 +1,384 @@
+<inp2:adm_SetPopupSize width="850" height="610"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="tax" section="in-commerce:taxes" title_preset="taxes_edit"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							SelectAll(document.getElementById('location_list[]'));
+							SelectToString(document.getElementById('location_list[]'));
+							submit_event('tax','<inp2:tax_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('tax','OnCancel');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('tax', '<inp2:tax_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('tax', '<inp2:tax_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="tax_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="tax_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="tax_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_DefineElement name="destination_block">
+	<option value="<inp2:m_param name="id"/>" <inp2:m_param name="selected"/>><inp2:m_param name="destination_title"/></option>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="countries_multiple">
+	<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+		<inp2:m_inc param="tab_index" by="1"/>
+		<td class="label-cell">&nbsp;</td>
+		<td class="control-mid">&nbsp;</td>
+		<td class="control-cell">
+			<table>
+			<tr><td>
+				<inp2:m_Phrase label="la_zones_SelectedCountries"/>:<br/>
+				<select name="location_list[]" id="location_list[]" multiple onchange="SelectToString(this)" size="10" style="width: 200px">
+					<inp2:tax_ShowCountries block="destination_block" show="current"/>
+				</select>
+
+			</td>
+			<td>
+				<input class="button" type=button onclick="MoveSelected(document.getElementById('location_list[]'), this.form.TaxZoneIdChooser)" value="&gt;"><br>
+				<input class="button" type=button onclick="MoveSelected(this.form.TaxZoneIdChooser, document.getElementById('location_list[]'))" value="&lt;">
+			</td>
+			<td>
+				<inp2:m_Phrase label="la_zones_AvailableCountries"/>:<br/>
+				<select name="TaxZoneIdChooser" multiple size="10" size="10" style="width: 200px">
+					<inp2:tax_ShowCountries block="destination_block" show="available"/>
+				</select>
+			</td>
+			</tr>
+			</table>
+			<!-- <select name="<inp2:tax_InputName field="TaxZoneId" />" multiple> -->
+
+
+		</td>
+	</tr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="states_multiple">
+	<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+		<inp2:m_inc param="tab_index" by="1"/>
+		<td class="label-cell">&nbsp;</td>
+		<td class="control-mid">&nbsp;</td>
+		<td class="control-cell">
+				<select name="CountrySelector" onChange="change_country()">
+					<inp2:tax_ShowCountries block="destination_block" show="has_states"/>
+				</select>
+					<br />
+			<table>
+			<tr><td>
+				<inp2:m_Phrase label="la_zones_SelectedStates"/>:<br/>
+				<select name="location_list[]" id="location_list[]" multiple onchange="SelectToString(this)" size="10" style="width: 200px">
+					<inp2:tax_ShowStates block="destination_block" show="current"/>
+				</select>
+			</td>
+			<td>
+				<input class="button" type=button onclick="MoveSelected(document.getElementById('location_list[]'), this.form.TaxZoneIdChooser)" value="&gt;"><br>
+				<input class="button" type=button onclick="MoveSelected(this.form.TaxZoneIdChooser, document.getElementById('location_list[]'))" value="&lt;">
+			</td>
+			<td>
+				<inp2:m_Phrase label="la_zones_AvailableStates"/>:<br/>
+				<select name="TaxZoneIdChooser" multiple size="10" style="width: 200px">
+					<inp2:tax_ShowStates block="destination_block" show="available"/>
+				</select>
+			</td>
+			</tr>
+			</table>
+		</td>
+	</tr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="zips_multiple">
+	<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+		<inp2:m_inc param="tab_index" by="1"/>
+		<td class="label-cell">&nbsp;</td>
+		<td class="control-mid">&nbsp;</td>
+		<td class="control-cell">
+				<select name="CountrySelector" onChange="change_country()">
+					<inp2:tax_ShowCountries block="destination_block" show="all"/>
+				</select>
+					<br />
+			<table>
+			<tr><td>
+				<inp2:m_Phrase label="la_zones_SelectedZips"/>:<br/>
+				<select name="location_list[]" id="location_list[]" multiple onchange="SelectToString(this)" size="10" style="width: 200px">
+					<inp2:tax_ShowZips block="destination_block" show="current"/>
+				</select>
+			</td>
+			<td>
+				<input class="button" type=button onclick="MoveSelected(document.getElementById('location_list[]'), this.form.TaxZoneIdChooser)" value="&gt;"><br>
+				<input class="button" type=button onclick="MoveSelected(this.form.TaxZoneIdChooser, document.getElementById('location_list[]'))" value="&lt;">
+			</td>
+			<td>
+				<inp2:m_Phrase label="la_zones_AvailableZips"/>:<br/>
+				<select name="TaxZoneIdChooser" multiple size="10" style="width: 200px">
+					<inp2:tax_ShowZips block="destination_block" show="available"/>
+				</select>
+			</td>
+			</tr>
+			</table>
+			<br>
+			<input type="text" name="zone_add" id="zone_add"> <input type="button" onClick="add_zone(document.getElementById('location_list[]'))" value="<inp2:m_Phrase label='la_btn_AddLocation'/>" class="button"/>
+		</td>
+	</tr>
+</inp2:m_DefineElement>
+
+<inp2:tax_SaveWarning name="grid_save_warning"/>
+<inp2:tax_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="!la_section_TaxZone!"/>
+		<inp2:m_RenderElement name="inp_id_label" prefix="tax" field="TaxZoneId" title="!la_fld_Id!"/>
+
+		<inp2:m_RenderElement name="inp_edit_box" prefix="tax" field="Name" title="!la_fld_ZoneName!" size="40"/>
+		<inp2:m_RenderElement name="inp_edit_box" prefix="tax" field="TaxValue" title="!la_fld_TaxValue!" size="40"/>
+		<inp2:m_RenderElement name="inp_edit_checkbox" prefix="tax" field="ApplyToShipping" title="!la_fld_TaxApplyToShipping!"/>
+		<inp2:m_RenderElement name="inp_edit_checkbox" prefix="tax" field="ApplyToProcessing" title="!la_fld_TaxApplyToProcessing!"/>
+		<inp2:m_RenderElement name="inp_edit_radio" prefix="tax" field="Type" title="!la_fld_ZoneType!"/>
+
+		<!-- <inp2:tax_ShowDestinations block="destination_block" /> -->
+
+		<inp2:m_if check="tax_fieldequals" field="Type" value="1"  >
+			<inp2:m_RenderElement name="countries_multiple" prefix="tax" />
+		</inp2:m_if>
+
+		<inp2:m_if check="tax_fieldequals" field="Type" value="2"  >
+			<inp2:m_RenderElement name="states_multiple" prefix="tax" />
+		</inp2:m_if>
+
+		<inp2:m_if check="tax_fieldequals" field="Type" value="3"  >
+			<inp2:m_RenderElement name="zips_multiple" prefix="tax" />
+		</inp2:m_if>
+
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<input type="hidden" value="" name="location_id" id="location_id">
+<input type="hidden" value="" name="selected_destinations" id="selected_destinations">
+<input type="hidden" name="tax_OriginalSaveEvent" id="tax_OriginalSaveEvent" value="<inp2:tax_SaveEvent/>">
+
+
+<script>
+	document.getElementById('tax[<inp2:tax_field field="TaxZoneId"/>][Type]_1').onchange = change_type;
+	document.getElementById('tax[<inp2:tax_field field="TaxZoneId"/>][Type]_2').onchange = change_type;
+	document.getElementById('tax[<inp2:tax_field field="TaxZoneId"/>][Type]_3').onchange = change_type;
+
+	function change_type()
+	{
+		submit_event('tax','OnTypeChange');
+	}
+
+	function change_country()
+	{
+		submit_event('tax','OnCountryChange');
+	}
+
+	function remove_location(location_id)
+	{
+		document.getElementById('location_id').value = location_id;
+		submit_event('tax', 'OnRemoveLocation');
+	}
+
+	function SelectToString(aSelect)
+	{
+		// written by Slava, patched by Alex, modified by SergeyG
+		var result = '';
+		for (var i=0; i < aSelect.length; i++)
+		{
+			cur = aSelect.options[i];
+			if(aSelect.options[i].selected == true) result += cur.value+',';
+		}
+		if(result.length > 0) result = result.substring(0,result.length-1);
+		document.getElementById('selected_destinations').value = result;
+		return result;
+	}
+
+	function add_zone(aSelect){
+		var el = document.getElementById('zone_add');
+		if (el)
+		{
+			if (el.value=='') return;
+			var found = false;
+			var valueArray;
+
+			for (i = 0; i < aSelect.options.length; i++){
+				valueArray = aSelect.options[i].value.split("|");
+				if (valueArray[1] == el.value){
+					found = true;
+					break;
+				}
+			}
+			if (!found){
+				aSelect.options[aSelect.length] = new Option(el.value, '0|'+el.value);
+				el.value='';
+			}
+		}
+	}
+
+function SelectContainsValue(selectObject, searchValue)
+{
+	for (i = 0; i < selectObject.options.length; i++){
+		if (selectObject.options[i].text == searchValue){
+			return true;
+		}
+	}
+	return false;
+}
+
+function SelectToArray(aSelect)
+{
+	var an_arr = new Array();
+	for (var i=0; i < aSelect.length; i++)
+	{
+		cur = aSelect.options[i];
+		an_arr[an_arr.length] = new Array(cur.text, cur.value, cur.selected);
+	}
+	return an_arr;
+}
+
+function ArrayToSelect(anArray, aSelect)
+{
+	var initial_length = aSelect.length;
+	for (var i=initial_length-1; i >= 0; i--) {	aSelect.options[i] = null; }
+
+	for (var i=0; i < anArray.length; i++)
+	{
+		cur = anArray[i];
+		aSelect.options[aSelect.length] = new Option(cur[0], cur[1]);
+	}
+}
+
+function SelectCompare(a, b)
+{
+	if (a[0] < b[0])
+		return -1;
+	if (a[0] > b[0])
+		return 1;
+	return 0;
+}
+
+function MoveSelected(FromList, ToList)
+{
+	FromArr = SelectToArray(FromList);
+	ToArr = SelectToArray(ToList);
+
+	NewFrom = Array();
+
+	for (var i=FromArr.length-1; i >= 0; i--)
+	{
+		cur = FromArr[i];
+		if (cur[2] && !SelectContainsValue(ToList, cur[0])) {
+			ToArr[ToArr.length] = cur;
+		}
+		else if(SelectContainsValue(ToList, cur[0])) {
+
+		}
+		else {
+			NewFrom[NewFrom.length] = cur;
+		}
+	}
+
+	NewFrom.sort(SelectCompare);
+	ToArr.sort(SelectCompare);
+
+	FromList = ArrayToSelect(NewFrom, FromList);
+	ToList = ArrayToSelect(ToArr, ToList);
+}
+
+function SelectToString2(aSelect)
+{
+	var result = '';
+	for (var i=0; i < aSelect.length; i++)
+	{
+		cur = aSelect.options[i];
+		result += cur.value+',';
+	}
+	return result;
+}
+
+
+function SelectAll(aSelect)
+{
+	for (var i=0; i < aSelect.length; i++)
+	{
+		cur = aSelect.options[i];
+		aSelect.options[i].selected = true;
+	}
+// -----------
+}
+
+function OnlySelectedToString(aSelect)
+{
+	var result = '';
+	for (var i=0; i < aSelect.length; i++)
+	{
+		cur = aSelect.options[i];
+		if (cur.selected)
+			result += cur.value+',';
+	}
+	return result;
+}
+
+function SelectMultipleSelected(aSelect, aStr)
+{
+	for (var i=0; i < aSelect.length; i++)
+	{
+		cur = aSelect.options[i];
+		if (aStr.match("(^|\,)+"+cur.value+"(,|$)+") ) {
+			aSelect.options[i].selected = true;
+			}
+	}
+}
+
+function SelectAll(aSelect)
+{
+	for (var i=0; i < aSelect.length; i++)
+	{
+		cur = aSelect.options[i];
+		aSelect.options[i].selected = true;
+	}
+}
+
+// --------------
+
+</SCRIPT>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/taxes/taxes_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.13.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/taxes/taxes_list.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/taxes/taxes_list.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/taxes/taxes_list.tpl	(revision 12131)
@@ -0,0 +1,57 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="tax" section="in-commerce:taxes" title_preset="taxes_list" pagination="1"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+
+				a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Zone" escape="1"/>',
+						function() {
+							std_precreate_item('tax', 'in-commerce/taxes/taxes_edit')
+						} ) );
+
+				function edit()
+	  			{
+					std_edit_item('tax', 'in-commerce/taxes/taxes_edit');
+					//submit_event('tax', 'OnLoadZoneForm', 'in-commerce/taxes/taxes_edit')
+	  			}
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('tax')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone" escape="1"/>',
+						function() {
+							submit_event('tax', 'OnMassClone')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="tax" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="tax" IdField="TaxZoneId" grid="Default"/>
+<script type="text/javascript">
+	Grids['tax'].SetDependantToolbarButtons( new Array('edit','delete','clone') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/taxes/taxes_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/currencies/currencies_edit.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/currencies/currencies_edit.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/currencies/currencies_edit.tpl	(revision 12131)
@@ -0,0 +1,122 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="curr" section="in-commerce:currencies" title_preset="currencies_edit"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('curr','<inp2:curr_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('curr','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('curr', '<inp2:curr_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('curr', '<inp2:curr_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="curr_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="curr_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="curr_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:curr_SaveWarning name="grid_save_warning"/>
+<inp2:curr_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="!la_section_Currency!"/>
+			<inp2:m_RenderElement name="inp_label" prefix="curr" field="CurrencyId" title="!la_fld_Id!"/>
+			<inp2:m_RenderElement name="inp_label" prefix="curr" field="ISO" title="!la_fld_ISOCode!"/>
+
+			<inp2:m_if check="curr_FieldVisible" field="RateToPrimary">
+				<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+					<inp2:m_RenderElement name="inp_edit_field_caption" prefix="curr" field="RateToPrimary" title="!la_fld_RateToPrimary!" />
+					<td class="control-cell">
+						<input type="text" name="<inp2:curr_InputName field='RateToPrimary'/>" id="<inp2:curr_InputName field='RateToPrimary'/>" value="<inp2:curr_Field field='RateToPrimary'/>" size="10">
+						<input type="button" class="button" onclick="submit_event('curr', 'OnUpdateRate')" value="<inp2:m_phrase label='la_UpdateRate'/>">
+						<span class="small">1 <inp2:curr_Field field="ISO"/> = ? <inp2:curr_PrimaryCurrencyISO /></span>
+					</td>
+					<inp2:m_RenderElement name="inp_edit_error" prefix="curr" field="RateToPrimary"/>
+				</tr>
+			</inp2:m_if>
+
+			<inp2:m_if check="curr_FieldVisible" field="Symbol">
+				<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+					<inp2:m_RenderElement name="inp_edit_field_caption" prefix="curr" field="Symbol" title="!la_fld_CurrencySymbol!"/>
+					<td class="control-cell">
+						<input type="text" name="<inp2:curr_InputName field='Symbol'/>" id="<inp2:curr_InputName field='Symbol'/>" value="<inp2:curr_Field field='Symbol'/>" tabindex="<inp2:m_get param='tab_index'/>" size="10">
+						<span class="small"><inp2:m_phrase label="la_ISOUsedIfBlank" /></span>
+						<inp2:curr_Error field="Symbol"/>
+					</td>
+					<inp2:m_RenderElement name="inp_edit_error" prefix="curr" field="Symbol"/>
+				</tr>
+			</inp2:m_if>
+
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="curr" field="SymbolPosition" title="!la_fld_CurrencySymbolPosition!"/>
+
+			<inp2:m_RenderElement name="inp_edit_box" prefix="curr" field="Name" title="!la_fld_CurrencyName!" size="40"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="curr" field="IsPrimary" title="!la_fld_Primary!" onchange="check_status()"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="curr" field="Status" title="!la_fld_Enabled!" onchange="check_primary()"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="curr" field="Priority" title="!la_fld_Priority!" size="5"/>
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<script type="text/javascript">
+	if(document.getElementById('_cb_curr[<inp2:curr_field field="CurrencyId" />][IsPrimary]').checked)
+	{
+		document.getElementById('_cb_curr[<inp2:curr_field field="CurrencyId" />][IsPrimary]').disabled = true;
+		document.getElementById('_cb_curr[<inp2:curr_field field="CurrencyId" />][Status]').disabled = true;
+	}
+
+	function check_status()
+	{
+		if(document.getElementById('_cb_curr[<inp2:curr_field field="CurrencyId" />][IsPrimary]').checked)
+		{
+			document.getElementById('_cb_curr[<inp2:curr_field field="CurrencyId" />][Status]').checked = true;
+			document.getElementById('<inp2:curr_InputName field="Status"/>').value = 1;
+		}
+	}
+
+	function check_primary()
+	{
+		if(!document.getElementById('_cb_curr[<inp2:curr_field field="CurrencyId" />][Status]').checked)
+		{
+			document.getElementById('_cb_curr[<inp2:curr_field field="CurrencyId" />][IsPrimary]').checked = false;
+			document.getElementById('<inp2:curr_InputName field="IsPrimary"/>').value = 0;
+		}
+	}
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/currencies/currencies_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/currencies/currencies_list.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/currencies/currencies_list.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/currencies/currencies_list.tpl	(revision 12131)
@@ -0,0 +1,118 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="curr" section="in-commerce:currencies" title_preset="currencies_list" pagination="1"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+
+				function edit()
+	  			{
+					std_edit_item('curr', 'in-commerce/currencies/currencies_edit');
+	  			}
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep6') );
+
+				a_toolbar.AddButton( new ToolBarButton('primary_currency', '<inp2:m_phrase label="la_ToolTip_setPrimary" escape="1"/>', function() {
+							submit_event('curr','OnSetPrimary');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
+							submit_event('curr','OnMassApprove');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
+							submit_event('curr','OnMassDecline');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
+							submit_event('curr','OnMassMoveUp');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
+							submit_event('curr','OnMassMoveDown');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+				a_toolbar.AddButton( new ToolBarButton('update_rates', '<inp2:m_phrase label="la_ToolTip_UpdateRates" escape="1"/>', function() {
+							if(Grids['curr'].CountSelected() > 0)
+							{
+								message = '<inp2:m_phrase label="la_warning_UpdateSelectedCurrencyRates" />?';
+							}
+							else
+							{
+								message = '<inp2:m_phrase label="la_warning_UpdateAllCurrencyRates" />?';
+							}
+							if(confirm(message))
+							{
+								submit_event('curr','OnUpdateRates');
+							}
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep4') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="curr_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+				<inp2:m_else/>
+					<inp2:m_if check="curr_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="curr_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="curr" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_DefineElement name="currency_caption_td" >
+	<inp2:Field field="$field" grid="$grid"/>
+	<inp2:m_ifnot check="Field" field="Priority" equals_to="0"><span class="priority"><sup><inp2:Field field="Priority" /></sup></span></inp2:m_ifnot>
+</inp2:m_DefineElement>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="curr" IdField="CurrencyId" grid="Default"/>
+
+<script type="text/javascript">
+	Grids['curr'].SetDependantToolbarButtons( new Array('edit','primary_currency','approve','decline','move_up','move_down') );
+</script>
+
+<inp2:m_DefineElement name="remove_unused_warning" >
+	<input type="hidden" name="unused_ids" id="unused_ids" value="<inp2:m_param name="unused_ids" />">
+	<script type="text/javascript">
+		if(inpConfirm('<inp2:m_phrase label="la_WarningCurrenciesNotUsed" />: <inp2:m_param name="unused_iso" />. <inp2:m_phrase label="la_WarningRemoveUnusedCurrencies" />?'))
+		{
+			submit_event('curr', 'OnDisableUnused');
+		}
+	</script>
+</inp2:m_DefineElement>
+<inp2:curr_DisableUnusedWarning block="remove_unused_warning" />
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/currencies/currencies_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/products/relations_edit.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/products/relations_edit.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/products/relations_edit.tpl	(revision 12131)
@@ -0,0 +1,65 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" title_preset="relations_edit"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('rel','<inp2:rel_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('rel','OnCancel');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="rel_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="rel_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="rel_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_include t="categories/ci_blocks"/>
+
+<inp2:rel_SaveWarning name="grid_save_warning"/>
+<inp2:rel_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="!la_section_Relation!"/>
+			<inp2:m_RenderElement name="inp_edit_hidden" prefix="rel" field="SourceId"/>
+			<inp2:m_RenderElement name="inp_edit_hidden" prefix="rel" field="SourceType"/>
+			<inp2:m_RenderElement name="inp_edit_hidden" prefix="rel" field="TargetId"/>
+			<inp2:m_RenderElement name="inp_edit_hidden" prefix="rel" field="TargetType"/>
+
+			<inp2:m_RenderElement name="inp_id_label" prefix="rel" field="RelationshipId" title="!la_fld_Id!"/>
+			<inp2:m_RenderElement name="inp_edit_relation" prefix="rel" field="TargetId" title="!la_fld_TargetId!"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="rel" field="Type" title="!la_fld_RelationshipType!"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="rel" field="Enabled" title="!la_fld_Enabled!"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="rel" field="Priority" title="!la_fld_Priority!" size="4"/>
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/products/relations_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.10.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/products/review_edit.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/products/review_edit.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/products/review_edit.tpl	(revision 12131)
@@ -0,0 +1,59 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" title_preset="reviews_edit"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('rev','<inp2:rev_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('rev','OnCancel');
+						}
+				 ) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="rev_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+				<inp2:m_else/>
+					<inp2:m_if check="rev_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="rev_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:rev_SaveWarning name="grid_save_warning"/>
+<inp2:rev_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="!la_Text_Review!"/>
+			<inp2:m_RenderElement name="inp_edit_hidden" prefix="rev" field="ItemId"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox_allow_html" prefix="rev" field="TextFormat"/>
+			<inp2:m_RenderElement name="inp_label" prefix="rev" field="ReviewId" title="!la_fld_Id!"/>
+			<inp2:m_RenderElement name="inp_edit_user" prefix="rev" field="CreatedById" title="!la_fld_CreatedById!" class="text"/>
+			<inp2:m_RenderElement name="inp_edit_textarea" prefix="rev" field="ReviewText" title="!la_fld_ReviewText!" cols="70" rows="8"/>
+		<inp2:m_RenderElement name="subsection" title="!la_Text_General!"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="rev" field="Status" title="!la_fld_Status!"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="rev" field="Priority" title="!la_fld_Priority!" size="3" class="text"/>
+			<inp2:m_RenderElement name="inp_edit_date_time" prefix="rev" field="CreatedOn" title="!la_fld_CreatedOn!" size="20" class="text"/>
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/products/review_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/products/products_edit.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/products/products_edit.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/products/products_edit.tpl	(revision 12131)
@@ -0,0 +1,179 @@
+<inp2:adm_SetPopupSize width="1000" height="680"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" title_preset="products_edit" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('p','<inp2:p_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('p','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('p', '<inp2:p_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('p', '<inp2:p_NextId/>');
+						}
+				 ) );
+
+				//a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="p_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					//a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="p_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="p_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="ml_selector" prefix="p"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="inp_edit_hidden" prefix="p" field="Type" db="db"/>
+
+<inp2:p_SaveWarning name="grid_save_warning"/>
+<inp2:p_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="!la_section_Product!"/>
+			<inp2:m_RenderElement name="inp_label" prefix="p" field="ProductId" title="!la_fld_Id!"/>
+
+			<inp2:m_if check="m_IsDebugMode" >
+				<inp2:m_RenderElement name="inp_label" prefix="p" field="Type" title="!la_fld_ProductType!"/>
+			</inp2:m_if>
+
+			<inp2:m_RenderElement name="inp_edit_box_ml" prefix="p" field="Name" title="!la_fld_Title!" size="70"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="p" field="SKU" title="!la_fld_SKU!" size="70"/>
+
+			<inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="p" field="Description" title="!la_fld_Description!" cols="70" rows="5"/>
+			<inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="p" field="DescriptionExcerpt" title="!la_fld_DescriptionExcerpt!" cols="70" rows="3"/>
+
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="p" field="AutomaticFilename" title="la_fld_AutomaticFilename" onchange="reflect_filename()"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="p" field="Filename" title="la_fld_Filename" size="70"/>
+			<inp2:m_RenderElement name="inp_edit_options" prefix="p" field="CategoryId" title="la_fld_ParentSection" display_original="1"/>
+
+		<inp2:m_RenderElement name="subsection" title="!la_section_Properties!"/>
+
+			<inp2:m_if check="p_FieldEquals" field="Type" value="1" >
+				<inp2:m_RenderElement name="inp_edit_box" prefix="p" field="MinQtyFreePromoShipping" title="!la_fld_ProductFreeShipping!" size="5"/>
+			</inp2:m_if>
+
+			<inp2:m_if check="p_FieldEquals" field="Type" value="1">
+				<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+					<td class="label-cell">
+						<inp2:m_phrase label="la_fld_ManageShipping"/>:
+					</td>
+					<td class="control-mid">&nbsp;</td>
+					<td class="control-cell">
+						<a href="javascript:openShipping()">Open</a>
+					</td>
+				</tr>
+			</inp2:m_if>
+
+			<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+				<td class="label-cell">
+					<inp2:m_phrase label="la_fld_AssignedCoupon"/>:
+				</td>
+				<td class="control-mid">&nbsp;</td>
+				<td class="control-cell">
+					<inp2:p_Field name="AssignedCoupon" />&nbsp;<a href="javascript:openCouponSelector()">Open</a>
+				</td>
+			</tr>
+
+			<inp2:m_RenderElement name="inp_edit_options" prefix="p" field="ManufacturerId" title="!la_fld_Manufacturer!" size="4"/>
+
+			<inp2:m_if check="p_FieldEquals" field="Type" value="3">
+				<inp2:m_RenderElement name="inp_edit_box" prefix="p" field="Price" title="!la_fld_Price!" size="5"/>
+			</inp2:m_if>
+
+			<inp2:m_if check="p_FieldEquals" field="Type" value="6">
+				<inp2:m_RenderElement name="inp_edit_box" prefix="p" field="Price" title="!la_fld_Price!" size="5"/>
+			</inp2:m_if>
+
+			<inp2:m_if check="p_FieldEquals" field="Type" value="1" >
+				<inp2:m_RenderElement name="inp_edit_weight" prefix="p" field="Weight" title="!la_fld_Weight!" size="5"/>
+			</inp2:m_if>
+
+			<inp2:m_RenderElement name="inp_edit_box" prefix="p" field="MSRP" title="!la_fld_MSRP!" size="5"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="Status" title="!la_fld_Status!"/>
+
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="NewItem" title="!la_fld_New!"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="HotItem" title="!la_fld_TopSeller!"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="PopItem" title="!la_fld_Pop!"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="p" field="EditorsPick" title="!la_fld_EditorsPick!"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="p" field="Featured" title="!la_fld_Featured!"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="p" field="OnSale" title="!la_fld_OnSale!"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="p" field="Priority" title="!la_fld_Priority!" size="4"/>
+
+			<inp2:m_RenderElement name="inp_edit_date_time" prefix="p" field="CreatedOn" title="!la_fld_CreatedOn!" size="12"/>
+			<inp2:m_RenderElement name="inp_edit_date_time" prefix="p" field="Expire" title="!la_fld_Expire!" size="12"/>
+
+			<inp2:m_RenderElement name="inp_edit_box" prefix="p" field="MetaKeywords" title="!la_fld_MetaKeywords!" size="70"/>
+			<inp2:m_RenderElement name="inp_edit_textarea" prefix="p" field="MetaDescription" title="!la_fld_MetaDescription!" cols="70" rows="5"/>
+
+			<inp2:m_if check="p_FieldEquals" field="Type" value="1" >
+				<inp2:m_RenderElement name="subsection" title="!la_section_Backordering!"/>
+					<inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="BackOrder" title="!la_fld_BackOrder!"/>
+					<inp2:m_RenderElement name="inp_edit_date_time" format="mm/dd/y" prefix="p" field="BackOrderDate" title="!la_fld_BackOrderDate!" size="12"/>
+					<inp2:m_RenderElement name="inp_edit_box" prefix="p" field="QtyInStockMin" title="!la_fld_QtyInStockMin!" size="4"/>
+			</inp2:m_if>
+
+		<inp2:m_RenderElement name="subsection" title="!la_section_Counters!"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="p" field="CachedRating" title="!la_fld_Rating!" size="4"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="p" field="CachedVotesQty" title="!la_fld_Votes!" size="4"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="p" field="Hits" title="!la_fld_QtySold!" size="4"/>
+			<input type="hidden" name="Hits_original" id="Hits_original" value="<inp2:p_Field name="Hits" db="db" />" />
+
+	<!-- custom fields: begin -->
+		<inp2:m_include t="incs/custom_blocks"/>
+		<inp2:cf.general_PrintList render_as="cv_row_block" SourcePrefix="p" value_field="Value" per_page="-1" grid="Default" />
+	<!-- custom fields: end -->
+
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<script language="javascript" type="text/javascript">
+	function reflect_filename() {
+    	var $checked = document.getElementById('_cb_<inp2:p_InputName field="AutomaticFilename"/>').checked;
+    	document.getElementById('<inp2:p_InputName field="Filename"/>').readOnly = $checked;
+    }
+	reflect_filename();
+
+	function openShipping() {
+		openSelector('p','<inp2:m_link t="in-commerce/products/shipping_options" pass="all"/>', 'ShippingOption', '800x600', 'OnPreSaveAndOpenPopup');
+	}
+
+	function openCouponSelector() {
+		openSelector('p','<inp2:m_link t="in-commerce/discounts/coupon_selector" pass="all"/>', 'AssignedCoupon', '800x400', 'OnPreSaveAndOpenPopup');
+	}
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/products/products_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.28.2.11
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/products/images_edit.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/products/images_edit.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/products/images_edit.tpl	(revision 12131)
@@ -0,0 +1,77 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" title_preset="images_edit"/>
+
+<inp2:m_include t="incs/image_blocks"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('img','<inp2:img_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('img','OnCancel');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="img_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="img_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="img_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:img_SaveWarning name="grid_save_warning"/>
+<inp2:img_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="!la_section_Image!"/>
+			<inp2:m_RenderElement name="inp_edit_hidden" prefix="img" field="ResourceId"/>
+			<inp2:m_RenderElement name="inp_id_label" prefix="img" field="ImageId" title="!la_fld_Id!"/>
+
+			<inp2:m_RenderElement name="inp_edit_box" prefix="img" field="Name" title="!la_fld_Name!" size="40"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="img" field="AltName" title="!la_fld_AltValue!" size="40"/>
+
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="img" field="Enabled" title="!la_fld_Enabled!" onchange="check_primary()" />
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="img" field="DefaultImg" title="!la_fld_Primary!" onchange="check_status()" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="img" field="Priority" title="!la_fld_Priority!" size="5"/>
+
+		<inp2:m_RenderElement name="subsection" title="!la_section_ThumbnailImage!"/>
+			<inp2:m_RenderElement name="thumbnail_section" prefix="img"/>
+
+		<inp2:m_RenderElement name="subsection" title="!la_section_FullSizeImage!"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="img" field="SameImages" title="!la_fld_SameAsThumb!" onchange="toggle_fullsize()"/>
+			<inp2:m_RenderElement name="fullsize_section" prefix="img"/>
+
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<script type="text/javascript">
+	<inp2:m_RenderElement name="images_edit_js" prefix="img"/>
+	toggle_fullsize();
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/products/images_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.10.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/products/option_edit.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/products/option_edit.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/products/option_edit.tpl	(revision 12131)
@@ -0,0 +1,323 @@
+<inp2:adm_SetPopupSize width="780" height="590"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" title_preset="options_edit"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							PrepareData();
+							submit_event('po','<inp2:po_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('po','OnCancel');
+						}
+				 ) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<script type="text/javascript">
+	var edit_id = null;
+	var prices = new Array();
+	var price_types = new Array();
+
+	NumberFormatter.ThousandsSep = '<inp2:lang.current_Field name="ThousandSep" js_escape="1"/>';
+	NumberFormatter.DecimalSep = '<inp2:lang.current_Field name="DecimalPoint" js_escape="1"/>';
+
+	// var formatter = new NumberFormat();
+	// formatter.setInputDecimal('<inp2:lang.current_Field name="DecimalPoint" js_escape="1"/>');
+	// formatter.setSeparators(true, '<inp2:lang.current_Field name="ThousandSep" js_escape="1"/>', '<inp2:lang.current_Field name="DecimalPoint" js_escape="1"/>');
+
+	function PrepareData() {
+		SelectToString('options_list[]', '<inp2:po_InputName field="Values"/>');
+		prices_str = '';
+
+		for (var i in prices) {
+			if (prices[i] == null) continue;
+//			formatter.setNumber(prices[i]);
+//			prices[i] = formatter.pars
+			prices_str += i.replace(/\|/g, '\\|').replace(/\=/g, '\\=') + '=' + prices[i]  + '|'; // .replace(/\|/g, '\\|').replace(/\=/g, '\\=') + '|'
+		}
+		if(prices_str.length > 0) prices_str = prices_str.substring(0,prices_str.length-1);
+//		alert('prices str: '+prices_str)
+		document.getElementById('<inp2:po_InputName field="Prices"/>').value = prices_str;
+
+		price_types_str = '';
+		for (var i in price_types) {
+			if (price_types[i] == null) continue;
+			price_types_str += i.replace(/\|/g, '\\|').replace(/\=/g, '\\=') + '=' + price_types[i].replace(/\|/g, '\\|').replace(/\=/g, '\\=') + '|'
+		}
+		if(price_types_str.length > 0) price_types_str = price_types_str.substring(0,price_types_str.length-1);
+		document.getElementById('<inp2:po_InputName field="PriceTypes"/>').value = price_types_str;
+	}
+
+	function SelectToString(aSelectId, aStringId) {
+		aSelect = document.getElementById(aSelectId);
+		// written by Slava, patched by Alex, modified by SergeyG
+		var result = '';
+		for (var i=0; i < aSelect.length; i++)
+		{
+			cur = aSelect.options[i];
+			result += cur.value+',';
+		}
+		if(result.length > 0) result = result.substring(0,result.length-1);
+		document.getElementById(aStringId).value = result;
+		return result;
+	}
+
+	function add_option(aSelectId) {
+		aSelect = document.getElementById(aSelectId);
+		var el = document.getElementById('option_value');
+		price = document.getElementById('option_price');
+		price_val = NumberFormatter.Parse(price.value);
+		price_type = document.getElementById('kernel_form').elements['option_price_type'];
+		price_mod = '';
+		if (price_type[0].checked) {
+			price_mod = '$'
+		}
+		if (price_type[1].checked) {
+			price_mod = '%'
+		}
+
+		if (price_val < 0) {
+			sign = '-';
+		}
+		else {
+			sign = '+';
+		}
+
+		if (price.value != '') {
+			option_text = el.value + ': ' + sign + price_val + ' ' + price_mod;
+		}
+		else {
+			option_text = el.value;
+		}
+
+		if (el)
+		{
+			if (el.value=='') return;
+			var found = false;
+			var valueArray;
+
+			for (i = 0; i < aSelect.options.length; i++){
+				if (aSelect.options[i].value == edit_id){
+					found = true;
+					break;
+				}
+			}
+			if (!found){
+				aSelect.options[aSelect.length] = new Option(option_text, el.value);
+			}
+			else {
+				aSelect.options[i].text = option_text;
+				aSelect.options[i].value = el.value;
+			}
+			//alert('set '+price.value+' unformatted is '+price_val)
+			prices[el.value] = price_val
+			price_types[el.value] = price_mod;
+			el.value='';
+			price.value = '';
+			price_type[0].checked = false;
+			price_type[1].checked = false;
+			edit_id = null;
+			document.getElementById('option_save').value = '<inp2:m_phrase label="la_button_add"/>';
+		}
+	}
+
+	function cancel_edit() {
+		var el = document.getElementById('option_value');
+		document.getElementById('option_save').value = '<inp2:m_phrase label="la_button_add"/>';
+		el.value = '';
+		document.getElementById('option_price').value = '';
+		document.getElementById('kernel_form').elements['option_price_type'][0].checked = false;
+		document.getElementById('kernel_form').elements['option_price_type'][1].checked = false;
+		edit_id = null;
+	}
+
+	function htmlspecialchars(str) {
+		return str.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;");
+	}
+
+	function edit_option(aSelectId) {
+		aSelect = document.getElementById(aSelectId);
+		for (var i=0; i < aSelect.length; i++)
+		{
+			cur = aSelect.options[i];
+			if(aSelect.options[i].selected == true) {
+				edit_id = aSelect.options[i].value;
+				document.getElementById('option_value').value = aSelect.options[i].value;
+
+//				alert('setting: '+prices[edit_id]+' formatted is '+NumberFormatter.Format(prices[edit_id]))
+				var formatted = NumberFormatter.Format(prices[edit_id]) ;
+				document.getElementById('option_price').value = formatted == 0 ? '' : formatted;
+
+				if (price_types[edit_id] == '$') {
+					document.getElementById('kernel_form').elements['option_price_type'][0].checked = true;
+				}
+				if (price_types[edit_id] == '%') {
+					document.getElementById('kernel_form').elements['option_price_type'][1].checked = true;
+				}
+
+			}
+		}
+		document.getElementById('option_save').value = '<inp2:m_phrase label="la_Text_Save"/>';
+	}
+
+	function delete_option(aSelectId) {
+		aSelect = document.getElementById(aSelectId);
+		if (!confirm('<inp2:m_phrase label="la_Delete_Confirm"/>')) return;
+		for (var i=aSelect.length-1; i >= 0; i--)
+		{
+			cur = aSelect.options[i];
+			if(aSelect.options[i].selected == true) {
+				prices[aSelect.options[i].value] = null;
+				price_types[aSelect.options[i].value] = null;
+				aSelect.remove(i);
+			}
+		}
+	}
+
+	function catchEnter(e) {
+		if (!e) return;
+		//enter
+	 	if (e.keyCode == 13) {
+	 		add_option('options_list[]')
+	 	}
+	}
+
+	function update_type(type) {
+		switch (type) {
+			case '1': //drop-down
+				switch_option_values(1);
+				break;
+			case '5': //edit-box
+				switch_option_values(0);
+				break;
+			case '4': //text-area
+				switch_option_values(0);
+				break;
+			case '6': //checkboxes
+				switch_option_values(1);
+				break;
+			case '3': //radio-buttons
+				switch_option_values(1);
+				break;
+			default:
+				switch_option_values(0);
+		}
+	}
+
+	function switch_option_values(mode) {
+		var elems = new Array('option_value', 'option_price', 'option_price_type_$','option_price_type_%','options_list[]',	'option_save', 'option_cancel', 'opt_edit_but', 'opt_del_but', 'opt_moveup_but', 'opt_movedown_but');
+		for (var an_elem in elems) {
+			the_elem = document.getElementById(elems[an_elem])
+			the_elem.disabled = !mode;
+			if (the_elem.tagName == 'INPUT' && the_elem.getAttribute('type') == 'button') {
+				the_elem.className = mode ? 'button':'button-disabled';
+			}
+		}
+	}
+
+</script>
+<inp2:m_DefineElement name="option_block">
+	<option value="<inp2:m_param name="id"/>" <inp2:m_param name="selected"/>><inp2:m_param name="value"/>: <inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/></option>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="option_block_js">
+	prices['<inp2:m_param name="id"/>'] = '<inp2:m_param name="price"/>';
+	price_types['<inp2:m_param name="id"/>'] = '<inp2:m_param name="price_type"/>';
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="options_list">
+	<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+		<inp2:m_inc param="tab_index" by="1"/>
+		<td class="label-cell">
+			<inp2:m_phrase label="la_fld_OptionValue"/>:
+		</td>
+		<td class="control-mid">&nbsp;</td>
+		<td class="control-cell">
+			<input type="text" name="option_value" id="option_value" value="" style="width: 300px" onkeydown="catchEnter(event)">&nbsp;<br/>
+		</td>
+	</tr>
+
+	<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+		<inp2:m_inc param="tab_index" by="1"/>
+		<td class="label-cell">
+			<inp2:m_phrase label="la_fld_OptionPrice"/>:
+		</td>
+		<td class="control-mid">&nbsp;</td>
+		<td class="control-cell">
+			<input type="text" name="option_price" id="option_price" value="" style="width: 40px">&nbsp;
+			<input type="radio" name="option_price_type" value="$" id="option_price_type_$">&nbsp;<label for="option_price_type_$">$</label>&nbsp;&nbsp;
+			<input type="radio" name="option_price_type" value="%" id="option_price_type_%">&nbsp;<label for="option_price_type_%">%</label>&nbsp;&nbsp;
+			<br/>
+			<input type="button" id="option_save" class="button" style="width: 80px" value="<inp2:m_phrase label="la_button_add"/>" onclick="add_option('options_list[]')">&nbsp;
+			<input type="button" id="option_cancel" class="button" value="<inp2:m_phrase label="la_Cancel"/>" onclick="cancel_edit()">&nbsp;
+		</td>
+	</tr>
+
+	<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+		<inp2:m_inc param="tab_index" by="1"/>
+		<td class="label-cell">&nbsp;</td>
+		<td class="control-mid">&nbsp;</td>
+		<td class="control-cell">
+			<input type="hidden" value="" name="<inp2:po_InputName field="Values"/>" id="<inp2:po_InputName field="Values"/>">
+			<input type="hidden" value="" name="<inp2:po_InputName field="Prices"/>" id="<inp2:po_InputName field="Prices"/>">
+			<input type="hidden" value="" name="<inp2:po_InputName field="PriceTypes"/>" id="<inp2:po_InputName field="PriceTypes"/>">
+			<table style="padding: 0px; margin: 0px">
+				<tr>
+					<td style="padding: 0px; margin: 0px">
+						<select style="padding-left: 0px; width: 300px" name="options_list[]" id="options_list[]" multiple onchange="PrepareData()" ondblclick="edit_option('options_list[]')" size="10" style="width: 200px">
+							<inp2:po_ShowOptions render_as="option_block" show="current" no_currency="1"/>
+						</select>
+						<script type="text/javascript">
+							<inp2:po_ShowOptions render_as="option_block_js" show="current" js="1"/>
+						</script>
+					</td>
+					<td style="padding-left: 5px; vertical-align: top">
+						<input type="button" id="opt_edit_but" class="button" style="width: 90px" onclick="edit_option('options_list[]')" value="<inp2:m_phrase label="la_Text_Edit"/>"><br/>
+						<input type="button" id="opt_del_but" class="button" style="width: 90px" onclick="delete_option('options_list[]')" value="<inp2:m_phrase label="la_Text_Delete"/>"><br/>
+						<br/><br/><br/>
+						<input type="button" id="opt_moveup_but" class="button" style="width: 90px" onclick="move_options_up('options_list[]', 1)" value="<inp2:m_phrase label="la_prompt_moveup"/>"><br/>
+						<input type="button" id="opt_movedown_but" class="button" style="width: 90px" onclick="move_options_down('options_list[]', 1)" value="<inp2:m_phrase label="la_prompt_movedown"/>"><br/>
+					</td>
+				</tr>
+			</table>
+		</td>
+	</tr>
+</inp2:m_DefineElement>
+
+<inp2:po_SaveWarning name="grid_save_warning"/>
+<inp2:po_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="!la_Text_Option!"/>
+			<inp2:m_RenderElement name="inp_edit_hidden" prefix="po" field="ProductId"/>
+			<inp2:m_RenderElement name="inp_label" prefix="po" field="ProductOptionId" title="!la_fld_Id!"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="po" field="Name" title="!la_fld_Name!" size="40"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="po" field="Required" title="!la_fld_Required!"/>
+			<!--<inp2:m_RenderElement name="inp_edit_checkbox" prefix="po" field="Listable" title="!la_fld_Listable!"/>-->
+			<inp2:m_RenderElement name="inp_edit_options" prefix="po" field="OptionType" title="!la_fld_OptionType!" onchange="update_type(this.value)"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="po" field="Priority" title="!la_fld_Priority!" size="2"/>
+			<inp2:m_RenderElement name="options_list" prefix="po" field="Values" title="!la_fld_Values!" size="2"/>
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<script type="text/javascript">
+	update_type(document.getElementById('<inp2:po_InputName field="OptionType"/>').value);
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/products/option_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.15.2.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/products/products_pricing_grid.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/products/products_pricing_grid.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/products/products_pricing_grid.tpl	(revision 12131)
@@ -0,0 +1,101 @@
+<inp2:m_RequireLogin permissions="in-portal:browse.view" system="1"/>
+<inp2:m_if check="m_ParamEquals" name="tab_init" value="1">
+	<div id="<inp2:m_param name="item_prefix"/>_div" prefix="<inp2:m_param name="item_prefix"/>" group_id="-1"></div>
+	<script type="text/javascript">$BracketManager.registerTab('<inp2:m_param name="item_prefix"/>');</script>
+<inp2:m_else/>
+	<inp2:lang.current_Field name="Charset" result_to_var="charset"/>
+	<inp2:m_Header data="Content-type: text/plain; charset=$charset"/>
+	if ($request_visible) {
+		document.getElementById('<inp2:m_get name="item_prefix"/>_div').setAttribute('group_id', <inp2:m_get name="group_id"/>);
+		maximizeElement( jq('#<inp2:m_get name="item_prefix"/>_div') );
+	}
+	<inp2:m_if check="c_SaveWarning">
+		document.getElementById('save_warning').style.display = 'block';
+		$edit_mode = true;
+	</inp2:m_if>
+	#separator#
+	<inp2:m_DefineElement name="pr_edit_box" >
+	<td>
+		<input type="text" size="<inp2:m_param name="size"/>" name="pr.tang[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
+					id="pr.tang[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
+					tabindex="<inp2:m_get param="tab_index"/>"
+					value="<inp2:m_param name="$field"/>"
+				>
+	</inp2:m_DefineElement>
+
+	<inp2:m_DefineElement name="pr_edit_checkbox" >
+	<td>
+		<input type="hidden" name="pr.tang[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]" id="pr.tang[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]" tabindex="<inp2:m_get param="tab_index"/>" value="<inp2:m_param name="$field"/>">
+				<input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="_cb_<inp2:m_param name="field"/>" name="_cb_<inp2:m_param name="field"/>"
+					<inp2:m_if check="m_paramequals" param="$field" value="1" >
+						checked
+					</inp2:m_if> class="<inp2:m_param name="field_class"/>" onclick="update_checkbox(this, document.getElementById('pr.tang[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]'))">
+	</td>
+	</inp2:m_DefineElement>
+
+	<inp2:m_DefineElement name="pr_edit_max" >
+	<td>
+				<input type="text" size="10" name="pr.tang[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
+					id="pr.tang[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
+					tabindex="<inp2:m_get param="tab_index"/>"
+					value="<inp2:m_param name="max"/>"
+					<inp2:m_if check="m_paramequals" param="next_min_id" value=""  >
+					<inp2:m_else />
+					onchange="set_start(<inp2:m_param name="id"/>, <inp2:m_param name="next_min_id"/>)"
+					</inp2:m_if>
+
+				>
+	</td>
+	</inp2:m_DefineElement>
+
+	<inp2:m_DefineElement name="pr_edit_min" >
+	<td>
+				<input type="hidden" name="pr.tang[<inp2:m_param name="id"/>][PriceId]" id="pr.tang[<inp2:m_param name="id"/>][PriceId]" value="<inp2:m_param name="id"/>">
+				<input type="text" size="10"
+					<inp2:m_if check="m_paramequals" param="first" value="1" >
+						<inp2:m_inc param="tab_index" by="1"/>
+						tabindex="<inp2:m_get param="tab_index"/>"
+					<inp2:m_else/>
+						readonly
+					</inp2:m_if>
+					name="pr.tang[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
+					id="pr.tang[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
+					value="<inp2:m_param name="min"/>"
+					<inp2:m_if check="m_paramequals" param="first" value="1" ><inp2:m_else/>disabled</inp2:m_if>
+				>
+	</td>
+	</inp2:m_DefineElement>
+
+	<inp2:m_DefineElement name="prbracket">
+		<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
+
+			<inp2:m_RenderElement name="pr_edit_min" IdField="$IdField" PrefixSpecial="pr.tang" field="MinQty" title="!la_fld_Title!" size="40" pass_params="true"/>
+
+			<inp2:m_RenderElement name="pr_edit_max" IdField="$IdField" PrefixSpecial="pr.tang" field="MaxQty" title="!la_fld_Title!" size="40" pass_params="true"/>
+
+			<inp2:m_RenderElement name="pr_edit_box" IdField="$IdField" PrefixSpecial="pr.tang" field="Cost" title="!la_fld_Title!" size="4" pass_params="true"/>
+
+			<inp2:m_RenderElement name="pr_edit_box" IdField="$IdField" PrefixSpecial="pr.tang" field="Price" title="!la_fld_Title!" size="4" pass_params="true"/>
+
+			<inp2:m_RenderElement name="pr_edit_box" IdField="$IdField" PrefixSpecial="pr.tang" field="Points" title="!la_fld_Title!" size="4" pass_params="true"/>
+
+			<inp2:m_RenderElement name="pr_edit_checkbox" IdField="$IdField" PrefixSpecial="pr.tang" field="Negotiated" title="!la_fld_Title!" pass_params="true"/>
+
+		</tr>
+	</inp2:m_DefineElement>
+	<inp2:m_DefineElement name="pr_grid_th" width="">
+		<td class="columntitle_small"<inp2:m_if check="m_Param" name="width"> style="width: <inp2:m_Param name='width'/>"</inp2:m_if>><inp2:m_phrase label="$phrase" /></td>
+	</inp2:m_DefineElement>
+
+	<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
+		<tr nowrap="nowrap" class="grid-header-row-0">
+			<inp2:m_RenderElement name="pr_grid_th" phrase="!la_col_minqty!" width="15%"/>
+			<inp2:m_RenderElement name="pr_grid_th" phrase="!la_col_maxqty!" width="15%"/>
+			<inp2:m_RenderElement name="pr_grid_th" phrase="!la_col_cost!" width="10%"/>
+			<inp2:m_RenderElement name="pr_grid_th" phrase="!la_col_price!" width="10%"/>
+			<inp2:m_RenderElement name="pr_grid_th" phrase="!la_col_points!" width="10%"/>
+			<inp2:m_RenderElement name="pr_grid_th" phrase="!la_col_negotiated!"/>
+		</tr>
+		<inp2:pr.tang_ShowPricingForm block="prbracket" IdField="PriceId"/>
+	</table>
+</inp2:m_if>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/products/products_pricing_grid.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/products/products_pricing.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/products/products_pricing.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/products/products_pricing.tpl	(revision 12131)
@@ -0,0 +1,222 @@
+<inp2:adm_SetPopupSize width="1000" height="680"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" pagination="1" pagination_prefix="g" grid="Radio" title_preset="pricing" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+	  	<script type="text/javascript" src='js/catalog.js'></script>
+
+  		<script type="text/javascript">
+  				Request.progressText = '<inp2:m_phrase name="la_title_Loading" escape="1"/>';
+
+				var defaultGroup = <inp2:conf_ConfigValue name="User_LoggedInGroup"/>;
+
+				Catalog.prototype.AfterInit = function () {
+					Grids['g'].SelectDefault(defaultGroup);
+				}
+
+				Catalog.prototype.go_to_group = function($group_id) {
+					if (!isset($group_id)) {
+						$group_id = 0; // gets current group
+					}
+					else {
+						set_hidden_field('current_group_id', $group_id);
+					}
+					this.refreshTab('pr.tang', 'pr.tang_div');
+				}
+
+  				Catalog.prototype.refreshTab = function($prefix, $div_id, $force) {
+					var $group_id = get_hidden_field('current_group_id');
+					var $tab_group_id = document.getElementById($div_id).getAttribute('group_id');
+					if ($group_id != $tab_group_id || $force) {
+						// query tab content only in case if not queried or category don't match
+						var $url = this.URLMask.replace('#ITEM_PREFIX#', $prefix).replace('#GROUP_ID#', $group_id);
+						this.BusyRequest[$prefix] = false;
+						Request.makeRequest($url, this.BusyRequest[$prefix], $div_id, this.successCallback, this.errorCallback, $div_id, this);
+					}
+				}
+
+				// adds information about tab to tab_registry
+				Catalog.prototype.registerTab = function($tab_id) {
+					var $tab = document.getElementById($tab_id + '_div');
+					var $index = this.TabRegistry.length;
+					this.TabRegistry[$index] = new Array();
+					this.TabRegistry[$index]['tab_id'] = $tab_id;
+					this.TabRegistry[$index]['prefix'] = $tab.getAttribute('prefix');
+					this.TabRegistry[$index]['dep_buttons'] = new Array();
+					this.TabRegistry[$index]['index'] = $index;
+				}
+
+				Catalog.prototype.displaySearch = function ($prefix) {
+
+				}
+
+				Catalog.prototype.submit_event = function($prefix_special, $event, $t, $return_result) {
+					var $prev_template = get_hidden_field('t');
+					if (isset($event)) set_hidden_field('events[' + $prefix_special + ']', $event);
+					if (isset($t)) set_hidden_field('t', $t);
+
+					var $tab_id = this.queryTabRegistry('prefix', this.ActivePrefix, 'tab_id');
+					if ($return_result)
+						this.submit_kernel_form($tab_id);
+					else
+						this.submit_kernel_form();
+
+					set_hidden_field('t', $prev_template);
+				}
+
+	  			var $BracketManager = new Catalog('<inp2:m_Link template="in-commerce/products/products_pricing_grid" item_prefix="#ITEM_PREFIX#" group_id="#GROUP_ID#" no_amp="1" pass="m,p,pr.tang"/>', 'permmanager_', 'ProductPriceBracketManager');
+
+		</script>
+
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('p','<inp2:p_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('p','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('p', '<inp2:p_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('p', '<inp2:p_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				function add_brackets()
+	  			{
+	  				//submit_event('pr.tang', 'OnMoreBrackets')
+	  				set_hidden_field('group_id', get_hidden_field('current_group_id'));
+	  				set_hidden_field('item_prefix', $BracketManager.ActivePrefix);
+	  				$BracketManager.submit_event('pr.tang', 'OnMoreBrackets', 'in-commerce/products/products_pricing_grid', true);
+
+	  			}
+				a_toolbar.AddButton( new ToolBarButton('more_brackets', '<inp2:m_phrase label="la_ToolTip_MoreBrackets" escape="1"/>', add_brackets) );
+
+				function infinity()
+	  			{
+					//submit_event('pr.tang', 'OnInfinity');
+					set_hidden_field('group_id', get_hidden_field('current_group_id'));
+					set_hidden_field('item_prefix', $BracketManager.ActivePrefix);
+					$BracketManager.submit_event('pr.tang', 'OnInfinity', 'in-commerce/products/products_pricing_grid', true);
+	  			}
+				a_toolbar.AddButton( new ToolBarButton('infinity', '<inp2:m_phrase label="la_ToolTip_Infinity" escape="1"/>', infinity) );
+
+				function arrange_brackets()
+	  			{
+					//submit_event('pr.tang', 'OnArrange')
+					set_hidden_field('group_id', get_hidden_field('current_group_id'));
+					set_hidden_field('item_prefix', $BracketManager.ActivePrefix);
+					$BracketManager.submit_event('pr.tang', 'OnArrange', 'in-commerce/products/products_pricing_grid', true);
+					//$BracketManager.refreshTab('pr.tang', 'pr.tang_div', true);
+	  			}
+				a_toolbar.AddButton( new ToolBarButton('arrange', '<inp2:m_phrase label="la_ToolTip_Arrange" escape="1"/>', arrange_brackets) );
+
+
+				function edit(){ }
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="p_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					//a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="p_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="p_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="g" grid="Radio"/>
+	</tr>
+</tbody>
+</table>
+
+<script type="text/javascript">
+	function set_start(id, next_id)
+	{
+		//var next_id = id - 1;
+		var input_id = ('pr.tang[' + next_id) + '][MinQty]';
+		var orig_id = ('pr.tang[' + id) + '][MinQty]';
+		if(document.getElementById(input_id) != null)
+		{
+			var new_value = parseInt(document.getElementById('pr.tang[' + id + '][MaxQty]').value);
+			if( isNaN(new_value) ) new_value = 0;
+			document.getElementById('pr.tang[' + id + '][MaxQty]').value = new_value;
+			document.getElementById(input_id).value = new_value;
+		}
+	}
+
+	function enableKernelFormFields()
+	{
+		var kForm = document.forms.kernel_form;
+		var elem = false;
+		for (var i=0; i<kForm.elements.length; i++){
+			elem = kForm.elements[i];
+			if (elem.type == "text" && elem.disabled == true){
+				elem.disabled = false;
+			}
+		}
+	}
+</script>
+
+<inp2:pr.tang_SaveWarning name="grid_save_warning"/>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="g" IdField="GroupId" per_page="-1" grid="Radio" header_block="grid_column_title_no_sorting" grid_height="220" grid_status="0"/>
+
+<inp2:m_include t="in-commerce/products/products_pricing_grid" tab_init="1" item_prefix="pr.tang"/>
+
+<inp2:m_include t="incs/footer"/>
+
+<script type="text/javascript">
+	Grids['g'].OnSelect = function ($id) {
+		set_hidden_field('group_id', $id);
+		$BracketManager.go_to_group($id);
+
+	}
+
+	Grids['g'].OnUnSelect = function ($id) {
+		set_hidden_field('group_id', $id);
+		set_hidden_field('item_prefix', $BracketManager.ActivePrefix);
+		$BracketManager.submit_event('pr.tang', 'OnArrange', 'in-commerce/products/products_pricing_grid', false);
+
+	}
+
+	Grids['g'].SelectDefault = function (group_id) {
+		for (var $i in this.Items) {
+			if (this.Items[$i].ItemId == group_id){
+				this.Items[$i].Select();
+				break;
+			}
+		}
+	}
+
+	$(document).ready(
+		function() {
+			$BracketManager.Init();
+		}
+	);
+
+	document.forms.kernel_form.onsubmit =  enableKernelFormFields;
+</script>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/products/products_pricing.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.11.2.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/products/access_pricing_edit.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/products/access_pricing_edit.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/products/access_pricing_edit.tpl	(revision 12131)
@@ -0,0 +1,62 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" title_preset="pricing_edit"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('pr','<inp2:pr_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('pr','OnCancel');
+						}
+				 ) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:pr_SaveWarning name="grid_save_warning"/>
+<inp2:pr_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="!la_section_PriceBracket!"/>
+			<inp2:m_RenderElement name="inp_edit_hidden" prefix="pr" field="ProductId"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="pr" field="AccessDuration" title="!la_fld_AccessDuration!" size="4"/>
+			<inp2:m_RenderElement name="inp_edit_options" prefix="pr" field="AccessUnit" title="!la_fld_AccessDurationUnit!" size="20"/>
+
+	<!--	<inp2:m_RenderElement name="inp_edit_box" prefix="pr" field="AccessRebillDate" title="!la_fld_AccessRebillDate!" size="5"/> -->
+
+			<!-- Customization healtheconomics.org -->
+
+	<!--
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="pr" field="DurationType" title="!la_fld_DurationType!"/>
+			<inp2:m_RenderElement name="inp_edit_date" prefix="pr" field="AccessExpiration" title="!la_fld_AccessExpiration!"/>
+	-->
+
+			<!-- //Customization healtheconomics.org -->
+
+			<inp2:m_RenderElement name="inp_edit_box" prefix="pr" field="Description" title="!la_fld_Description!" size="30"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="pr" field="Price" title="!la_fld_Price!" size="4"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="pr" field="IsPrimary" title="!la_fld_Primary!"/>
+
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_if check="pr_Field" name="IsPrimary">
+	<script type="text/javascript">
+		document.getElementById('_cb_<inp2:pr_InputName field="IsPrimary"/>').disabled = true;
+	</script>
+</inp2:m_if>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/products/access_pricing_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.10.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/products/products_relations.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/products/products_relations.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/products/products_relations.tpl	(revision 12131)
@@ -0,0 +1,105 @@
+<inp2:adm_SetPopupSize width="1000" height="680"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" pagination="1" pagination_prefix="rel" title_preset="relations" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('p','<inp2:p_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('p','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('p', '<inp2:p_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('p', '<inp2:p_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				//Relations related:
+				a_toolbar.AddButton( new ToolBarButton('new_relation', '<inp2:m_phrase label="la_ToolTip_New_Relation" escape="1"/>',
+						function() {
+							openSelector('rel', '<inp2:adm_SelectorLink prefix="rel" selection_mode="single" tab_prefixes="all"/>', 'TargetId', '950x600');
+						} ) );
+
+				function edit()
+	  			{
+	  				std_edit_temp_item('rel', 'in-commerce/products/relations_edit');
+	  			}
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('rel')
+						} ) );
+
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+				a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
+							submit_event('rel','OnMassApprove');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
+							submit_event('rel','OnMassDecline');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep4') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="p_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					//a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="p_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="p_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="rel" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="rel" IdField="RelationshipId" grid="Default" menu_filters="yes"/>
+<script type="text/javascript">
+	Grids['rel'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline') );
+</script>
+<input type="hidden" name="TargetId" id="TargetId" value="<inp2:m_get name="TargetId"/>">
+<input type="hidden" name="TargetType" id="TargetType" value="<inp2:m_get name="TargetType"/>">
+<inp2:m_include t="incs/footer"/>
+
+<script type="text/javascript">
+	var $env = document.getElementById('sid').value+'-:m<inp2:m_get name="m_cat_id"/>-1-1-1-s';
+</script>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/products/products_relations.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.10.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/products/file_edit.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/products/file_edit.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/products/file_edit.tpl	(revision 12131)
@@ -0,0 +1,70 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" title_preset="file_edit"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('file','<inp2:file_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('file','OnCancel');
+						}
+				 ) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:file_SaveWarning name="grid_save_warning"/>
+<inp2:file_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="!la_section_File!"/>
+			<inp2:m_RenderElement name="inp_edit_hidden" prefix="file" field="ProductId"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="file" field="Name" title="!la_fld_Name!" size="50" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="file" field="Version" title="!la_fld_Version!" size="10" />
+			<inp2:m_RenderElement name="inp_edit_upload" prefix="file" field="RealPath" title="!la_fld_FilePath!" />
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="file" field="Status" title="!la_fld_Enabled!" onchange="check_primary()" />
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="file" field="IsPrimary" title="!la_fld_Primary!" onchange="check_status()" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="file" field="Priority" title="!la_fld_Priority!" size="4"/>
+			<inp2:m_RenderElement name="inp_edit_date" prefix="file" field="AddedOn" title="!la_fld_AddedOn!" />
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<script type="text/javascript">
+	<inp2:m_if check="file_Field" name="IsPrimary">
+		document.getElementById('_cb_<inp2:file_InputName field="IsPrimary" />').disabled = true;
+		document.getElementById('_cb_<inp2:file_InputName field="Status" />').disabled = true;
+	</inp2:m_if>
+
+	function check_status()
+	{
+		if(document.getElementById('_cb_<inp2:file_InputName field="IsPrimary" />').checked)
+		{
+			document.getElementById('_cb_<inp2:file_InputName field="Status" />').checked = true;
+			document.getElementById('<inp2:file_InputName field="Status"/>').value = 1;
+		}
+	}
+
+	function check_primary()
+	{
+		if(!document.getElementById('_cb_<inp2:file_InputName field="Status" />').checked)
+		{
+			document.getElementById('_cb_<inp2:file_InputName field="IsPrimary" />').checked = false;
+			document.getElementById('<inp2:file_InputName field="IsPrimary"/>').value = 0;
+		}
+	}
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/products/file_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.10.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/products/products_access.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/products/products_access.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/products/products_access.tpl	(revision 12131)
@@ -0,0 +1,104 @@
+<inp2:adm_SetPopupSize width="1000" height="680"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" pagination="1" pagination_prefix="pr" grid="Access" title_preset="access" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('p','<inp2:p_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('p','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('p', '<inp2:p_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('p', '<inp2:p_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+
+//				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+				//Pricing related:
+				a_toolbar.AddButton( new ToolBarButton('in-commerce:new_pricing', '<inp2:m_phrase label="la_ToolTip_NewPricing" escape="1"/>',
+						function() {
+							std_new_item('pr', 'in-commerce/products/access_pricing_edit')
+						} ) );
+
+				function edit()
+  				{
+  					std_edit_temp_item('pr', 'in-commerce/products/access_pricing_edit');
+  				}
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('pr')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('in-commerce:primary_pricing', '<inp2:m_phrase label="la_ToolTip_SetPrimary" escape="1"/>', function() {
+							submit_event('pr','OnSetPrimary');
+						}
+				 ) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="p_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+//					a_toolbar.HideButton('sep1');
+					a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="p_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="p_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="pr" grid="Access"/>
+	</tr>
+</tbody>
+</table>
+
+<div id="scroll_container" mode="minimal">
+	<table class="edit-form" style="border-bottom: 1px solid black;">
+		<inp2:m_RenderElement name="subsection" title="!la_section_Product!"/>
+
+			<inp2:m_RenderElement name="inp_edit_options" prefix="p" field="AccessGroupId" title="la_fld_AccessGroup" size="4"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="p" field="IsRecurringBilling" title="la_fld_IsRecurringBilling"/>
+			<!-- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="p" field="PayPalRecurring" title="la_fld_IsPayPalRecurring"/> -->
+
+			<!-- <inp2:m_RenderElement name="inp_edit_box" prefix="p" field="AccessDuration" title="!la_fld_AccessDuration!" size="4" /> -->
+			<!-- <inp2:m_RenderElement name="inp_edit_options" prefix="p" field="AccessDurationType" title="!la_fld_AccessDurationType!" size="20"/> -->
+			<!-- <inp2:m_RenderElement name="inp_edit_date_time" prefix="p" field="AccessStart" title="!la_fld_AccessStart!" size="10" /> -->
+			<!-- <inp2:m_RenderElement name="inp_edit_date_time" prefix="p" field="AccessEnd" title="!la_fld_AccessEnd!" size="10" /> -->
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="pr" IdField="PriceId" grid="Access" />
+
+<script type="text/javascript">
+	Grids['pr'].SetDependantToolbarButtons( new Array('edit','delete', 'primary_pricing') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/products/products_access.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.16.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/products/products_files.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/products/products_files.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/products/products_files.tpl	(revision 12131)
@@ -0,0 +1,129 @@
+<inp2:adm_SetPopupSize width="1000" height="680"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" pagination="1" pagination_prefix="file" title_preset="files" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('p','<inp2:p_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('p','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('p', '<inp2:p_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('p', '<inp2:p_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.AddButton( new ToolBarButton('new_file', '<inp2:m_phrase label="la_ToolTip_NewFile" escape="1"/>',
+						function() {
+							std_new_item('file', 'in-commerce/products/file_edit')
+						} ) );
+
+				function edit()
+  				{
+  					std_edit_temp_item('file', 'in-commerce/products/file_edit');
+  				}
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('file')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+				a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
+							submit_event('file','OnMassMoveUp');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
+							submit_event('file','OnMassMoveDown');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep4') );
+
+				a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
+							submit_event('file','OnMassApprove');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
+							submit_event('file','OnMassDecline');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep5') );
+
+				a_toolbar.AddButton( new ToolBarButton('primary_file', '<inp2:m_phrase label="la_ToolTip_SetPrimary" escape="1"/>', function() {
+							submit_event('file','OnSetPrimary');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep6') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="p_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+				<inp2:m_else/>
+					<inp2:m_if check="p_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="p_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="file" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<div id="scroll_container" mode="minimal">
+	<table class="edit-form" style="border-bottom: 1px solid black;">
+		<inp2:m_RenderElement name="subsection" title="!la_section_Product!"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="p" field="Price" title="!la_fld_Price!" size="8"/>
+			<inp2:m_RenderElement name="inp_edit_filler"/>
+		<inp2:m_RenderElement name="subsection" title="!la_section_Files!"/>
+	</table>
+</div>
+
+<inp2:m_DefineElement name="file_caption_td" module="">
+	<inp2:Field field="$field" grid="$grid"/><inp2:m_ifnot check="Field" field="Priority" equals_to="0"><span class="priority"><sup><inp2:Field field="Priority" /></sup></span></inp2:m_ifnot>
+</inp2:m_DefineElement>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="file" IdField="FileId" grid="Default"/>
+<script type="text/javascript">
+	Grids['file'].SetDependantToolbarButtons( new Array('edit','delete','primary_file','move_up','move_down','approve','decline') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/products/products_files.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.14.2.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/products/products_images.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/products/products_images.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/products/products_images.tpl	(revision 12131)
@@ -0,0 +1,107 @@
+<inp2:adm_SetPopupSize width="1000" height="680"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" pagination="1" pagination_prefix="img" title_preset="images" tab_preset="Default"/>
+
+<inp2:m_include t="incs/image_blocks"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+
+  				function edit()
+	  			{
+	  				std_edit_temp_item('img', 'in-commerce/products/images_edit');
+	  			}
+
+  				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('p','<inp2:p_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('p','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('p', '<inp2:p_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('p', '<inp2:p_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+
+
+				a_toolbar.AddButton( new ToolBarButton('new_image', '<inp2:m_phrase label="la_ToolTip_New_Images" escape="1"/>',
+						function() {
+							std_new_item('img', 'in-commerce/products/images_edit')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('img')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+				a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
+							submit_event('img','OnMassMoveUp');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
+							submit_event('img','OnMassMoveDown');
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarButton('primary_image', '<inp2:m_phrase label="la_ToolTip_SetPrimary" escape="1"/>', function() {
+							submit_event('img','OnSetPrimary');
+						}
+				 ) );
+
+				  a_toolbar.AddButton( new ToolBarSeparator('sep4') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="p_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+				<inp2:m_else/>
+					<inp2:m_if check="p_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="p_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="img" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="img" IdField="ImageId" grid="Default" menu_filters="yes"/>
+<script type="text/javascript">
+	Grids['img'].SetDependantToolbarButtons( new Array('edit','delete','move_up','move_down','primary_image') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/products/products_images.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.11.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/products/shipping_options.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/products/shipping_options.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/products/shipping_options.tpl	(revision 12131)
@@ -0,0 +1,78 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" title_preset="shipping_options"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+
+  			a_toolbar = new ToolBar();
+
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+						document.getElementById('<inp2:p_InputName field="ShippingLimitation"/>').value = select_to_string('selected_types');
+						submit_event('p','OnPreSavePopup');
+					}
+				) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Close" escape="1"/>', function() {
+							window_close();
+						}
+				 ) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:p_SaveWarning name="grid_save_warning"/>
+<inp2:p_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="!la_Text_Properties!"/>
+			<inp2:m_RenderElement name="inp_edit_hidden" prefix="p" field="ShippingLimitation"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="ShippingMode" title="!la_fld_ShippingMode!"/>
+
+			<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+				<inp2:m_inc param="tab_index" by="1"/>
+				<td class="label-cell">
+					<inp2:m_phrase label="la_fld_ShippingTypes"/>:
+				</td>
+				<td class="control-mid">&nbsp;</td>
+				<td class="control-cell">
+					<table>
+						<tr>
+							<td>
+								<inp2:m_DefineElement name="shipping_type">
+									<option value="<inp2:m_param name="_Id"/>"><inp2:m_param name="_Name"/></option>
+								</inp2:m_DefineElement>
+
+								<inp2:m_phrase label="la_fld_AllowedShippingTypes"/><br />
+								<select id="selected_types" multiple="multiple" size="20" style="width: 200px">
+									<inp2:p_ListShippingTypes mode="selected" render_as="shipping_type"/>
+								</select>
+							</td>
+							<td align="center">
+								<input type="button" value="&nbsp;&laquo;&laquo;&nbsp;" onclick="move_selected('available_types', 'selected_types'); select_sort('selected_types')" class="button"><br>
+								<img src="img/s.gif" width="1" height="4" alt=""><br>
+								<input type="button" value="&nbsp;&raquo;&raquo;&nbsp;" onclick="move_selected('selected_types', 'available_types'); select_sort('available_types');" class="button">
+							</td>
+							<td>
+								<inp2:m_phrase label="la_fld_AvailableShippingTypes"/><br />
+								<select id="available_types" multiple="multiple" size="20" style="width: 200px">
+									<inp2:p_ListShippingTypes render_as="shipping_type"/>
+								</select>
+							</td>
+						</tr>
+					</table>
+				</td>
+			</tr>
+
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/products/shipping_options.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7.2.6
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/products/products_custom.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/products/products_custom.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/products/products_custom.tpl	(revision 12131)
@@ -0,0 +1,66 @@
+<inp2:adm_SetPopupSize width="1000" height="680"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" grid="SeparateTab" pagination="1" pagination_prefix="cf" title_preset="products_custom" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('p','<inp2:p_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('p','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('p', '<inp2:p_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('p', '<inp2:p_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				function edit(){ }
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="p_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="p_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="p_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="cf" grid="SeparateTab"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_include t="incs/custom_blocks"/>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="cf" IdField="CustomFieldId" SourcePrefix="p" value_field="Value" per_page="-1" grid="SeparateTab" header_block="grid_column_title_no_sorting" no_init="no_init"/>
+
+<input type="hidden" name="cf_type" value="<inp2:p_UnitOption name='ItemType'/>"/>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/products/products_custom.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.13.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/products/products_list.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/products/products_list.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/products/products_list.tpl	(revision 12131)
@@ -0,0 +1,70 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" pagination="1" title_preset="product_list" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+  			//do not rename - this function is used in default grid for double click!
+  			function edit()
+  			{
+  				std_edit_item('p', 'in-commerce/products/products_edit');
+  			}
+
+  			var a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Products" escape="1"/>',
+						function() {
+							std_precreate_item('p', 'in-commerce/products/products_edit')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('p')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+				a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
+							submit_event('p','OnMassApprove');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
+							submit_event('p','OnMassDecline');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep4') );
+
+				a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
+							submit_event('p','OnMassMoveUp');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
+							submit_event('p','OnMassMoveDown');
+						}
+				 ) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="p" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_DefineElement name="preview">
+	<inp2:m_RenderElement name="preview_td" PrefixSpecial="$PrefixSpecial" field="$field" type="auto" max_width="100" max_height="100"/>
+</inp2:m_DefineElement>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="p" IdField="ProductId" grid="Default"/>
+<script type="text/javascript">
+	Grids['p'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','move_up','move_down') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/products/products_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/products/products_access_pricing.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/products/products_access_pricing.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/products/products_access_pricing.tpl	(revision 12131)
@@ -0,0 +1,85 @@
+<inp2:adm_SetPopupSize width="1000" height="680"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" pagination="1" pagination_prefix="pr" grid="Access" title_preset="access_pricing" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('p','<inp2:p_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('p','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('p', '<inp2:p_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('p', '<inp2:p_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				//Pricing related:
+				a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_PricingLimit" escape="1"/>',
+						function() {
+							std_new_item('pr', 'in-commerce/products/access_pricing_edit')
+						} ) );
+
+				function edit()
+  				{
+  					std_edit_temp_item('pr', 'in-commerce/products/access_pricing_edit');
+  				}
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('pr')
+						} ) );
+
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="p_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					//a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="p_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="p_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="pr" grid="Access"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_DefineElement name="negotiated_td">
+	<input disabled type="checkbox" <inp2:Field field="$field" checked="checked"/> >
+</inp2:m_DefineElement>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="pr" IdField="PriceId" grid="Access"/>
+<script type="text/javascript">
+	Grids['pr'].SetDependantToolbarButtons( new Array('edit','delete') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/products/products_access_pricing.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.10.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/products/pricing_edit.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/products/pricing_edit.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/products/pricing_edit.tpl	(revision 12131)
@@ -0,0 +1,44 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" title_preset="pricing_edit"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('pr','<inp2:pr_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('pr','OnCancel');
+						}
+				 ) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:pr_SaveWarning name="grid_save_warning"/>
+<inp2:pr_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="!la_section_PriceBracket!"/>
+			<inp2:m_RenderElement name="inp_edit_hidden" prefix="pr" field="ProductId"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="pr" field="MinQty" title="!la_fld_MinQty!" size="4"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="pr" field="MaxQty" title="!la_fld_MaxQty!" size="4"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="pr" field="Price" title="!la_fld_Price!" size="4"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="pr" field="Points" title="!la_fld_Points!" size="4"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="pr" field="Cost" title="!la_fld_Cost!" size="4"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="pr" field="Negotiated" title="!la_fld_Negotiated!" size="4"/>
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/products/pricing_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/products/products_reviews.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/products/products_reviews.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/products/products_reviews.tpl	(revision 12131)
@@ -0,0 +1,115 @@
+<inp2:adm_SetPopupSize width="1000" height="680"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" pagination="1" pagination_prefix="rev" title_preset="reviews" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('p','<inp2:p_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('p','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('p', '<inp2:p_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('p', '<inp2:p_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				//Pricing related:
+				a_toolbar.AddButton( new ToolBarButton('new_review', '<inp2:m_phrase label="la_ToolTip_NewReview" escape="1"/>',
+						function() {
+							std_new_item('rev', 'in-commerce/products/review_edit')
+						} ) );
+
+				function edit()
+	  			{
+	  				std_edit_temp_item('rev', 'in-commerce/products/review_edit');
+	  			}
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('rev')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+				a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
+							submit_event('rev','OnMassApprove');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
+							submit_event('rev','OnMassDecline');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep4') );
+
+				a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
+							submit_event('rev','OnMassMoveUp');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
+							submit_event('rev','OnMassMoveDown');
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarSeparator('sep5') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="p_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					//a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="p_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="p_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="rev" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_DefineElement name="reviewtext_checkbox_td">
+	<inp2:Field field="$field" no_special="no_special" cut_first="100"/>
+</inp2:m_DefineElement>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="rev" IdField="ReviewId" grid="Default" menu_filters="yes"/>
+<script type="text/javascript">
+	Grids['rev'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','move_up','move_down') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/products/products_reviews.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.11.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/products/products_categories.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/products/products_categories.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/products/products_categories.tpl	(revision 12131)
@@ -0,0 +1,84 @@
+<inp2:adm_SetPopupSize width="1000" height="680"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" pagination="1" pagination_prefix="p-ci" title_preset="categories" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+  				function edit(){ }
+
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('p','<inp2:p_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('p','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('p', '<inp2:p_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('p', '<inp2:p_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				//Category related:
+				a_toolbar.AddButton( new ToolBarButton('new_cat', '<inp2:m_phrase label="la_ToolTip_New_Category" escape="1"/>',
+						function() {
+							openSelector('p', '<inp2:adm_SelectorLink prefix="p" selection_mode="multi" tab_prefixes="none"/>', 'ItemCategory');
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('p-ci')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('primary_cat', '<inp2:m_phrase label="la_ToolTip_SetPrimaryCategory" escape="1"/>', function() {
+							submit_event('p-ci','OnSetPrimary');
+						}
+				 ) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="p_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+				<inp2:m_else/>
+					<inp2:m_if check="p_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="p_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="p-ci" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_DefineElement name="grid_checkbox_category_td">
+	<inp2:CategoryName field="$field" primary_title="!la_PrimaryCategory!" no_special="1"/>
+</inp2:m_DefineElement>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="p-ci" IdField="CategoryId" grid="Default"/>
+<script type="text/javascript">
+	Grids['p-ci'].SetDependantToolbarButtons( new Array('delete','primary_cat') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/products/products_categories.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.10.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/products/products_packagecontent.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/products/products_packagecontent.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/products/products_packagecontent.tpl	(revision 12131)
@@ -0,0 +1,95 @@
+<inp2:adm_SetPopupSize width="1000" height="680"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" pagination="1" pagination_prefix="p.content" title_preset="content" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('p','<inp2:p_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('p','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('p', '<inp2:p_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('p', '<inp2:p_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+
+				a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_Add_Items" escape="1"/>',
+						function() {
+							openSelector('p', '<inp2:adm_SelectorLink prefix="p" selection_mode="multi" tab_prefixes="p"/>', 'PackageContent', null, 'OnSaveItems');
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							submit_event('p.content','OnRemovePackageItem');
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				function edit()
+	  			{
+	  				alert();
+	  			}
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="p_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					//a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="p_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="p_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="p.content" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_include t="categories/ci_blocks"/>
+
+<inp2:m_DefineElement name="qty_td" >
+	<inp2:Field field="QtyInStock" grid="$grid"/>/<inp2:Field field="QtyReserved" grid="$grid"/>
+</inp2:m_DefineElement>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="p.content" IdField="ProductId" grid="Default" menu_filters="yes" types="content"/>
+<input type="hidden" name="TargetId" id="TargetId" value="<inp2:m_get name="TargetId"/>">
+<input type="hidden" name="TargetType" id="TargetType" value="<inp2:m_get name="TargetType"/>">
+<input type="hidden" name="main_prefix" id="main_prefix" value="p">
+<inp2:m_include t="incs/footer"/>
+
+<script type="text/javascript">
+	var $env = document.getElementById('sid').value+'-:m<inp2:m_get name="m_cat_id"/>-1-1-1-s';
+</script>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/products/products_packagecontent.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.12.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/products/option_combinations.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/products/option_combinations.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/products/option_combinations.tpl	(revision 12131)
@@ -0,0 +1,161 @@
+<inp2:adm_SetPopupSize width="830" height="720"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" pagination="1" pagination_prefix="poc.grid" title_preset="options_combinations"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+
+  			function edit()
+  			{
+  				set_hidden_field('remove_specials[poc.grid]', 1);
+  				set_hidden_field('poc_id', '');
+  				submit_event('poc','')
+  			}
+
+				a_toolbar = new ToolBar();
+
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Close" escape="1"/>', function() {
+							window_close();
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('poc.grid')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
+							submit_event('poc.grid','OnMassMoveUp');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
+							submit_event('poc.grid','OnMassMoveDown');
+						}
+				 ) );
+
+				a_toolbar.Render();
+
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="poc.grid" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_DefineElement name="option_value_block">
+	<option value="<inp2:m_param name="id"/>" <inp2:m_param name="selected"/>><inp2:m_param name="value"/></option>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="option_value_cb_block">
+	<input type="checkbox"
+				name="poc[<inp2:poc_Field name="CombinationId"/>][Combination][<inp2:Field name="ProductOptionId"/>][]"
+				id="poc[<inp2:poc_Field name="CombinationId"/>][Combination][<inp2:Field name="ProductOptionId"/>]_<inp2:m_param name="id"/>"
+				value="<inp2:m_param name="id"/>" <inp2:m_param name="selected"/>>
+				<label for="poc[<inp2:poc_Field name="CombinationId"/>][Combination][<inp2:Field name="ProductOptionId"/>]_<inp2:m_param name="id"/>"><inp2:m_param name="value"/></label>&nbsp;
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="option_block">
+	<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+		<inp2:m_inc param="tab_index" by="1"/>
+		<td class="label-cell">
+			<inp2:Field name="Name"/>:
+		</td>
+		<td class="control-mid">&nbsp;</td>
+		<script type="text/javascript">
+			if (typeof(fields['poc']) == 'undefined') {
+				fields['poc'] = new Object();
+			}
+			fields['poc']['Combination[<inp2:Field name="ProductOptionId"/>]'] = '<inp2:Field name="Name" js_escape="1"/>';
+		</script>
+		<td class="control-cell">
+			<inp2:m_if check="FieldEquals" field="OptionType" value="6">
+				<inp2:ShowOptions render_as="option_value_cb_block" mode="selected" combination_prefix="poc" combination_field="Combination"/>
+				<span class="error"><inp2:poc_Error field="Combination"/></span>
+			<inp2:m_else/>
+				<select style="padding-left: 0px; width: 300px" name="poc[<inp2:poc_Field name="CombinationId"/>][Combination][<inp2:Field name="ProductOptionId"/>]" id="poc[<inp2:poc_Field name="CombinationId"/>][Combination][<inp2:Field name="ProductOptionId"/>]" style="width: 200px">
+					<option value=""></option>
+					<option value="_ANY_"><inp2:m_phrase label="la_comm_Any"/></option>
+					<inp2:ShowOptions render_as="option_value_block" mode="selected" combination_prefix="poc" combination_field="Combination"/>
+				</select>
+			</inp2:m_if>
+		</td>
+		<script type="text/javascript">
+			add_form_error('poc', 'Combination[<inp2:Field name="ProductOptionId"/>]', '<inp2:poc_InputName field="Combination"/>[<inp2:Field name="ProductOptionId"/>]', '<inp2:poc_Error field="Combination" js_escape="1"/>');
+		</script>
+	</tr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="combination_buttons">
+	<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+		<inp2:m_inc param="tab_index" by="1"/>
+		<td class="label-cell">&nbsp;</td>
+		<td class="control-mid">&nbsp;</td>
+		<td class="control-cell">
+			<input class="button" style="width: 80px" type="button" onclick="submit_event('poc', '<inp2:poc_SaveEvent/>')" value="<inp2:m_if check="m_GetEquals" var="poc_SaveEvent" value="OnCreate"><inp2:m_Phrase label="la_Button_Add"/><inp2:m_else/><inp2:m_Phrase label="la_Button_Save"/></inp2:m_if>">&nbsp
+			<input class="button" style="width: 80px" type="button" onclick="submit_event('poc', 'OnNew')" value="<inp2:m_Phrase label="la_Cancel"/>">&nbsp;&nbsp;
+		</td>
+	</tr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="grid_combination_td">
+	<inp2:Field field="$field" grid="$grid" no_special="1"/>
+	<inp2:m_ifnot check="Field" field="Priority" equals_to="0"><span class="priority"><sup><inp2:Field field="Priority" /></sup></span></inp2:m_ifnot>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="price_td" >
+	<inp2:m_if check="FieldEquals" field="PriceType" value="1">
+		=
+		<inp2:Field field="$field" grid="$grid" format="%.2f"/>&nbsp;
+		$
+	</inp2:m_if>
+	<inp2:m_if check="FieldEquals" field="PriceType" value="2">
+		<inp2:Field field="$field" grid="$grid" format="%+.2f"/>&nbsp;
+		$
+	</inp2:m_if>
+	<inp2:m_if check="FieldEquals" field="PriceType" value="3">
+		<inp2:Field field="$field" grid="$grid" format="%+ 6.2f"/>&nbsp;
+		%
+	</inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="weight_td" >
+	<inp2:Field field="$field" grid="$grid"/>
+</inp2:m_DefineElement>
+
+<!--<inp2:poc_SaveWarning name="grid_save_warning"/>-->
+<inp2:poc_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container" style="height: 250px;">
+	<table class="edit-form" style="border-bottom: 1px solid black;">
+		<inp2:m_RenderElement name="subsection" title="!la_Text_Combination!"/>
+			<inp2:po.edit_PrintList2 per_page="-1" selectable_only="1" render_as="option_block" main_special=""/>
+		<inp2:m_RenderElement name="subsection" title="!la_Text_Properties!"/>
+			<inp2:m_RenderElement name="inp_edit_hidden" prefix="poc" field="ProductId"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="poc" field="Availability" title="!la_fld_Availability!"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="poc" field="PriceType" title="!la_fld_PriceType!"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="poc" field="Price" title="!la_fld_Price!" size="4"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="poc" field="SKU" title="!la_fld_SKU!" size="40"/>
+			<!--<inp2:m_RenderElement name="inp_edit_radio" prefix="poc" field="WeightType" title="!la_fld_WeightType!"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="poc" field="Weight" title="!la_fld_Weight!" size="4"/>-->
+			<inp2:m_RenderElement name="combination_buttons"/>
+			<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_RenderElement name="grid" main_special="" PrefixSpecial="poc.grid" IdField="CombinationId" grid="Default" menu_filters="yes"/>
+<script type="text/javascript">
+	Grids['poc.grid'].SetDependantToolbarButtons( new Array('delete') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/products/option_combinations.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.16.2.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/products/products_options.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/products/products_options.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/products/products_options.tpl	(revision 12131)
@@ -0,0 +1,128 @@
+<inp2:adm_SetPopupSize width="1000" height="680"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" pagination="1" pagination_prefix="po" title_preset="options" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('p','<inp2:p_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('p','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('p', '<inp2:p_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('p', '<inp2:p_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				//Pricing related:
+				a_toolbar.AddButton( new ToolBarButton('new_option', '<inp2:m_phrase label="la_ToolTip_NewOption" escape="1"/>',
+						function() {
+							std_new_item('po', 'in-commerce/products/option_edit')
+						} ) );
+
+				function edit()
+	  			{
+	  				std_edit_temp_item('po', 'in-commerce/products/option_edit');
+	  			}
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('po')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+				a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
+							submit_event('po','OnMassMoveUp');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
+							submit_event('po','OnMassMoveDown');
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarSeparator('sep5') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="p_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					//a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="p_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="p_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="po" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_DefineElement name="option_name_td">
+	<inp2:Field field="$field" grid="$grid"/><inp2:m_ifnot check="Field" field="Priority" equals_to="0"><span class="priority"><sup><inp2:Field field="Priority" /></sup></span></inp2:m_ifnot>
+</inp2:m_DefineElement>
+
+<script type="text/javascript">
+	function openCombinations() {
+		set_hidden_field('events[poc.edit]', 'OnNew');
+		openSelector('p', '<inp2:m_Link t="in-commerce/products/option_combinations" pass="all,poc" poc_id=""/>', '', '800x600');
+	}
+</script>
+
+
+<div id="scroll_container" mode="minimal">
+	<table class="edit-form" style="border-bottom: 1px solid black;">
+		<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+			<inp2:m_inc param="tab_index" by="1"/>
+			<td class="label-cell">
+				<inp2:m_phrase label="la_fld_ManageCombinations"/>:
+			</td>
+			<td class="control-mid">&nbsp;</td>
+			<td class="control-cell">
+				<a href="javascript:openCombinations();">Open</a>
+			</td>
+		</tr>
+		<inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="OptionsSelectionMode" title="!la_fld_OptionsSelectionMode!"/>
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="po" IdField="ProductOptionId" grid="Default"/>
+<script type="text/javascript">
+	Grids['po'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','move_up','move_down') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/products/products_options.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.11.2.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/products/products_inventory.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/products/products_inventory.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/products/products_inventory.tpl	(revision 12131)
@@ -0,0 +1,201 @@
+<inp2:adm_SetPopupSize width="1000" height="680"/>
+
+<inp2:m_include t="incs/header"/>
+
+<inp2:m_if check="p_Field" name="InventoryStatus" equals_to="2" db="db">
+	  <inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" pagination="1" pagination_prefix="poc.grid" grid="Inventory" title_preset="inventory" tab_preset="Default"/>
+<inp2:m_else/>
+	<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" title_preset="inventory" tab_preset="Default"/>
+</inp2:m_if>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+
+				function edit() {
+
+				}
+
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('p','<inp2:p_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('p','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('p', '<inp2:p_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('p', '<inp2:p_NextId/>');
+						}
+				 ) );
+
+				 <inp2:m_if check="p_Field" name="InventoryStatus" equals_to="2" db="db">
+					  a_toolbar.AddButton( new ToolBarSeparator('sep4') );
+
+						a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+									show_viewmenu(a_toolbar,'view');
+								}
+						) );
+				</inp2:m_if>
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="p_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+				<inp2:m_else/>
+					<inp2:m_if check="p_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="p_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+
+		<inp2:m_if check="p_Field" name="InventoryStatus" equals_to="2" db="db">
+			  <inp2:m_RenderElement name="search_main_toolbar" prefix="poc.grid" grid="Inventory"/>
+		</inp2:m_if>
+	</tr>
+</tbody>
+</table>
+
+<!-- block definitions: begin -->
+<inp2:m_DefineElement name="inp_edit_inventory">
+	<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+		<inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title"/>
+		<td class="control-cell">
+			<input type="text" name="<inp2:{$prefix}_InputName field="$field"/>" id="<inp2:{$prefix}_InputName field="$field"/>" value="<inp2:{$prefix}_Field field="$field"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" />&nbsp;
+			<input type="button" class="button" id="Add" value="<inp2:m_phrase label="la_btn_Add"/>" onclick="processButton('p', 'OnQtyAdd')">&nbsp;
+			<input type="button" class="button" id="Remove" value="<inp2:m_phrase label="la_btn_Remove"/>" onclick="processButton('p', 'OnQtyRemove')">&nbsp;
+			<input type="button" class="button" id="Order" value="<inp2:m_phrase label="la_btn_Order"/>" onclick="processButton('p', 'OnQtyOrder')">&nbsp;
+			<input type="button" class="button" id="ReceiveOrder" value="<inp2:m_phrase label="la_btn_ReceiveOrder"/>" onclick="processButton('p', 'OnQtyReceiveOrder')">&nbsp;
+			<input type="button" class="button" id="CancelOrder" value="<inp2:m_phrase label="la_btn_CancelOrder"/>" onclick="processButton('p', 'OnQtyCancelOrder')">&nbsp;
+		</td>
+		<inp2:m_RenderElement name="inp_edit_error" pass_params="1"/>
+	</tr>
+</inp2:m_DefineElement>
+<!-- block definitions: end -->
+
+<inp2:m_ifnot check="p_Field" name="InventoryStatus" equals_to="2" db="db">
+	<inp2:p_SaveWarning name="grid_save_warning"/>
+</inp2:m_ifnot>
+
+<inp2:p_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container"<inp2:m_if check="p_Field" name="InventoryStatus" equals_to="2" db="db"> style="height: 142px;"</inp2:m_if>>
+	<table class="edit-form"<inp2:m_if check="p_Field" name="InventoryStatus" equals_to="2" db="db"> style="border-bottom: 1px solid black;"</inp2:m_if>>
+		<inp2:m_RenderElement name="subsection" title="!la_section_Product!"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="InventoryStatus" title="la_fld_InventoryStatus" onchange="change_inventory_status()"/>
+
+			<inp2:m_ifnot check="p_Field" name="InventoryStatus" db="db" equals_to="2">
+				<!-- inventory by product / inventory disabled -->
+				<inp2:m_RenderElement name="inp_label" prefix="p" field="QtyInStock" title="!la_fld_QtyInStock!"/>
+				<inp2:m_RenderElement name="inp_label" prefix="p" field="QtyReserved" title="!la_fld_QtyReserved!"/>
+				<inp2:m_RenderElement name="inp_label" prefix="p" field="QtyBackOrdered" title="!la_fld_QtyBackOrdered!"/>
+				<inp2:m_RenderElement name="inp_label" prefix="p" field="QtyOnOrder" title="!la_fld_QtyOnOrder!"/>
+			</inp2:m_ifnot>
+
+			<inp2:m_RenderElement name="inp_edit_inventory" prefix="p" field="Qty" title="!la_fld_Qty!" size="3"/>
+			<inp2:m_RenderElement name="inp_edit_textarea" prefix="p" field="InventoryComment" title="!la_fld_Comment!" cols="40" rows="3"/>
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_if check="p_Field" name="InventoryStatus" equals_to="2" db="db">
+	<!-- inventory by product options -->
+	<inp2:m_DefineElement name="grid_combination_td">
+		<inp2:Field field="$field" grid="$grid" no_special="1"/>
+		<inp2:m_ifnot check="Field" field="Priority" equals_to="0"><span class="priority"><sup><inp2:Field field="Priority" /></sup></span></inp2:m_ifnot>
+	</inp2:m_DefineElement>
+
+	<inp2:m_RenderElement name="grid" main_special="" PrefixSpecial="poc.grid" IdField="CombinationId" grid="Inventory"/>
+</inp2:m_if>
+
+<script type="text/javascript">
+	var $inventory_status = <inp2:p_Field name="InventoryStatus" db="db"/>;
+	function getInventoryStatus() {
+		var $i = 0;
+		var $status_id = '<inp2:p_InputName field="InventoryStatus"/>';
+
+		while ($i <= 2) {
+			if (document.getElementById($status_id + '_' + $i).checked) {
+				return $i;
+			}
+			$i++;
+		}
+
+		return 0;
+	}
+
+	function change_inventory_status()
+	{
+		var $new_inventory_status = getInventoryStatus();
+		if (confirm('<inp2:m_phrase label="la_warning_ChangeInventoryStatus" />')) {
+			$inventory_status = $new_inventory_status;
+			affect_dependent_elements();
+			go_to_tab('p', t);
+		}
+		else {
+			var $status_id = '<inp2:p_InputName field="InventoryStatus"/>';
+			document.getElementById($status_id + '_' + $new_inventory_status).checked = false;
+			document.getElementById($status_id + '_' + $inventory_status).checked = true;
+			document.getElementById($status_id + '_' + $inventory_status).focus();
+		}
+	}
+
+	function iterateButtons($disabled, $class_name) {
+		var $i = 0;
+		var $buttons = Array('Add', 'Remove', 'Order', 'ReceiveOrder', 'CancelOrder');
+
+		while ($i < $buttons.length) {
+			document.getElementById($buttons[$i]).disabled = $disabled;
+			document.getElementById($buttons[$i]).className = $class_name;
+			$i++;
+		}
+	}
+
+	function processButton($prefix, $event) {
+		if ($inventory_status == 2) {
+			if (Grids['poc.grid'].GetSelected().length == 0) {
+				alert('<inp2:m_phrase name="la_warning_SelectOptionCombination" escape="1"/>')
+			}
+			else {
+				// go next if option combination is selected
+				submit_event($prefix, $event);
+			}
+		}
+		else {
+			// go next if not using option combination inventory
+			submit_event($prefix, $event);
+		}
+	}
+
+	function affect_dependent_elements()
+	{
+		var $inventory_disabled = document.getElementById('<inp2:p_InputName field="InventoryStatus"/>_0').checked;
+
+		iterateButtons($inventory_disabled, $inventory_disabled ? 'button-disabled' : 'button');
+		document.getElementById('<inp2:p_InputName field="Qty"/>').disabled = $inventory_disabled;
+		document.getElementById('<inp2:p_InputName field="InventoryComment"/>').disabled = $inventory_disabled;
+
+		document.getElementById('<inp2:p_InputName field="InventoryStatus"/>_2').disabled = <inp2:poc.grid_TotalRecords/> > 0 ? false : true;
+	}
+
+	affect_dependent_elements();
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/products/products_inventory.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.15.2.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/discounts/coupon_edit.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/discounts/coupon_edit.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/discounts/coupon_edit.tpl	(revision 12131)
@@ -0,0 +1,124 @@
+<inp2:adm_SetPopupSize width="870" height="600"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="coup" section="in-commerce:coupons" title_preset="coupons_edit" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('coup','<inp2:coup_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('coup','OnCancel');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('coup', '<inp2:coup_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('coup', '<inp2:coup_NextId/>');
+						}
+				 ) );
+
+				//a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="coup_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					//a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="coup_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="coup_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<script language="JavaScript">
+function Random(N) {
+    return Math.floor(N * (Math.random() % 1));
+}
+
+function generateRandomCode(elementId){
+    var j, S = "", d;
+    for (j = 0; j < 10; j++) {
+    	d=Random(2);
+    	if (d==1)
+        	S += String.fromCharCode(65 + Random(26));
+        else
+        	S += String(Random(9));
+    }
+    document.getElementById(elementId).value=S;
+}
+</script>
+
+<inp2:m_DefineElement name="inp_edit_box_generate" is_last="0">
+	<inp2:m_if check="{$prefix}_FieldVisible" field="$field">
+		<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+			<inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" is_last="$is_last"/>
+			<td class="control-cell">
+				<input type="text" name="<inp2:{$prefix}_InputName field='$field'/>" id="<inp2:{$prefix}_InputName field='$field'/>" value="<inp2:{$prefix}_Field field='$field'/>" tabindex="<inp2:m_get param='tab_index'/>" size="<inp2:m_param name='size'/>">
+				<input type="button" class="button" onClick="generateRandomCode('<inp2:{$prefix}_InputName field='$field'/>')" value="<inp2:m_Phrase label='la_GenerateCode' />" />
+			</td>
+			<inp2:m_RenderElement name="inp_edit_error" pass_params="1"/>
+		</tr>
+	</inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="inp_edit_box_comment" is_last="0">
+	<inp2:m_if check="{$prefix}_FieldVisible" field="$field">
+		<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+			<inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" is_last="$is_last"/>
+			<td class="control-cell">
+				<input type="text" name="<inp2:{$prefix}_InputName field='$field'/>" id="<inp2:{$prefix}_InputName field='$field'/>" value="<inp2:{$prefix}_Field field='$field'/>" tabindex="<inp2:m_get param='tab_index'/>" size="<inp2:m_param name='size'/>">
+				<inp2:m_Phrase label="la_comment_LeaveBlank" />
+			</td>
+			<inp2:m_RenderElement name="inp_edit_error" pass_params="1"/>
+		</tr>
+	</inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:coup_SaveWarning name="grid_save_warning"/>
+<inp2:coup_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
+			<inp2:m_RenderElement name="inp_label" prefix="coup" field="CouponId" title="!la_fld_Id!"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="coup" field="Status" title="!la_fld_Status!"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="coup" field="Name" title="!la_fld_Name!" size="35"/>
+			<inp2:m_RenderElement name="inp_edit_box_generate" prefix="coup" field="Code" title="!la_fld_CouponCode!" size="35"/>
+
+			<inp2:m_RenderElement name="inp_edit_date_time" prefix="coup" field="Expiration" title="!la_fld_Expiration!" size="10"/>
+
+			<inp2:m_RenderElement name="inp_edit_options" prefix="coup" field="Type" title="!la_fld_Type!"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="coup" field="Amount" title="!la_fld_Amount!" size="4"/>
+
+			<inp2:m_RenderElement name="inp_label" prefix="coup" field="LastUsedBy" title="!la_fld_LastUsedBy!" size="15"/>
+			<inp2:m_RenderElement name="inp_label" prefix="coup" field="LastUsedOn" title="!la_fld_LastUsedOn!" size="10"/>
+
+			<inp2:m_RenderElement name="inp_edit_box_comment" prefix="coup" field="NumberOfUses" title="!la_fld_NumberOfUses!" size="4"/>
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/discounts/coupon_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/discounts/discount_edit.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/discounts/discount_edit.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/discounts/discount_edit.tpl	(revision 12131)
@@ -0,0 +1,74 @@
+<inp2:adm_SetPopupSize width="870" height="600"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="d" section="in-commerce:discounts" title_preset="discount_edit" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('d','<inp2:d_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('d','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('d', '<inp2:d_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('d', '<inp2:d_NextId/>');
+						}
+				 ) );
+
+				//a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="d_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					//a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="d_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="d_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:d_SaveWarning name="grid_save_warning"/>
+<inp2:d_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
+			<inp2:m_RenderElement name="inp_label" prefix="d" field="DiscountId" title="!la_fld_Id!"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="d" field="Status" title="!la_fld_Status!"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="d" field="Name" title="!la_fld_Name!" size="35"/>
+			<inp2:m_RenderElement name="inp_edit_date_time" prefix="d" field="Start" title="!la_fld_Start!" size="10"/>
+			<inp2:m_RenderElement name="inp_edit_date_time" prefix="d" field="End" title="!la_fld_End!" size="10"/>
+			<inp2:m_RenderElement name="inp_edit_options" prefix="d" field="GroupId" title="!la_fld_Group!"/>
+			<inp2:m_RenderElement name="inp_edit_options" prefix="d" field="Type" title="!la_fld_Type!"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="d" field="Amount" title="!la_fld_Amount!" size="4"/>
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/discounts/discount_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.8.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/discounts/coupon_clone_selector.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/discounts/coupon_clone_selector.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/discounts/coupon_clone_selector.tpl	(revision 12131)
@@ -0,0 +1,72 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="coup" section="in-commerce:coupons" title_preset="coupons_clone"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+	  	<td>
+	  		<script type="text/javascript">
+					a_toolbar = new ToolBar();
+
+	  				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+								submit_event('coup', 'OnApplyClone');
+							}
+						) );
+					a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+								window_close();
+							}
+					 	) );
+
+					a_toolbar.Render();
+			</script>
+
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:coup_SaveWarning name="grid_save_warning"/>
+<inp2:coup_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+			<inp2:m_inc param="tab_index" by="1"/>
+			<td class="label-cell">
+				<label for="clone_items_count"><inp2:m_phrase label="la_EnterNumberOfCopies"/>:</label>
+			</td>
+			<td class="control-mid">&nbsp;</td>
+			<td class="control-cell">
+				<input name="clone_items_count" id="clone_items_count" value="<inp2:coup_LastCloneCount />" size="5">
+			</td>
+		</tr>
+		<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+			<inp2:m_inc param="tab_index" by="1"/>
+			<td class="label-cell">
+				<inp2:m_Phrase label="la_Expiration" />:
+			</td>
+			<td class="control-mid">&nbsp;</td>
+			<td class="control-cell">
+				<input type="text" name="clone_exp_date" id="clone_exp_date" value="<inp2:coup_DefaultExpDate />" datepickerIcon="<inp2:m_ProjectBase/>admin/images/ddarrow.gif" size="9">
+					<span class="small">(mm.dd.yy)</span>
+				<script type="text/javascript">
+					initCalendar("clone_exp_date", "m.d.y");
+				</script>
+				&nbsp;<input type="text" name="clone_exp_time" id="clone_exp_time" value="<inp2:coup_DefaultExpTime />" size="9"><span class="small"> (h:mm:ss AM)</span>
+				<br>
+
+			</td>
+			<inp2:m_RenderElement name="inp_edit_error" prefix="coup" field="Expiration"/>
+		</tr>
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<!-- <inp2:coup_HiddenSelection /> -->
+
+<inp2:m_include t="incs/footer"/>
+
+<script type="text/javascript">
+	set_event('coup', '');
+</script>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/discounts/coupon_clone_selector.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.11.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/discounts/gift_certificate_edit.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/discounts/gift_certificate_edit.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/discounts/gift_certificate_edit.tpl	(revision 12131)
@@ -0,0 +1,171 @@
+<inp2:adm_SetPopupSize width="780" height="640"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="gc" section="in-commerce:gift-certificates" title_preset="gift_certificates_edit"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('gc','<inp2:gc_SaveEvent/>');
+						}
+					) );
+
+
+				a_toolbar.AddButton( new ToolBarButton('in-commerce:save_and_print', '<inp2:m_phrase label="la_ToolTip_SaveAndPrint" escape="1"/>', function() {
+								set_hidden_field('print_certificate', 1);
+								submit_event('gc','<inp2:gc_SaveEvent/>');
+							}
+						) );
+
+
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('gc','OnCancel');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('gc', '<inp2:gc_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('gc', '<inp2:gc_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="gc_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+				<inp2:m_else/>
+					<inp2:m_if check="gc_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="gc_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<script language="JavaScript">
+function Random(N) {
+    return Math.floor(N * (Math.random() % 1));
+}
+
+function generateRandomCode(elementId){
+    var j, S = "", d;
+    for (j = 0; j < 10; j++) {
+    	d=Random(2);
+    	if (d==1)
+        	S += String.fromCharCode(65 + Random(26));
+        else
+        	S += String(Random(9));
+    }
+    document.getElementById(elementId).value=S;
+}
+</script>
+
+<inp2:m_DefineElement name="inp_edit_box_generate" class="" onblur="" maxlength="" is_last="0">
+	<inp2:m_if check="{$prefix}_FieldVisible" field="$field">
+		<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+			<inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" is_last="$is_last"/>
+			<td class="control-cell">
+				<input type="text" name="<inp2:{$prefix}_InputName field='$field'/>" id="<inp2:{$prefix}_InputName field='$field'/>" value="<inp2:{$prefix}_Field field='$field'/>" tabindex="<inp2:m_get param='tab_index'/>" size="<inp2:m_param name='size'/>">
+				<input type="button" class="button" onClick="generateRandomCode('<inp2:{$prefix}_InputName field='$field'/>')" value="<inp2:m_Phrase label='la_GenerateCode' />" />
+			</td>
+			<inp2:m_RenderElement name="inp_edit_error" pass_params="1"/>
+		</tr>
+	</inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:gc_SaveWarning name="grid_save_warning"/>
+<inp2:gc_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
+			<inp2:m_RenderElement name="inp_id_label" prefix="gc" field="GiftCertificateId" title="la_fld_Id"/>
+
+			<inp2:m_if check="gc_HasOrder">
+				<inp2:m_RenderElement name="inp_label" prefix="gc" field="Purchaser" title="!la_fld_SenderName!" size="35"/>
+				<inp2:m_RenderElement name="inp_label" prefix="gc" field="Recipient" title="!la_fld_RecipientName!" size="35"/>
+				<inp2:m_RenderElement name="inp_label" prefix="gc" field="Message" title="!la_fld_MessageText!" cols="35" rows="7"/>
+				<inp2:m_RenderElement name="inp_label" prefix="gc" field="Amount" title="!la_fld_Amount!" size="7"/>
+
+				<inp2:m_RenderElement name="inp_label" prefix="gc" field="SendVia" title="!la_fld_DeliveryMethod!"/>
+			<inp2:m_else/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="Purchaser" title="!la_fld_SenderName!" size="35"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="Recipient" title="!la_fld_RecipientName!" size="35"/>
+				<inp2:m_RenderElement name="inp_edit_textarea" prefix="gc" field="Message" title="!la_fld_MessageText!" cols="35" rows="7"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="Amount" title="!la_fld_Amount!" size="7"/>
+
+				<inp2:m_RenderElement name="inp_edit_radio" prefix="gc" field="SendVia" title="!la_fld_DeliveryMethod!"/>
+			</inp2:m_if>
+
+		<inp2:m_RenderElement name="subsection" title="!la_section_EmailDelivery!"/>
+			<inp2:m_if check="gc_HasOrder">
+				<inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientEmail" title="!la_fld_Email!" size="35"/>
+			<inp2:m_else/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientEmail" title="!la_fld_Email!" size="35"/>
+			</inp2:m_if>
+
+		<inp2:m_RenderElement name="subsection" title="!la_section_PostalDelivery!"/>
+			<inp2:m_if check="gc_HasOrder">
+				<inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientFirstname" title="la_fld_FirstName" size="35"/>
+				<inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientLastname" title="la_fld_LastName" size="35"/>
+				<inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientAddress1" title="la_fld_AddressLine1"/>
+				<inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientAddress2" title="la_fld_AddressLine2"/>
+				<inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientCity" title="la_fld_City"/>
+				<inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientZipcode" title="la_fld_Zip"/>
+				<inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientState" title="la_fld_State"/>
+				<inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientCountry" title="la_fld_Country"/>
+				<inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientPhone" title="la_fld_Phone"/>
+			<inp2:m_else/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientFirstname" title="la_fld_FirstName" size="35"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientLastname" title="la_fld_LastName" size="35"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientAddress1" title="la_fld_AddressLine1"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientAddress2" title="la_fld_AddressLine2"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientCity" title="la_fld_City"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientZipcode" title="la_fld_Zip"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientState" title="la_fld_State"/>
+				<inp2:m_RenderElement name="inp_edit_options" prefix="gc" field="RecipientCountry" title="la_fld_Country"/>
+				<inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientPhone" title="la_fld_Phone"/>
+			</inp2:m_if>
+
+		<inp2:m_RenderElement name="subsection" title="la_section_Properties"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="gc" field="Status" title="!la_fld_Status!"/>
+
+			<inp2:m_if check="gc_HasOrder">
+				<inp2:m_RenderElement name="inp_label" prefix="gc" field="AddDate" title="la_fld_CreatedOn"/>
+				<inp2:m_RenderElement name="inp_label" prefix="gc" field="Code" title="!la_fld_Code!" size="35"/>
+			<inp2:m_else/>
+				<inp2:m_RenderElement name="inp_edit_date_time" prefix="gc" field="AddDate" title="la_fld_CreatedOn"/>
+				<inp2:m_RenderElement name="inp_edit_box_generate" prefix="gc" field="Code" title="!la_fld_Code!" size="35"/>
+			</inp2:m_if>
+
+			<inp2:m_if check="gc_IsNewItem" inverse="inverse">
+				<inp2:m_RenderElement name="inp_label" prefix="gc" field="Debit" title="!la_fld_RemainingAmount!" size="7"/>
+			</inp2:m_if>
+
+			<inp2:m_if check="gc_HasOrder">
+				<inp2:m_RenderElement name="inp_label" prefix="gc" field="Expiration" title="!la_fld_Expiration!" size="10"/>
+			<inp2:m_else/>
+				<inp2:m_RenderElement name="inp_edit_date_time" prefix="gc" field="Expiration" title="!la_fld_Expiration!" size="10"/>
+			</inp2:m_if>
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/discounts/gift_certificate_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.6
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/discounts/coupons_list.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/discounts/coupons_list.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/discounts/coupons_list.tpl	(revision 12131)
@@ -0,0 +1,67 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="coup" section="in-commerce:coupons" title_preset="coupons_list" pagination="1" tabs="in-commerce/discounts/discounts_list_tabs"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+  			//do not rename - this function is used in default grid for double click!
+  			function edit()
+  			{
+  				std_edit_item('coup', 'in-commerce/discounts/coupon_edit');
+  			}
+
+  			var a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('in-commerce:new_discount', '<inp2:m_phrase label="la_ToolTip_New_Coupon" escape="1"/>',
+						function() {
+							std_precreate_item('coup', 'in-commerce/discounts/coupon_edit')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('coup')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone" escape="1"/>',
+							function() {
+								//set_event('sc', 'OnSaveCreated');
+								openSelector('coup', '<inp2:m_t t="in-commerce/discounts/coupon_clone_selector" pass="all"/>', '', '500x260');
+							} ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
+							submit_event('coup','OnMassApprove');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
+							submit_event('coup','OnMassDecline');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="coup" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="coup" IdField="CouponId" grid="Default" menu_filters="yes"/>
+<script type="text/javascript">
+	Grids['coup'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','clone') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/discounts/coupons_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.10.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/discounts/coupon_selector.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/discounts/coupon_selector.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/discounts/coupon_selector.tpl	(revision 12131)
@@ -0,0 +1,47 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="coup" section="in-commerce:coupons" grid="Radio" title_preset="coupon_selector" pagination="1"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+
+  			function edit()
+  			{
+  				//do nothing;
+  			}
+
+  			a_toolbar = new ToolBar();
+
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+						set_hidden_field('selected_ids', Grids['coup'].GetSelected());
+						submit_event('<inp2:m_recall name="main_prefix"/>', 'OnProcessSelected');
+					}
+				) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Close" escape="1"/>', function() {
+							window_close();
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="coup" grid="Radio"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="coup" IdField="CouponId" grid="Radio" menu_filters="yes"/>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/discounts/coupon_selector.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/discounts/coupon_items.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/discounts/coupon_items.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/discounts/coupon_items.tpl	(revision 12131)
@@ -0,0 +1,116 @@
+<inp2:adm_SetPopupSize width="870" height="600"/>
+
+<inp2:m_include t="incs/header"/>
+
+<inp2:m_if check="coupi_IsEntireOrder">
+	<inp2:m_SetParam grid="Default"/>
+<inp2:m_else/>
+	<inp2:m_SetParam grid="CouponItems"/>
+</inp2:m_if>
+
+<inp2:m_RenderElement name="combined_header" prefix="coup" section="in-commerce:coupons" title_preset="coupons_items" grid="$grid" pagination="1" pagination_prefix="coupi" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('coup','<inp2:coup_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('coup','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('coup', '<inp2:coup_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('coup', '<inp2:coup_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Products" escape="1"/>',
+						function() {
+							openSelector('coupi', '<inp2:adm_SelectorLink prefix="coupi" selection_mode="multi" tabs_dependant="no" tab_prefixes="p"/>', '');
+						} ) );
+
+
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('coupi')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('in-commerce:entire_order', '<inp2:m_phrase label="la_ToolTip_EntireOrder" escape="1"/>',
+						function() {
+							if (inpConfirm('<inp2:m_phrase label="la_EntireOrderConfirmation"/>'))
+							{
+								submit_event('coupi', 'OnEntireOrder');
+							}
+						} ) );
+				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="coup_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					//a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="coup_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="coup_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+
+				function edit()
+				{
+					// required for correct row selection
+				}
+
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="coupi" grid="$grid"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_DefineElement name="grid_item_td">
+	<inp2:m_if check="FieldEquals" field="ItemType" value="1">
+		<inp2:Field field="ProductId" no_special="no_special"/>
+	<inp2:m_else/>
+		<inp2:Field field="CategoryId" no_special="no_special"/>
+	</inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="coupi" IdField="CouponItemId" grid="$grid"/>
+
+<script type="text/javascript">
+	<inp2:m_if check="coupi_IsEntireOrder" >
+			a_toolbar.DisableButton('new_item');
+	</inp2:m_if>
+
+	Grids['coupi'].SetDependantToolbarButtons( new Array('delete') );
+</script>
+
+<input type="hidden" name="main_prefix" id="main_prefix" value="coupi">
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/discounts/coupon_items.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.10.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/discounts/discounts_list.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/discounts/discounts_list.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/discounts/discounts_list.tpl	(revision 12131)
@@ -0,0 +1,61 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="d" section="in-commerce:discounts" title_preset="discounts_list" pagination="1" tabs="in-commerce/discounts/discounts_list_tabs"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+  			//do not rename - this function is used in default grid for double click!
+  			function edit()
+  			{
+  				std_edit_item('d', 'in-commerce/discounts/discount_edit');
+  			}
+
+  			var a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('in-commerce:new_discount', '<inp2:m_phrase label="la_ToolTip_New_Discount" escape="1"/>',
+						function() {
+							std_precreate_item('d', 'in-commerce/discounts/discount_edit')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('d')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
+							submit_event('d','OnMassApprove');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
+							submit_event('d','OnMassDecline');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="d" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="d" IdField="DiscountId" grid="Default" menu_filters="yes"/>
+<script type="text/javascript">
+	Grids['d'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/discounts/discounts_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/discounts/gift_certificate_list.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/discounts/gift_certificate_list.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/discounts/gift_certificate_list.tpl	(revision 12131)
@@ -0,0 +1,63 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="gc" section="in-commerce:gift-certificates" title_preset="gift_certificates_list" pagination="1" tabs="in-commerce/discounts/discounts_list_tabs"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+  			//do not rename - this function is used in default grid for double click!
+  			function edit()
+  			{
+  				std_edit_item('gc', 'in-commerce/discounts/gift_certificate_edit');
+  			}
+
+  			var a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('in-commerce:new_discount', '<inp2:m_phrase label="la_ToolTip_NewGiftCertificate" escape="1"/>',
+						function() {
+							std_precreate_item('gc', 'in-commerce/discounts/gift_certificate_edit')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('gc')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('e-mail', '<inp2:m_phrase label="la_ToolTip_SendMail" escape="1"/>', function() {
+						submit_event('gc', 'OnEmailGiftCertificate');
+					}
+				) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="gc" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="gc" IdField="GiftCertificateId" grid="Default" menu_filters="yes"/>
+<script type="text/javascript">
+	Grids['gc'].SetDependantToolbarButtons( new Array('edit','delete','e-mail') );
+
+	addLoadEvent(
+		function() {
+			<inp2:m_if check="m_Recall" name="print_certificate_id">
+				openSelector('gc', '<inp2:gc_PrintLink template="in-commerce/discounts/gift_certificate_print" no_amp="1"/>');
+			</inp2:m_if>
+		}
+	);
+
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/discounts/gift_certificate_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.6
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/discounts/discount_items.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/discounts/discount_items.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/discounts/discount_items.tpl	(revision 12131)
@@ -0,0 +1,116 @@
+<inp2:adm_SetPopupSize width="870" height="600"/>
+
+<inp2:m_include t="incs/header"/>
+
+<inp2:m_if check="di_IsEntireOrder">
+	<inp2:m_SetParam grid="Default"/>
+<inp2:m_else/>
+	<inp2:m_SetParam grid="DiscountItems"/>
+</inp2:m_if>
+
+<inp2:m_RenderElement name="combined_header" prefix="d" section="in-commerce:discounts" title_preset="discount_items" grid="$grid" pagination="1" pagination_prefix="di" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('d','<inp2:d_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('d','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('d', '<inp2:d_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('d', '<inp2:d_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Products" escape="1"/>',
+						function() {
+							openSelector('di', '<inp2:adm_SelectorLink prefix="di" selection_mode="multi" tabs_dependant="no" tab_prefixes="p"/>', '');
+						} ) );
+
+
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('di')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('in-commerce:entire_order', '<inp2:m_phrase label="la_ToolTip_EntireOrder" escape="1"/>',
+						function() {
+							if (inpConfirm('<inp2:m_phrase label="la_EntireOrderConfirmation"/>'))
+							{
+								submit_event('di', 'OnEntireOrder');
+							}
+						} ) );
+				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="d_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					//a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="d_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="d_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+
+				function edit()
+				{
+					// required for correct row selection
+				}
+
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="di" grid="$grid"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_DefineElement name="grid_item_td">
+	<inp2:m_if check="FieldEquals" field="ItemType" value="1">
+		<inp2:Field field="ProductId" no_special="no_special"/>
+	<inp2:m_else/>
+		<inp2:Field field="CategoryId" no_special="no_special"/>
+	</inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="di" IdField="DiscountItemId" grid="$grid"/>
+
+<script type="text/javascript">
+	<inp2:m_if check="di_IsEntireOrder" >
+			a_toolbar.DisableButton('new_item');
+	</inp2:m_if>
+
+	Grids['di'].SetDependantToolbarButtons( new Array('delete') );
+</script>
+
+<input type="hidden" name="main_prefix" id="main_prefix" value="di">
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/discounts/discount_items.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.11.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/discounts/gift_certificate_print.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/discounts/gift_certificate_print.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/discounts/gift_certificate_print.tpl	(revision 12131)
@@ -0,0 +1,49 @@
+<inp2:m_RequireLogin permissions="in-commerce:gift-certificates.view" system="1"/>
+<inp2:m_include t="incs/header" nobody="yes"/>
+
+<script type="text/javascript">
+	set_window_title('Gift Certificate - Print Preview');
+</script>
+
+<inp2:m_NoDebug/>
+<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF" onload="window.print();">
+
+<img src="<inp2:m_TemplatesBase module="custom"/>/img/site_logo.jpg" width="159" height="61" border="0">
+<br/>
+<br/>
+<strong><inp2:m_Phrase label="la_title_GiftCertificates"/></strong>
+
+<br/>
+<br/>
+<inp2:m_Phrase label="la_fld_Amount"/>: <inp2:gc_Field name="Amount"/>
+<br/>
+<inp2:m_Phrase label="la_fld_Id"/>: <inp2:gc_Field name="Code"/>
+<br/>
+<br/>
+<inp2:m_Phrase label="la_fld_MessageText"/>Message: <inp2:gc_Field name="Message"/>
+<br/>
+<br/>
+<strong><inp2:m_Phrase label="la_section_EmailDelivery"/></strong>
+<br/>
+<br/>
+<inp2:m_Phrase label="la_fld_FirstName"/>: <inp2:gc_Field name="RecipientFirstname"/>
+<br/>
+<inp2:m_Phrase label="la_fld_LastName"/>: <inp2:gc_Field name="RecipientLastname"/>
+<br/>
+<inp2:m_Phrase label="la_fld_AddressLine1"/>: <inp2:gc_Field name="RecipientAddress1"/>
+<br/>
+<inp2:m_Phrase label="la_fld_AddressLine2"/>: <inp2:gc_Field name="RecipientAddress2"/>
+<br/>
+<inp2:m_Phrase label="la_fld_City"/>: <inp2:gc_Field name="RecipientCity"/>
+<br/>
+<inp2:m_Phrase label="la_fld_Zip"/>: <inp2:gc_Field name="RecipientZipcode"/>
+<br/>
+<inp2:m_Phrase label="la_fld_State"/>: <inp2:gc_Field name="RecipientState"/>
+<br/>
+<inp2:m_Phrase label="la_fld_Country"/>: <inp2:gc_Field name="RecipientCountry"/>
+<br/>
+<inp2:m_Phrase label="la_fld_Phone"/>: <inp2:gc_Field name="RecipientPhone"/>
+<br/>
+
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/discounts/gift_certificate_print.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.4
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/discounts/discounts_list_tabs.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/discounts/discounts_list_tabs.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/discounts/discounts_list_tabs.tpl	(revision 12131)
@@ -0,0 +1,5 @@
+<inp2:m_DefineElement name="discount_tabs">
+	<inp2:adm_ListTabs render_as="tab_direct" section_name="in-commerce:discounts_folder"/>
+</inp2:m_DefineElement>
+
+<inp2:m_RenderElement name="tabs_container" tabs_render_as="discount_tabs"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/discounts/discounts_list_tabs.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/payment_type/payment_type_edit.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/payment_type/payment_type_edit.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/payment_type/payment_type_edit.tpl	(revision 12131)
@@ -0,0 +1,74 @@
+<inp2:adm_SetPopupSize width="790" height="520"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="pt" section="in-commerce:payment_types" title_preset="payment_type_edit" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('pt','<inp2:pt_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('pt','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('pt', '<inp2:pt_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('pt', '<inp2:pt_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="pt_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="pt_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="pt_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:pt_SaveWarning name="grid_save_warning"/>
+<inp2:pt_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="inp_id_label" prefix="pt" field="PaymentTypeId" title="!la_fld_Id!"/>
+		<inp2:m_RenderElement name="inp_edit_box" prefix="pt" field="Name" title="!la_fld_Name!" size="40"/>
+		<inp2:m_RenderElement name="inp_edit_box" prefix="pt" field="Description" title="!la_fld_Description!" size="40"/>
+		<inp2:m_RenderElement name="inp_edit_textarea" prefix="pt" field="Instructions" title="!la_fld_Instructions!"  cols="40" rows="5"/>
+		<inp2:m_RenderElement name="inp_edit_textarea" prefix="pt" field="AdminComments" title="!la_fld_AdminComments!" cols="40" rows="5"/>
+		<inp2:m_RenderElement name="inp_edit_checkbox" prefix="pt" field="Status" title="!la_fld_Enabled!"/>
+		<inp2:m_RenderElement name="inp_edit_checkbox" prefix="pt" field="PlacedOrdersEdit" title="!la_fld_PlacedOrdersEdit!"/>
+		<inp2:m_RenderElement name="inp_edit_box" prefix="pt" field="Priority" title="!la_fld_Priority!" size="3"/>
+		<inp2:m_RenderElement name="inp_edit_box" prefix="pt" field="ProcessingFee" title="!la_fld_ProcessingFee!" size="4"/>
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/payment_type/payment_type_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.10.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/payment_type/payment_type_groups.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/payment_type/payment_type_groups.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/payment_type/payment_type_groups.tpl	(revision 12131)
@@ -0,0 +1,119 @@
+<inp2:adm_SetPopupSize width="790" height="520"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="pt" section="in-commerce:payment_types" title_preset="group_list" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							document.getElementById('<inp2:pt_InputName field="PortalGroups"/>').value = select_to_string('selected_groups');
+							submit_event('pt','<inp2:pt_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('pt','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('pt', '<inp2:pt_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('pt', '<inp2:pt_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="pt_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="pt_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="pt_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+
+				function go_to_tab(prefix_special, tab)
+				{
+					set_hidden_field(prefix_special+'_GoTab', tab);
+					document.getElementById('<inp2:pt_InputName field="PortalGroups"/>').value = select_to_string('selected_groups');
+					submit_event(prefix_special,'OnPreSaveAndGoToTab',null);
+				}
+
+				function go_to_id(prefix_special, id)
+				{
+					set_hidden_field(prefix_special+'_GoId', id);
+					document.getElementById('<inp2:pt_InputName field="PortalGroups"/>').value = select_to_string('selected_groups');
+				 	submit_event(prefix_special,'OnPreSaveAndGo')
+				}
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:pt_SaveWarning name="grid_save_warning"/>
+<inp2:pt_ErrorWarning name="form_error_warning"/>
+
+<inp2:m_RenderElement name="inp_edit_hidden" prefix="pt" field="PortalGroups" title="!la_fld_Groups!" size="40"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="inp_label" prefix="pt" field="PaymentTypeId" title="!la_fld_Id!"/>
+		<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+			<inp2:m_inc param="tab_index" by="1"/>
+			<td class="label-cell">
+				<inp2:m_phrase label="la_fld_Groups"/>:
+			</td>
+			<td class="control-mid">&nbsp;</td>
+			<td class="control-cell">
+				<table style="width: 300px">
+					<tr>
+						<td>
+							<inp2:m_DefineElement name="group_option">
+								<option value="<inp2:m_param name="GroupId"/>"><inp2:m_param name="Name"/></option>
+							</inp2:m_DefineElement>
+
+							<inp2:m_phrase label="la_fld_SelectedGroups"/>
+
+							<select id="selected_groups" name="selected_groups[]" multiple="multiple" size="20" style="width: 200px">
+								<inp2:pt_ListGroups mode="selected" render_as="group_option"/>
+							</select>
+						</td>
+						<td align="center">
+							<input type="button" value="&nbsp;&laquo;&laquo;&nbsp;" onclick="move_selected('available_groups', 'selected_groups'); select_sort('selected_groups')" class="button"><br>
+							<img src="img/s.gif" width="1" height="4" alt=""><br>
+							<input type="button" value="&nbsp;&raquo;&raquo;&nbsp;" onclick="move_selected('selected_groups', 'available_groups'); select_sort('available_groups');" class="button">
+						</td>
+						<td>
+							<inp2:m_phrase label="la_fld_AvailableGroups"/>
+
+							<select id="available_groups" name="available_groups[]" multiple="multiple" size="20" style="width: 200px">
+								<inp2:pt_ListGroups render_as="group_option"/>
+							</select>
+						</td>
+					</tr>
+				</table>
+			</td>
+		</tr>
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/payment_type/payment_type_groups.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/payment_type/payment_type_gateway.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/payment_type/payment_type_gateway.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/payment_type/payment_type_gateway.tpl	(revision 12131)
@@ -0,0 +1,136 @@
+<inp2:adm_SetPopupSize width="790" height="520"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="pt" section="in-commerce:payment_types" title_preset="gateway" tab_preset="Default"/>
+
+<inp2:m_DefineElement name="GatewayFieldsDiv">
+	<inp2:m_RenderElement name="grid_data_td" />
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="dummy">
+</inp2:m_DefineElement>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('pt','<inp2:pt_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('pt','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('pt', '<inp2:pt_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('pt', '<inp2:pt_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="pt_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="pt_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="pt_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<script type="text/javascript">
+
+function refresh_fields() {
+	var $dropdown=document.getElementById('pt[<inp2:m_get name="pt_id" />][GatewayId]');
+	var $table=document.getElementById('gateway_fields');
+	var $display_style='';
+	var $i=0;
+
+
+	if (is.gecko || !is.ie) {
+		on_style = 'table-row';
+	}
+	else {
+		on_style = 'block';
+	}
+
+	while($i<$table.rows.length)
+	{
+		$row=$table.rows[$i];
+		if( isset($row.getAttribute('GatewayId')) )
+		{
+			$display_style=($row.getAttribute('GatewayId') == $dropdown.options[$dropdown.selectedIndex].value) ? on_style : 'none';
+//			alert('current display is '+$row.style.display+' setting it to '+$display_style);
+			$row.style.display = $display_style;
+//			alert('set');
+		}
+		$i++;
+	}
+}
+
+</script>
+
+<inp2:m_DefineElement name="gw_input_text">
+	<input type="text" name="<inp2:gwf_InputName field="Value"/>" id="<inp2:gwf_InputName field="Value"/>" value="<inp2:gwf_gwConfigValue/>" tabindex="<inp2:m_get param="tab_index"/>">
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="gw_input_select">
+	<select tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:gwf_InputName field="Value"/>" id="<inp2:gwf_InputName field="Value"/>">
+		<inp2:PredefinedOptions field="Value" block="inp_option_phrase" selected="selected"/>
+	</select>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="gw_input_checkbox">
+	<input type="hidden" id="<inp2:gwf_InputName field="Value"/>" name="<inp2:gwf_InputName field="Value"/>" value="<inp2:gwf_gwConfigValue/>">
+	<input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="_cb_<inp2:gwf_InputName field="Value"/>" name="_cb_<inp2:gwf_InputName field="Value"/>" <inp2:gwf_gwConfigValue checked="checked"/> class="<inp2:m_param name="class"/>" onchange="update_checkbox(this, document.getElementById('<inp2:gwf_InputName field="Value"/>'));">
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="gateway_field">
+	<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>" GatewayId="<inp2:m_param name="gateway_id"/>" style="display: <inp2:m_param name="display"/>;">
+		<inp2:m_inc param="tab_index" by="1"/>
+		<td class="label-cell">
+			<inp2:gwf_Field field="FieldName"/>:
+		</td>
+		<td class="control-mid">&nbsp;</td>
+		<td class="control-cell">
+			<inp2:m_RenderElement name="$input_block" pass_params="true"/>
+		</td>
+	</tr>
+</inp2:m_DefineElement>
+
+<inp2:gwf_initGWConfigValues/>
+
+<inp2:pt_SaveWarning name="grid_save_warning"/>
+<inp2:pt_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form" id="gateway_fields">
+		<inp2:m_RenderElement name="inp_edit_options" prefix="pt" field="GatewayId" title="!la_fld_Gateway!" onchange="refresh_fields()"/>
+		<inp2:gwf_PrintList block="gateway_field" input_block_prefix="gw_input_" per_page="-1"/>
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/payment_type/payment_type_gateway.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.11.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/payment_type/payment_type_currencies.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/payment_type/payment_type_currencies.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/payment_type/payment_type_currencies.tpl	(revision 12131)
@@ -0,0 +1,83 @@
+<inp2:adm_SetPopupSize width="790" height="520"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="pt" section="in-commerce:payment_types" title_preset="payment_currencies_edit" tab_preset="Default"/>
+
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+							submit_event('pt','<inp2:pt_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('pt','OnCancel');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('pt', '<inp2:pt_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('pt', '<inp2:pt_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="pt_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+					a_toolbar.HideButton('sep2');
+				<inp2:m_else/>
+					<inp2:m_if check="pt_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="pt_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_DefineElement name="currency_option">
+	<option value="<inp2:curr.active_field field="CurrencyId" />" <inp2:m_if check="ptc.active_CurrencySelected"  >selected</inp2:m_if>>
+		<inp2:curr.active_field field="ISO" /> / <inp2:curr.active_phrasefield field="Name" />
+	</option>
+</inp2:m_DefineElement>
+
+
+<inp2:pt_SaveWarning name="grid_save_warning"/>
+<inp2:pt_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+			<inp2:m_inc param="tab_index" by="1"/>
+			<td class="label-cell">
+				<inp2:m_phrase label="la_fld_PaymentTypeCurrencies" />:
+			</td>
+			<td class="control-mid">&nbsp;</td>
+			<td class="control-cell">
+				<select multiple name="currency_list[]">
+					<inp2:curr.active_PrintList block="currency_option" />
+				</select>
+			</td>
+		</tr>
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/payment_type/payment_type_currencies.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/payment_type/payment_type_list.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/payment_type/payment_type_list.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/payment_type/payment_type_list.tpl	(revision 12131)
@@ -0,0 +1,104 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="pt" section="in-commerce:payment_types" title_preset="payment_type_list" pagination="1"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+  			//do not rename - this function is used in default grid for double click!
+  			function edit()
+  			{
+  				std_edit_item('pt', 'in-commerce/payment_type/payment_type_edit');
+  			}
+
+  			var a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('in-commerce:new_paymenttype', '<inp2:m_phrase label="la_ToolTip_NewPaymentType" escape="1"/>',
+						function() {
+							std_precreate_item('pt', 'in-commerce/payment_type/payment_type_edit')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+						function() {
+							std_delete_items('pt')
+						} ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('primary_paymenttype', '<inp2:m_phrase label="la_ToolTip_setPrimary" escape="1"/>', function() {
+							submit_event('pt','OnSetPrimary');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
+							submit_event('pt','OnMassApprove');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
+							submit_event('pt','OnMassDecline');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+				a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
+							submit_event('pt','OnMassMoveUp');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
+							submit_event('pt','OnMassMoveDown');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="pt" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_DefineElement name="payment_caption_td">
+	<inp2:Field field="$field" grid="$grid"/>
+	<span class="priority"><inp2:m_if check="FieldEquals" field="Priority" value="0"><inp2:m_else/><sup><inp2:Field field="Priority" /></sup></inp2:m_if></span>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="primary_type_delete_error">
+	<script type="text/javascript">
+		alert('<inp2:m_Phrase label="la_error_CannotDeletePaymentType"/>');
+	</script>
+</inp2:m_DefineElement>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="pt" IdField="PaymentTypeId" grid="Default" menu_filters="yes"/>
+<script type="text/javascript">
+	Grids['pt'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','primary_paymenttype') );
+
+</script>
+
+<inp2:m_DefineElement name="remove_unused_warning">
+	<input type="hidden" name="unused_ids" id="unused_ids" value="<inp2:m_param name="unused_ids" />">
+	<script type="text/javascript">
+		if(inpConfirm('<inp2:m_phrase label="la_WarningCurrenciesNotUsed" />: <inp2:m_param name="unused_iso" />. <inp2:m_phrase label="la_WarningRemoveUnusedCurrencies" />?'))
+		{
+			submit_event('curr', 'OnDisableUnused');
+		}
+	</script>
+</inp2:m_DefineElement>
+
+<inp2:curr_DisableUnusedWarning block="remove_unused_warning" />
+
+<inp2:pt_DeleteError block="primary_type_delete_error"/>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/payment_type/payment_type_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_products.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_products.gif
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_list_summary_logs.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_list_summary_logs.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.4.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_summary_logs.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_summary_logs.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.4.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_summary_logs.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_summary_logs.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.4.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_orders.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_orders.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_payment_types.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_payment_types.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_currencies.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_currencies.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_products.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_products.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_affiliates.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_affiliates.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_download_log.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_download_log.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_discounts.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_discounts.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_affiliate_plans.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_affiliate_plans.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_affiliate_payment_types.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_affiliate_payment_types.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_payment_log.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_payment_log.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_manufacturers.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_manufacturers.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_shipping.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_shipping.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_taxes.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_taxes.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_list_orders.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_list_orders.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_list_in-commerce.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_list_in-commerce.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_list_currencies.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_list_currencies.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_list_affiliates.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_list_affiliates.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_list_download_log.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_list_download_log.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_list_payment_log.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_list_payment_log.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_list_manufacturers.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_list_manufacturers.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_list_visits.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_list_visits.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_list_taxes.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_list_taxes.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_list_settings_contacts.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_list_settings_contacts.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_list_payment_types.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_list_payment_types.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_in-commerce.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_in-commerce.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_list_discounts.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_list_discounts.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_list_shipping.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon46_list_shipping.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_in-commerce.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_in-commerce.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_orders.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_orders.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_settings_contacts.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_settings_contacts.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_payment_types.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_payment_types.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_currencies.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_currencies.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_affiliates.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_affiliates.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_download_log.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_download_log.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_discounts.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_discounts.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_payment_log.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_payment_log.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_manufacturers.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_manufacturers.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_visits.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_visits.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_shipping.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_shipping.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_taxes.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/icons/icon24_taxes.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/list_horiz_propagate.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/list_horiz_propagate.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/list_vertic_propagate.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/list_vertic_propagate.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_new_paymenttype_f2.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_new_paymenttype_f2.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_new_paymenttype_f3.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_new_paymenttype_f3.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_new_paymenttype.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_new_paymenttype.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_view_chart_f2.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_view_chart_f2.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.4.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_view_chart.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_view_chart.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.4.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_save_and_print_f2.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_save_and_print_f2.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.2
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_save_and_print.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_save_and_print.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.2
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_pay_out.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_pay_out.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_pay_out_f2.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_pay_out_f2.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_entire_order.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_entire_order.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_primary_pricing_f2.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_primary_pricing_f2.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_primary_pricing_f3.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_primary_pricing_f3.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_new_pricing_f2.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_new_pricing_f2.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_primary_pricing.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_primary_pricing.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_new_pricing.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_new_pricing.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_entire_order_f2.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_entire_order_f2.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_place_order.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_place_order.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_archive.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_archive.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_place_order_f2.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_place_order_f2.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_place_order_f3.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_place_order_f3.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_archive_f2.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_archive_f2.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_archive_f3.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_archive_f3.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_verify.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_verify.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_verify_f2.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_verify_f2.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_verify_f3.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_verify_f3.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_new_discount.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_new_discount.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_new_discount_f2.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/toolbar/tool_new_discount_f2.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/no_picture_list.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/no_picture_list.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_relation_one-way.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_relation_one-way.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_relation_reciprocal.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_relation_reciprocal.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_relation_one-way_disabled.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_relation_one-way_disabled.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_relation_reciprocal_disabled.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_relation_reciprocal_disabled.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_discount_pending.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_discount_pending.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_currency_primary.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_currency_primary.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_orders.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_orders.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_plan.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_plan.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_orders_pending.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_orders_pending.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_manuf.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_manuf.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon_payment__pending.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon_payment__pending.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_custom.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_custom.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_discount_disabled.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_discount_disabled.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_product.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_product.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_payment_primary.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_payment_primary.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_payment.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_payment.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_payment_type.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_payment_type.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_product_pending.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_product_pending.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_plan_disabled.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_plan_disabled.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_orders_disabled.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_orders_disabled.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_pending.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_pending.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_currency.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_currency.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_tax.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_tax.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_pricing_primary.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_pricing_primary.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_plan_primary.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_plan_primary.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_payment_disabled.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_payment_disabled.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_product_disabled.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_product_disabled.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_shipping_disabled.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_shipping_disabled.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_payment_type_disabled.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_payment_type_disabled.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_disabled.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_disabled.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_payment.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_payment.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_entire_order.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_entire_order.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_currency_disabled.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_currency_disabled.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_shipping.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_shipping.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_payment_type_primary.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_payment_type_primary.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_discount.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_discount.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_pricing.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/itemicons/icon16_pricing.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/img/logo_bg.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/admin_templates/img/logo_bg.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/user_item_tab.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/user_item_tab.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/user_item_tab.tpl	(revision 12131)
@@ -0,0 +1,43 @@
+<inp2:m_RequireLogin permissions="in-portal:user_list.view" system="1"/>
+<inp2:m_DefaultParam title_property=""/>
+<inp2:m_DefineElement name="catalog_tab">
+	<inp2:m_if check="m_ParamEquals" name="tab_init" value="" inverse="inverse">
+		<inp2:m_if check="m_ParamEquals" name="tab_init" value="1">
+			<div id="products_div" prefix="<inp2:m_param name="prefix"/>" view_template="in-commerce/user_item_tab" edit_template="in-commerce/products/products_edit" dep_buttons="new_product" category_id="-1" class="catalog-tab"><!-- IE minimal height problem fix --></div>
+			<script type="text/javascript">$Catalog.registerTab('products');</script>
+		</inp2:m_if>
+		<inp2:m_if check="m_ParamEquals" name="tab_init" value="2">
+			<inp2:adm_CatalogTab render_as="item_tab" prefix="$prefix" title_property="$title_property"/>
+		</inp2:m_if>
+	<inp2:m_else/>
+		<inp2:m_include t="incs/blocks"/>
+		<inp2:m_include t="incs/in-portal"/>
+		<inp2:m_include t="categories/ci_blocks"/>
+		<inp2:$prefix_InitList grid="$grid_name"/>
+
+		$Catalog.setItemCount('<inp2:m_param name="prefix"/>', '<inp2:{$prefix}_CatalogItemCount/>');
+		$Catalog.setCurrentCategory('<inp2:m_param name="prefix"/>', <inp2:m_get name="m_cat_id"/>);
+		$Catalog.saveSearch('<inp2:m_Param name="prefix"/>', '<inp2:$prefix_SearchKeyword js_escape="1"/>', '<inp2:m_Param name="grid_name"/>');
+
+		<inp2:m_DefineElement name="qty_td">
+			<inp2:Field field="QtyInStock" grid="$grid"/>/<inp2:Field field="QtyReserved" grid="$grid"/>
+		</inp2:m_DefineElement>
+
+		<inp2:m_RenderElement name="grid_js" PrefixSpecial="$prefix" IdField="ProductId" grid="$grid_name" menu_filters="yes"/>
+
+		Grids['<inp2:m_param name="prefix"/>'].SetDependantToolbarButtons( new Array('edit','delete'));
+		$Catalog.setViewMenu('<inp2:m_param name="prefix"/>');
+		#separator#
+		<!-- products tab: begin -->
+		<inp2:m_RenderElement name="kernel_form" form_name="products_form"/>
+			<inp2:m_RenderElement name="grid" ajax="1" PrefixSpecial="$prefix" IdField="ProductId" grid="$grid_name" menu_filters="yes"/>
+		<inp2:m_RenderElement name="kernel_form_end"/>
+		<!-- products tab: end -->
+	</inp2:m_if>
+</inp2:m_DefineElement>
+
+<!--## <inp2:p_InitCatalogTab render_as="catalog_tab" default_grid="Default" radio_grid="Radio"/> ##-->
+
+<inp2:m_if check="m_Param" name="tab_init">
+	<inp2:m_include template="in-commerce/user_order_item_tab" tab_init="$tab_init" title_property="$title_property"/>
+</inp2:m_if>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/user_item_tab.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.7
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/catalog_tab.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/catalog_tab.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/catalog_tab.tpl	(revision 12131)
@@ -0,0 +1,102 @@
+<inp2:m_RequireLogin permissions="in-portal:browse.view" system="1"/>
+<inp2:m_DefineElement name="catalog_tab">
+	<inp2:m_if check="m_ParamEquals" name="tab_init" value="" inverse="inverse">
+		<inp2:m_if check="m_ParamEquals" name="tab_init" value="1">
+			function createProductMenu() {
+				prod_menu = menuMgr.createMenu(rs('new_prod_menu'));
+				prod_menu.applyBorder(false, false, false, false);
+				prod_menu.dropShadow("none");
+				prod_menu.showIcon = true;
+
+				<inp2:m_DefineElement name="product_type_elem">
+					prod_menu.addItem(rs('product.type.<inp2:m_param name="key"/>'),'<inp2:m_phrase name="$option" escape="1"/>','javascript:new_product(<inp2:m_param name="key"/>);');
+				</inp2:m_DefineElement>
+				<inp2:{$prefix}_PredefinedOptions selected="selected" field="Type" block="product_type_elem" skip_autoload="true"/>
+			}
+
+			a_toolbar.AddButton(
+				new ToolBarButton(
+					'new_item',
+					'<inp2:m_phrase label="la_ToolTip_NewProduct" escape="1"/>::<inp2:m_phrase label="la_ToolTip_NewProduct" escape="1"/>',
+					function() {
+						renderMenus();
+						nls_showMenu(rs('new_prod_menu'), a_toolbar.GetButtonImage('new_item'));
+					},
+					true
+		 		)
+		 	);
+
+			function new_product($type) {
+				$form_name = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'tab_id') + '_form';
+				set_hidden_field('<inp2:m_param name="prefix"/>_new_type', $type);
+
+				<inp2:m_if check="m_Get" name="t" equals_to="catalog/catalog">
+					std_precreate_item($Catalog.ActivePrefix, $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'edit_template'));
+				<inp2:m_else/>
+					var $kf = document.getElementById($form_name);
+
+					var $prev_action = $kf.action;
+					$kf.action = '<inp2:m_t pass="all" no_pass_through="1"/>';
+
+					set_hidden_field('remove_specials[' + $Catalog.ActivePrefix + ']', 1);
+					std_precreate_item(
+						$Catalog.ActivePrefix, $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'edit_template'),
+						function() {
+							$kf.action = $prev_action;
+						}
+					);
+				</inp2:m_if>
+			}
+
+			createProductMenu();
+		</inp2:m_if>
+
+		<inp2:m_if check="m_ParamEquals" name="tab_init" value="2">
+			<div id="products_div" prefix="<inp2:m_param name="prefix"/>" view_template="in-commerce/catalog_tab" edit_template="in-commerce/products/products_edit" category_id="-1" dep_buttons="new_item" class="catalog-tab"><!-- IE minimal height problem fix --></div>
+			<script type="text/javascript">$Catalog.registerTab('products');</script>
+		</inp2:m_if>
+
+		<inp2:m_if check="m_ParamEquals" name="tab_init" value="3">
+			$Catalog.setItemCount('<inp2:m_Param name="prefix"/>', '<inp2:{$prefix}_CatalogItemCount grid="$grid_name"/>');
+		</inp2:m_if>
+	<inp2:m_else/>
+		<inp2:lang.current_Field name="Charset" result_to_var="charset"/>
+		<inp2:m_Header data="Content-type: text/plain; charset=$charset"/>
+		<inp2:m_include t="incs/blocks"/>
+		<inp2:m_include t="incs/in-portal"/>
+		<inp2:m_include t="categories/ci_blocks"/>
+		<inp2:$prefix_InitList grid="$grid_name"/>
+
+		$Catalog.setItemCount('<inp2:m_param name="prefix"/>', '<inp2:{$prefix}_CatalogItemCount/>');
+		$Catalog.setCurrentCategory('<inp2:m_param name="prefix"/>', <inp2:m_get name="m_cat_id"/>);
+		$Catalog.saveSearch('<inp2:m_Param name="prefix"/>', '<inp2:$prefix_SearchKeyword no_special="1" js_escape="1"/>', '<inp2:m_Param name="grid_name"/>');
+
+		<inp2:m_DefineElement name="qty_td">
+			<inp2:Field field="QtyInStock" grid="$grid"/>/<inp2:Field field="QtyReserved" grid="$grid"/>
+		</inp2:m_DefineElement>
+
+		<inp2:m_include template="in-auction/inc/grid_blocks" is_silent="1"/>
+
+		<inp2:m_RenderElement name="grid_js" PrefixSpecial="$prefix" IdField="ProductId" grid="$grid_name" menu_filters="yes"/>
+		<inp2:m_RenderElement name="grid_search_buttons" PrefixSpecial="$prefix" grid="$grid_name" ajax="1"/>
+
+		<inp2:m_if check="m_ParamEquals" name="tab_dependant" value="yes">
+			Grids['<inp2:m_param name="prefix"/>'].AddAlternativeGrid('<inp2:m_param name="cat_prefix"/>', true);
+		</inp2:m_if>
+		Grids['<inp2:m_param name="prefix"/>'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','sep3','cut','copy','move_up','move_down','sep6'));
+		$Catalog.reflectPasteButton(<inp2:c_HasClipboard/>);
+		$Catalog.setViewMenu('<inp2:m_param name="prefix"/>');
+		<inp2:m_if check="m_ParamEquals" name="tab_mode" value="single">
+			Grids['<inp2:m_param name="prefix"/>'].DblClick = function() {return false};
+		</inp2:m_if>
+		#separator#
+		<!-- products tab: begin -->
+		<inp2:m_RenderElement name="kernel_form" form_name="products_form"/>
+			<input type="hidden" name="<inp2:m_param name="prefix"/>_new_type" id="<inp2:m_param name="prefix"/>_new_type" value="">
+			<inp2:m_RenderElement name="grid" ajax="1" PrefixSpecial="$prefix" IdField="ProductId" grid="$grid_name" menu_filters="yes"/>
+		<inp2:m_RenderElement name="kernel_form_end"/>
+		<!-- products tab: end -->
+	</inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:p_InitCatalogTab render_as="catalog_tab" default_grid="Default" radio_grid="Radio"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/catalog_tab.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.24.2.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/user_order_item_tab.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/user_order_item_tab.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/user_order_item_tab.tpl	(revision 12131)
@@ -0,0 +1,36 @@
+<inp2:m_RequireLogin permissions="in-portal:user_list.view" system="1"/>
+<inp2:m_DefineElement name="order_catalog_tab">
+	<inp2:m_if check="m_ParamEquals" name="tab_init" value="" inverse="inverse">
+		<inp2:m_if check="m_ParamEquals" name="tab_init" value="1">
+			<div id="orders_div" prefix="<inp2:m_param name="prefix"/>" view_template="in-commerce/user_order_item_tab" edit_template="in-commerce/orders/orders_edit" dep_buttons="new_order" category_id="-1" class="catalog-tab"><!-- IE minimal height problem fix --></div>
+			<script type="text/javascript">$Catalog.registerTab('orders');</script>
+		</inp2:m_if>
+		<inp2:m_if check="m_ParamEquals" name="tab_init" value="2">
+			<inp2:adm_CatalogTab render_as="item_tab" prefix="$prefix" title_property="$title_property"/>
+		</inp2:m_if>
+	<inp2:m_else/>
+		<inp2:m_include t="incs/blocks"/>
+		<inp2:m_include t="incs/in-portal"/>
+		<inp2:m_include t="categories/ci_blocks"/>
+		<inp2:m_include template="in-commerce/orders/order_blocks"/>
+
+		<inp2:$prefix_InitList grid="$grid_name"/>
+
+		$Catalog.setItemCount('<inp2:m_param name="prefix"/>', '<inp2:{$prefix}_TotalRecords/>');
+		$Catalog.setCurrentCategory('<inp2:m_param name="prefix"/>', <inp2:m_get name="m_cat_id"/>);
+		$Catalog.saveSearch('<inp2:m_Param name="prefix"/>', '<inp2:$prefix_SearchKeyword js_escape="1"/>', '<inp2:m_Param name="grid_name"/>');
+
+		<inp2:m_RenderElement name="grid_js" PrefixSpecial="$prefix" IdField="OrderId" grid="$grid_name" menu_filters="yes"/>
+
+		Grids['<inp2:m_param name="prefix"/>'].SetDependantToolbarButtons( new Array('edit','delete'));
+		$Catalog.setViewMenu('<inp2:m_param name="prefix"/>');
+		#separator#
+		<!-- orders tab: begin -->
+		<inp2:m_RenderElement name="kernel_form" form_name="orders_form"/>
+			<inp2:m_RenderElement name="grid" ajax="1" PrefixSpecial="$prefix" IdField="OrderId" grid="$grid_name" menu_filters="yes"/>
+		<inp2:m_RenderElement name="kernel_form_end"/>
+		<!-- orders tab: end -->
+	</inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:ord_InitCatalogTab render_as="order_catalog_tab" default_grid="Search" radio_grid="Radio"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/user_order_item_tab.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.6
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/visits/visits_list_incommerce.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/visits/visits_list_incommerce.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/visits/visits_list_incommerce.tpl	(revision 12131)
@@ -0,0 +1,71 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="visits.incommerce" section="in-portal:visits" grid="visitsincommerce" title_preset="visits.incommerce_list" pagination="1"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+
+				function edit()
+	  			{
+
+	  			}
+
+				a_toolbar.AddButton( new ToolBarButton('refresh', '<inp2:m_phrase label="la_ToolTip_Refresh" escape="1"/>', function() {
+							window.location.href = window.location.href;
+						}
+				) );
+
+				a_toolbar.AddButton( new ToolBarButton('reset', '<inp2:m_phrase label="la_ToolTip_Reset" escape="1"/>', function() {
+							std_delete_items('visits.incommerce');
+						}
+				) );
+
+				a_toolbar.AddButton( new ToolBarButton('export', '<inp2:m_phrase label="la_ToolTip_Export" escape="1"/>', function() {
+							std_csv_export('visits.incommerce', 'visitsincommerce', 'export/export_progress');
+						}
+				) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+			</script>
+
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="visits.incommerce" grid="visitsincommerce"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_DefineElement name="grid_userlink_td">
+	<inp2:m_if check="UserFound" user_field="$user_field">
+		<a href="<inp2:UserLink edit_template='users/users_edit' user_field="$user_field"/>" onclick="return direct_edit('<inp2:m_Param name="PrefixSpecial"/>', this.href);" title="<inp2:m_phrase name="la_Edit_User"/>"><inp2:Field field="$field" grid="$grid"/></a>
+	<inp2:m_else/>
+		<inp2:Field field="$field" grid="$grid"/>
+	</inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="grid_referer_td">
+	<div style="overflow: hidden;">
+		<inp2:m_if check="FieldEquals" field="$field" value="">
+			<span style="white-space: nowrap;"><inp2:m_Phrase label="la_visit_DirectReferer"/></span>
+		<inp2:m_else/>
+			<a href="<inp2:Field field="$field" grid="$grid"/>"><inp2:Field field="$field" grid="$grid" /></a>
+		</inp2:m_if>
+	</div>
+</inp2:m_DefineElement>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="visits.incommerce" IdField="VisitId" grid="visitsincommerce" grid_filters="1"/>
+<script type="text/javascript">
+	Grids['visits.incommerce'].SetDependantToolbarButtons( new Array('reset') );
+</script>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/visits/visits_list_incommerce.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.18.2.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/import.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/import.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/import.tpl	(revision 12131)
@@ -0,0 +1,232 @@
+<inp2:adm_SetPopupSize width="780" height="670"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:p.import_PresetFormFields/>
+<inp2:m_RenderElement name="combined_header" prefix="adm" section="in-portal:main_import" title_preset="import"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+
+						document.getElementById('export_columns').value = select_to_string('<inp2:p.import_InputName field="ExportColumns"/>');
+						submit_event('p.import','OnExportBegin');
+
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('p.import','OnGoBack');
+						}
+				 ) );
+
+				a_toolbar.Render();
+
+				function check_radio($id)
+				{
+					document.getElementById($id).checked = true;
+				}
+
+				// gets value of checked radio button
+				function get_checked($field_name) {
+					var $ret = false;
+					var $fields = document.getElementsByName($field_name);
+
+					for(var $i = 0; $i < $fields.length; $i++) {
+						if ($fields[$i].checked) {
+							$ret = $fields[$i].value;
+							break;
+						}
+					}
+					return $ret;
+				}
+
+				// enable/disable form fields based on other field values
+				function reflectFormFields()
+				{
+					var $auto_fields = get_checked('<inp2:p.import_InputName field="FieldTitles"/>') == 1 ? true : false;
+
+					if ($auto_fields) {
+						document.getElementById('_cb_<inp2:p.import_InputName field="SkipFirstRow"/>').checked = true;
+					}
+					document.getElementById('_cb_<inp2:p.import_InputName field="SkipFirstRow"/>').onchange();
+					document.getElementById('<inp2:p.import_InputName field="ExportColumns"/>').disabled = $auto_fields;
+					document.getElementById('<inp2:p.import_InputName field="AvailableColumns"/>').disabled = $auto_fields;
+
+					var $btn = null;
+					var $btns = Array('up', 'down', 'left', 'right');
+					var $i = 0;
+					while ($i < $btns.length) {
+						$btn = document.getElementById('btn_move_'+$btns[$i]);
+						$btn.disabled = $auto_fields;
+						$btn.className = $auto_fields ? 'button-disabled' : 'button';
+						$i++;
+					}
+				}
+
+				Application.setHook('p.import:OnBeforeOpenSelector',
+					function() {
+						document.getElementById('export_columns').value = select_to_string('<inp2:p.import_InputName field="ExportColumns"/>');
+					}
+				);
+
+				$(document).ready(
+					function() {
+						$('#step_number').text(3);
+					}
+				);
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+
+<inp2:p.import_SaveWarning name="grid_save_warning"/>
+<inp2:p.import_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
+
+			<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+				<inp2:m_RenderElement name="inp_edit_field_caption" prefix="p.import" field="ImportSource" title="la_fld_ImportFilename"/>
+				<td class="control-cell">
+					<table border="0">
+						<tr>
+							<td>
+								<input type="radio" name="<inp2:p.import_InputName field="ImportSource"/>" id="<inp2:p.import_InputName field="ImportSource"/>_1"<inp2:m_if check="p.import_FieldEquals" field="ImportSource" value="1"> checked</inp2:m_if> value="1" />
+							</td>
+							<td>
+								<label for="<inp2:p.import_InputName field="ImportSource"/>_1">upload</label>
+							</td>
+							<td>
+								<input type="file" name="<inp2:p.import_InputName field="ImportFilename"/>" id="<inp2:p.import_InputName field="ImportFilename"/>" onclick="check_radio('<inp2:p.import_InputName field="ImportSource"/>_1');">
+							</td>
+						</tr>
+
+						<tr>
+							<td>
+								<input type="radio" name="<inp2:p.import_InputName field="ImportSource"/>" id="<inp2:p.import_InputName field="ImportSource"/>_2"<inp2:m_if check="p.import_FieldEquals" field="ImportSource" value="2"> checked</inp2:m_if> value="2" />
+							</td>
+							<td>
+								<label for="<inp2:p.import_InputName field="ImportSource"/>_2">select</label>
+							</td>
+							<td>
+								<select name="<inp2:p.import_InputName field="ImportLocalFilename"/>" onclick="check_radio('<inp2:p.import_InputName field="ImportSource"/>_2');">
+									<inp2:p.import_PredefinedOptions field="ImportLocalFilename" block="inp_option_item" selected="selected"/>
+								</select>
+							</td>
+						</tr>
+
+					</table>
+				</td>
+				<inp2:m_RenderElement name="inp_edit_error" prefix="p.import" field="ImportSource"/>
+			</tr>
+
+			<inp2:m_RenderElement name="inp_edit_box" prefix="p.import" field="FieldsSeparatedBy" title="la_fld_FieldsSeparatedBy" size="2" maxlength="1"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="p.import" field="FieldsEnclosedBy" title="la_fld_FieldsEnclosedBy" size="2" maxlength="1"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="p.import" field="LineEndings" title="la_fld_LineEndings" use_phrases="0"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="p.import" field="SkipFirstRow" title="la_fld_SkipFirstRow"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="p.import" field="FieldTitles" title="la_fld_FieldTitles" onclick="reflectFormFields();"/>
+
+			<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+				<inp2:m_RenderElement name="inp_edit_field_caption" prefix="p.import" field="ExportColumns" title="la_fld_ExportColumns"/>
+				<td class="control-cell">
+					<table cellpadding="0" cellspacing="0" border="0">
+						<tr>
+							<td>
+								<input type="button" value="<inp2:m_phrase name="la_btn_Up"/>" id="btn_move_up" onclick="move_options_up('<inp2:p.import_InputName field="ExportColumns"/>', 1)" class="button">
+								<input type="button" value="<inp2:m_phrase name="la_btn_Down"/>" id="btn_move_down" onclick="move_options_down('<inp2:p.import_InputName field="ExportColumns"/>', 1)" class="button"><br />
+								<img src="img/spacer.gif" width="1" height="5" alt=""><br />
+							</td>
+							<td><img src="img/spacer.gif" width="45" height="1" alt=""><br></td>
+							<td><inp2:m_phrase name="la_fld_AvailableColumns"/>:</td>
+						</tr>
+						<tr>
+							<td>
+								<select multiple id="<inp2:p.import_InputName field="ExportColumns"/>" size="15" style="width: 225px;">
+									<inp2:p.import_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/>
+								</select>
+								<input type="hidden" id="export_columns" name="<inp2:p.import_InputName field="ExportColumns"/>" value="<inp2:p.import_Field field="ExportColumns"/>" />
+							</td>
+							<td align="center">
+								<input type="button" value="&nbsp;&laquo;&laquo;&nbsp;" id="btn_move_left" onclick="move_selected('<inp2:p.import_InputName field="AvailableColumns"/>', '<inp2:p.import_InputName field="ExportColumns"/>')" class="button"><br>
+								<img src="img/spacer.gif" width="1" height="4" alt=""><br>
+								<input type="button" value="&nbsp;&raquo;&raquo;&nbsp;" id="btn_move_right" onclick="move_selected('<inp2:p.import_InputName field="ExportColumns"/>', '<inp2:p.import_InputName field="AvailableColumns"/>'); select_sort('<inp2:p.import_InputName field="AvailableColumns"/>');" class="button">
+							</td>
+							<td>
+								<select multiple id="<inp2:p.import_InputName field="AvailableColumns"/>" size="15" style="width: 225px;">
+									<inp2:p.import_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/>
+								</select>
+							</td>
+						</tr>
+					</table>
+				</td>
+				<inp2:m_RenderElement name="inp_edit_error" prefix="p.import" field="ExportColumns"/>
+			</tr>
+
+	<!-- CATEGORY SELECTOR: BEGIN -->
+		<inp2:m_DefineElement name="root_cat_caption">
+			<inp2:c_RootCategoryName/>
+		</inp2:m_DefineElement>
+
+		<inp2:m_DefineElement name="category_caption">
+			<inp2:m_param name="separator"/><inp2:m_param name="cat_name"/>
+		</inp2:m_DefineElement>
+
+		<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+			<inp2:m_RenderElement name="inp_edit_field_caption" prefix="p.import" field="CategoryId" title="la_fld_ImportCategory"/>
+			<td class="control-cell">
+				<b><inp2:p.import_CategoryPath separator=" &gt; " root_cat_render_as="root_cat_caption" render_as="category_caption" session_var="ImportCategory"/></b>
+				<input type="hidden" name="<inp2:p.import_InputName field='CategoryId'/>" value="<inp2:p.import_Field field='CategoryId' db='db'/>" />
+				<a href="javascript:openSelector('p.import', '<inp2:adm_SelectorLink prefix="p.import" selection_mode="single" tab_prefixes="none"/>', 'ImportCategory', null, 'OnSaveSettings');"><img src="img/icons/icon24_cat.gif" border="0" align="absmiddle" /></a>
+			</td>
+			<td class="error"><inp2:p.import_Error field="CategoryId"/>&nbsp;</td>
+		</tr>
+
+	<!-- CATEGORY SELECTOR: END -->
+		<inp2:m_RenderElement name="inp_edit_box" prefix="p.import" field="CategorySeparator" title="la_fld_CategorySeparator" size="2" maxlength="1"/>
+		<inp2:m_RenderElement name="inp_edit_checkbox" prefix="p.import" field="ReplaceDuplicates" title="la_fld_ReplaceDuplicates" />
+
+		<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+			<inp2:m_RenderElement name="inp_edit_field_caption" prefix="p.import" field="CheckDuplicatesMethod" title="la_fld_CheckDuplicatesMethod"/>
+			<td class="control-cell">
+				<table cellspacing="0" cellpadding="0">
+					<tr>
+						<td valign="top">
+							<input type="radio"<inp2:m_if check="p.import_FieldEquals" field="CheckDuplicatesMethod" value="1"> checked</inp2:m_if> name="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>_1" value="1" />
+						</td>
+						<td>
+							<label for="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>_1"><inp2:m_phrase name="la_IDField" />: PRODUCTID</label>
+						</td>
+					</tr>
+
+					<tr>
+						<td valign="top">
+							<input type="radio"<inp2:m_if check="p.import_FieldEquals" field="CheckDuplicatesMethod" value="2"> checked</inp2:m_if> name="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>_2" value="2" />
+						</td>
+						<td>
+							<label for="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>_2"><inp2:m_phrase name="la_OtherFields" />: </label>
+							<inp2:p.import_PredefinedOptions prefix="p.import" field="DuplicateCheckFields" block="inp_checkbox_item" selected="checked"/>
+
+							<inp2:m_RenderElement prefix="p.import" name="inp_edit_hidden" field="DuplicateCheckFields"/>
+						</td>
+					</tr>
+				</table>
+			</td>
+			<inp2:m_RenderElement name="inp_edit_error" prefix="p.import" field="CheckDuplicatesMethod"/>
+		</tr>
+
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<script language="javascript" type="text/javascript">
+	reflectFormFields();
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/import.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.11.2.8
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/export.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/export.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/export.tpl	(revision 12131)
@@ -0,0 +1,128 @@
+<inp2:adm_SetPopupSize width="780" height="670"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p.export" section="in-portal:browse" perm_section="PRODUCT" permission_type="VIEW" system_permission="0" title_preset="products_export"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+
+						document.getElementById('hidden_export_columns').value = select_to_string('<inp2:p.export_InputName field="ExportColumns"/>');
+						submit_event('p.export','OnExportBegin');
+
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+							submit_event('p.export','OnGoBack');
+						}
+				 ) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+
+<inp2:p.export_SaveWarning name="grid_save_warning"/>
+<inp2:p.export_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
+
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="p.export" field="ExportFormat" title="la_fld_ExportFormat" use_phrases="0"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="p.export" field="FieldsSeparatedBy" title="la_fld_FieldsSeparatedBy" size="2" maxlength="1"/>
+			<inp2:m_RenderElement name="inp_edit_box" prefix="p.export" field="FieldsEnclosedBy" title="la_fld_FieldsEnclosedBy" size="2" maxlength="1"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="p.export" field="LineEndings" title="la_fld_LineEndings" use_phrases="0"/>
+			<inp2:m_RenderElement name="inp_edit_radio" prefix="p.export" field="LineEndingsInside" title="la_fld_LineEndingsInside" use_phrases="0"/>
+
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="p.export" field="IncludeFieldTitles" title="la_fld_IncludeFieldTitles"/>
+
+			<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+				<inp2:m_RenderElement name="inp_edit_field_caption" prefix="p.export" field="ExportColumns" title="la_fld_ExportColumns"/>
+				<td class="control-cell">
+					<table cellpadding="0" cellspacing="0" border="0">
+						<tr>
+							<td>
+								<input type="button" value="<inp2:m_phrase name="la_btn_Up"/>" onclick="move_options_up('<inp2:p.export_InputName field="ExportColumns"/>', 1)" class="button">
+								<input type="button" value="<inp2:m_phrase name="la_btn_Down"/>" onclick="move_options_down('<inp2:p.export_InputName field="ExportColumns"/>', 1)" class="button"><br />
+								<img src="img/spacer.gif" width="1" height="5" alt=""><br />
+							</td>
+							<td><img src="img/spacer.gif" width="45" height="1" alt=""><br></td>
+							<td><inp2:m_phrase name="la_fld_AvailableColumns"/>:</td>
+						</tr>
+						<tr>
+							<td>
+								<select multiple id="<inp2:p.export_InputName field="ExportColumns"/>" size="15" style="width: 225px;">
+									<inp2:p.export_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/>
+								</select>
+								<input type="hidden" id="hidden_export_columns" name="<inp2:p.export_InputName field="ExportColumns"/>" value="<inp2:p.export_Field field="ExportColumns"/>" />
+							</td>
+							<td align="center">
+								<input type="button" value="&nbsp;&laquo;&laquo;&nbsp;" onclick="move_selected('<inp2:p.export_InputName field="AvailableColumns"/>', '<inp2:p.export_InputName field="ExportColumns"/>')" class="button"><br>
+								<img src="img/spacer.gif" width="1" height="4" alt=""><br>
+								<input type="button" value="&nbsp;&raquo;&raquo;&nbsp;" onclick="move_selected('<inp2:p.export_InputName field="ExportColumns"/>', '<inp2:p.export_InputName field="AvailableColumns"/>'); select_sort('<inp2:p.export_InputName field="AvailableColumns"/>');" class="button">
+							</td>
+							<td>
+								<select multiple id="<inp2:p.export_InputName field="AvailableColumns"/>" size="15" style="width: 225px;">
+									<inp2:p.export_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/>
+								</select>
+							</td>
+						</tr>
+					</table>
+				</td>
+				<inp2:m_RenderElement name="inp_edit_error" prefix="p.export" field="ExportColumns"/>
+			</tr>
+
+			<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+				<inp2:m_RenderElement name="inp_edit_field_caption" prefix="p.export" field="CategoryFormat" title="la_fld_CategoryFormat"/>
+				<td class="control-cell">
+					<table cellspacing="0" cellpadding="0">
+						<tr>
+							<td rowspan="2" valign="top">
+								<input type="radio"<inp2:m_if check="p.export_FieldEquals" field="CategoryFormat" value="1"> checked</inp2:m_if> name="<inp2:p.export_InputName field="CategoryFormat"/>" id="<inp2:p.export_InputName field="CategoryFormat"/>_1" value="1" />
+							</td>
+							<td>
+								<label for="<inp2:p.export_InputName field="CategoryFormat"/>_1"><inp2:m_phrase label="la_MixedCategoryPath"/></label>
+							</td>
+						</tr>
+						<tr>
+							<td>
+								<span class="<inp2:m_if check="p.export_HasError" field="CategorySeparator">error</inp2:m_if>"><inp2:m_phrase name="la_fld_CategorySeparator"/></span><inp2:m_if check="p.export_IsRequired" field="CategorySeparator"><span class="error"> *</span></inp2:m_if>:
+								 <input type="text" name="<inp2:p.export_InputName field="CategorySeparator"/>" id="<inp2:p.export_InputName field="CategorySeparator"/>" value="<inp2:p.export_Field field="CategorySeparator"/>" size="2" maxlength="1" /><br />
+								(will look like "Category:Sub-category:Sub-sub-category")
+
+							</td>
+						</tr>
+
+						<tr>
+							<td rowspan="2" valign="top">
+								<input type="radio"<inp2:m_if check="p.export_FieldEquals" field="CategoryFormat" value="2"> checked</inp2:m_if> name="<inp2:p.export_InputName field="CategoryFormat"/>" id="<inp2:p.export_InputName field="CategoryFormat"/>_2" value="2" />
+							</td>
+							<td>
+								<label for="<inp2:p.export_InputName field="CategoryFormat"/>_2"><inp2:m_phrase label="la_SeparatedCategoryPath"/></label><br />
+								(the fields will be titled Category1..CategoryN accordingly)
+							</td>
+						</tr>
+					</table>
+				</td>
+				<inp2:m_RenderElement name="inp_edit_error" prefix="p.export" field="CategoryFormat"/>
+			</tr>
+
+			<inp2:m_if check="m_GetEquals" name="m_cat_id" value="0" inverse="inverse">
+				<inp2:m_RenderElement name="inp_edit_checkbox" prefix="p.export" field="IsBaseCategory" title="la_fld_IsBaseCategory" />
+			</inp2:m_if>
+
+			<inp2:m_RenderElement name="inp_edit_box" prefix="p.export" field="ExportFilename" title="la_fld_ExportFilename" size="20" />
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/export.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/export_finish.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/export_finish.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/export_finish.tpl	(revision 12131)
@@ -0,0 +1,45 @@
+<inp2:adm_SetPopupSize width="780" height="670"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p.export" section="in-portal:browse" perm_section="PRODUCT" permission_type="VIEW" system_permission="0" title_preset="products_export"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Close" escape="1"/>', function() {
+							submit_event('p.export', 'OnGoBack');
+						}
+				 ) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
+
+		<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+			<inp2:m_inc param="tab_index" by="1"/>
+			<td class="label-cell">
+				<inp2:m_phrase label="la_DownloadExportFile"/>
+			</td>
+			<td class="control-mid">&nbsp;</td>
+			<td class="control-cell">
+				<a href="<inp2:p.export_ExportPath as_url="1"/>"><inp2:p.export_ExportPath /></a>
+			</td>
+		</tr>
+
+		<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/export_finish.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/reports/reports.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/reports/reports.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/reports/reports.tpl	(revision 12131)
@@ -0,0 +1,97 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="rep" section="in-commerce:reports" title_preset="report_options"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_RunReport" escape="1"/>', function() {
+
+//						set_hidden_field('progress_t', '../../plugins/reports/admin_templates/progress');
+						set_hidden_field('progress_t', 'in-commerce/reports/progress');
+
+//						set_hidden_field('reports_finish_t', '../../plugins/reports/admin_templates/results');
+						set_hidden_field('reports_finish_t', 'in-commerce/reports/results');
+						submit_event('rep','OnRunReport');
+
+						}
+					) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
+	<inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
+
+		<inp2:m_RenderElement name="inp_edit_radio" prefix="rep" field="ReportType" title="la_fld_ReportType" use_phrases="1"/>
+
+		<inp2:m_RenderElement name="inp_edit_date" prefix="rep" field="FromDateTime" title="!la_fld_FromDateTime!"/>
+		<inp2:m_RenderElement name="inp_edit_date" prefix="rep" field="ToDateTime" title="!la_fld_ToDateTime!"/>
+
+		<script type="text/javascript">
+			function updateTimeFrame(option) {
+				from_date = '';
+				to_date = '';
+				if (option == 'last_week') {
+					from_date = '<inp2:adm_TimeFrame type="last_week_start" format="_regional_InputDateFormat"/>';
+					to_date = '<inp2:adm_TimeFrame type="last_week_end" format="_regional_InputDateFormat"/>';
+				}
+
+				if (option == 'last_month') {
+					from_date = '<inp2:adm_TimeFrame type="last_month_start" format="_regional_InputDateFormat"/>';
+					to_date = '<inp2:adm_TimeFrame type="last_month_end" format="_regional_InputDateFormat"/>';
+				}
+
+				if (option == 'last_quater') {
+					from_date = '<inp2:adm_TimeFrame type="last_quater_start" format="_regional_InputDateFormat"/>';
+					to_date = '<inp2:adm_TimeFrame type="last_quater_end" format="_regional_InputDateFormat"/>';
+				}
+
+				if (option == 'last_6months') {
+					from_date = '<inp2:adm_TimeFrame type="last_6_months_start" format="_regional_InputDateFormat"/>';
+					to_date = '<inp2:adm_TimeFrame type="last_month_end" format="_regional_InputDateFormat"/>';
+				}
+
+				if (option == 'last_year') {
+					from_date = '<inp2:adm_TimeFrame type="last_year_start" format="_regional_InputDateFormat"/>';
+					to_date = '<inp2:adm_TimeFrame type="last_year_end" format="_regional_InputDateFormat"/>';
+				}
+
+
+				document.getElementById('<inp2:rep_InputName field="FromDateTime_date"/>').value = from_date;
+				document.getElementById('<inp2:rep_InputName field="ToDateTime_date"/>').value = to_date;
+			}
+		</script>
+
+	<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
+		<inp2:m_inc param="tab_index" by="1"/>
+		<td class="label-cell">
+			<inp2:m_Phrase label="la_comm_Timeframe"/>:
+		</td>
+		<td class="control-mid">&nbsp;</td>
+		<td class="control-cell">
+			<select id="timeframe" onchange="updateTimeFrame(this.value)">
+				<option value=""></option>
+				<option value="last_week"><inp2:m_Phrase label="lu_comm_LastWeek"/></option>
+				<option value="last_month"><inp2:m_Phrase label="lu_comm_LastMonth"/></option>
+				<option value="last_quater"><inp2:m_Phrase label="lu_comm_LastQuater"/></option>
+				<option value="last_6months"><inp2:m_Phrase label="lu_comm_Last6Months"/></option>
+				<option value="last_year"><inp2:m_Phrase label="lu_comm_LastYear"/></option>
+			</select>
+		</td>
+	</tr>
+
+	<!--<inp2:m_RenderElement name="inp_edit_checkbox" prefix="rep" field="Recursive" title="la_fld_Recursive"/>
+	<inp2:m_RenderElement name="inp_edit_checkbox" prefix="rep" field="SkipEmpty" title="la_fld_SkipEmpty"/>-->
+
+	<inp2:m_RenderElement name="inp_edit_filler"/>
+</table>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/reports/reports.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.4.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/reports/chart.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/reports/chart.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/reports/chart.tpl	(revision 12131)
@@ -0,0 +1,62 @@
+<inp2:adm_SetPopupSize width="1124" height="700"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="rep" section="in-commerce:reports" title_preset="report_chart"/>
+
+<inp2:rep.params_CalculateChart/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%">
+<tbody>
+	<tr>
+  	<td>
+			<script type="text/javascript">
+				function edit()
+				{
+					// do nothing
+				}
+
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Close" escape="1"/>', function() {
+							getWindowOpener(window).focus();
+							window_close();
+							return true;
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				 a_toolbar.AddButton( new ToolBarButton('print', '<inp2:m_phrase label="la_ToolTip_Print" escape="1"/>', function() {
+				 			window.print();
+						}
+				 ) );
+
+				a_toolbar.Render();
+			</script>
+		</td>
+	  	<td align="center">
+			<inp2:m_if check="rep.metric_ReportTypeEquals" value="2">
+			<inp2:m_else/>
+		  		<inp2:m_Phrase label="la_Metric"/>:	<select name="metric" id="metric" onchange="submit_event('rep','OnChangeStatistics')">
+					<inp2:rep.params_PredefinedOptions field="Metric" block="inp_option_phrase" selected="selected"/>
+				</select>
+			</inp2:m_if>
+		</td>
+		<td width="150">
+			&nbsp;
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<center>
+<inp2:m_if check="rep.metric_ReportTypeEquals" value="12">
+	<img src="<inp2:m_Link template='dummy' pass='m,rep' rep_event='OnPrintChart'/>&rand=<inp2:rep_GetRandom/>&width=1024&height=600" />
+<inp2:m_else/>
+	<img src="<inp2:m_Link template='dummy' pass='m,rep' rep_event='OnPieChart' />&rand=<inp2:rep_GetRandom/>&width=1024&height=600" />
+</inp2:m_if>
+<br/>
+<!--inp2:m_RenderElement name="graph" width="600" height="450" template="ebay/listings/statistics_graph"/-->
+<center/>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/reports/chart.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.4.6
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/reports/results.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/reports/results.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/reports/results.tpl	(revision 12131)
@@ -0,0 +1,68 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="rep" section="in-commerce:reports" pagination="1" title_preset="report_results"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%">
+<tbody>
+	<tr>
+  	<td>
+			<script type="text/javascript">
+				function edit()
+				{
+					// do nothing
+				}
+
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Back" escape="1"/>', function() {
+//							window.location = '<inp2:m_t t="../../plugins/reports/admin_templates/reports" "pass"="m,rep" "rep_event="OnNew"/>'
+							window.location = '<inp2:m_Link template="in-commerce/reports/reports" pass="m,rep" rep_event="OnNew" no_amp="1" />';
+							return true;
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				 a_toolbar.AddButton( new ToolBarButton('print', '<inp2:m_phrase label="la_ToolTip_Print" escape="1"/>', function() {
+				 			window.print();
+						}
+				 ) );
+
+				 a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+								show_viewmenu(a_toolbar,'view');
+							}
+					) );
+
+				 a_toolbar.AddButton( new ToolBarButton('export', '<inp2:m_phrase label="la_ToolTip_Export" escape="1"/>', function() {
+								submit_event('rep','OnExportReport');
+							}
+					) );
+
+				<inp2:m_if check="rep.metric_ReportTypeEquals" value="2">
+					// By Users report have no chart
+				<inp2:m_else/>
+					// Only PHP5 have chart
+					<inp2:m_if check="rep_IsPHPxOrGreater" version="5">
+						// Chart window open button
+						 a_toolbar.AddButton( new ToolBarButton('in-commerce:view_chart', '<inp2:m_phrase label="la_ToolTip_View_Chart" escape="1"/>', function() {
+								openSelector('rep', '<inp2:m_Link template="in-commerce/reports/chart" pass="all" js_escape="1"/>');
+							}
+							) );
+					</inp2:m_if>
+
+				</inp2:m_if>
+
+				a_toolbar.Render();
+			</script>
+		</td>
+
+	  	<inp2:m_RenderElement name="search_main_toolbar" prefix="rep" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="rep" IdField="CategoryId" grid="Default" totals_render_as="grid_total_row"/>
+<script type="text/javascript">
+	Grids['rep'].SetDependantToolbarButtons( new Array() );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/reports/results.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.4.6
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/reports/progress.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/reports/progress.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/reports/progress.tpl	(revision 12131)
@@ -0,0 +1,15 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="rep" section="in-commerce:reports" title_preset="report_progress"/>
+
+<inp2:m_RenderElement name="ajax_progress_bar" cancel_action="cancel_action();"/>
+
+<script type="text/javascript">
+	function cancel_action() {
+		submit_event('rep', 'OnGoBack');
+	}
+	// $ProductExport = new AjaxProgressBar('<inp2:m_t t="../../plugins/reports/admin_templates/status_xml" no_amp="1"/>');
+
+	$ProductExport = new AjaxProgressBar('<inp2:m_Link template="in-commerce/reports/status_xml" no_amp="1"/>');
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/reports/progress.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.4.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/reports/status_xml.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/reports/status_xml.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/reports/status_xml.tpl	(revision 12131)
@@ -0,0 +1 @@
+<inp2:rep_ReportStatus/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/reports/status_xml.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.4.1
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/import_progress.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/import_progress.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/import_progress.tpl	(revision 12131)
@@ -0,0 +1,16 @@
+<inp2:adm_SetPopupSize width="780" height="670"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p.import" section="in-portal:browse" perm_section="PRODUCT" permission_type="VIEW" system_permission="0" title_preset="products_import"/>
+
+<inp2:m_RenderElement name="ajax_progress_bar" cancel_action="cancel_action();"/>
+
+<script type="text/javascript">
+	function cancel_action() {
+		submit_event('p.import', 'OnExportCancel');
+	}
+
+	$ProductImport = new AjaxProgressBar('<inp2:m_t t="dummy" p.import_event="OnExportProgress" pass="m,p.import" js_escape="1"/>');
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/import_progress.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/export_progress.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/export_progress.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/export_progress.tpl	(revision 12131)
@@ -0,0 +1,16 @@
+<inp2:adm_SetPopupSize width="780" height="670"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p.export" section="in-portal:browse" perm_section="PRODUCT" permission_type="VIEW" system_permission="0" title_preset="products_export"/>
+
+<inp2:m_RenderElement name="ajax_progress_bar" cancel_action="cancel_action();"/>
+
+<script type="text/javascript">
+	function cancel_action() {
+		submit_event('p.export', 'OnExportCancel');
+	}
+
+	$ProductExport = new AjaxProgressBar('<inp2:m_t t="dummy" p.export_event="OnExportProgress" pass="m,p.export" js_escape="1"/>');
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/export_progress.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/paid_listings/paid_listing_type_shopcart.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/paid_listings/paid_listing_type_shopcart.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/paid_listings/paid_listing_type_shopcart.tpl	(revision 12131)
@@ -0,0 +1,66 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="lst" section="in-link:listing_types" title_preset="listing_type_shop_cart" tab_preset="Default"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+						submit_event('lst','<inp2:lst_SaveEvent/>');
+						}
+					) );
+				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+						submit_event('lst','OnCancelEdit');
+						}
+				 ) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+							go_to_id('lst', '<inp2:lst_PrevId/>');
+						}
+				 ) );
+				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+							go_to_id('lst', '<inp2:lst_NextId/>');
+						}
+				 ) );
+
+				a_toolbar.Render();
+
+				<inp2:m_if check="lst_IsSingle" >
+					a_toolbar.HideButton('prev');
+					a_toolbar.HideButton('next');
+					a_toolbar.HideButton('sep1');
+				<inp2:m_else/>
+					<inp2:m_if check="lst_IsLast" >
+						a_toolbar.DisableButton('next');
+					</inp2:m_if>
+					<inp2:m_if check="lst_IsFirst" >
+						a_toolbar.DisableButton('prev');
+					</inp2:m_if>
+				</inp2:m_if>
+			</script>
+		</td>
+	</tr>
+</tbody>
+</table>
+
+<inp2:lst_SaveWarning name="grid_save_warning"/>
+<inp2:lst_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+	<table class="edit-form">
+		<inp2:m_RenderElement name="subsection" title="la_Text_ShopCartItem"/>
+			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="lst" field="EnableBuying" title="la_fld_EnableBuying" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="lst" field="ShopCartName" title="la_fld_ShopCartName" size="20" />
+			<inp2:m_RenderElement name="inp_edit_box" prefix="lst" field="Price" title="la_fld_Price" size="8" />
+			<!-- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="lst" field="Recurring" title="la_fld_Recurring" /> -->
+
+	<inp2:m_RenderElement name="inp_edit_filler"/>
+	</table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/paid_listings/paid_listing_type_shopcart.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.8.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/downloads/downloads_list.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/downloads/downloads_list.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/downloads/downloads_list.tpl	(revision 12131)
@@ -0,0 +1,50 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="down" section="in-commerce:downloadlog" title_preset="downloads_list" pagination="1"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  	<td>
+  		<script type="text/javascript">
+				a_toolbar = new ToolBar();
+
+				function edit()
+	  			{
+
+	  			}
+
+				a_toolbar.AddButton( new ToolBarButton('refresh', '<inp2:m_phrase label="la_ToolTip_Refresh" escape="1"/>', function() {
+							window.location.href = window.location.href;
+						}
+				) );
+
+				a_toolbar.AddButton( new ToolBarButton('reset', '<inp2:m_phrase label="la_ToolTip_Reset" escape="1"/>', function() {
+							std_delete_items('down');
+						}
+				) );
+
+				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+				a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+							show_viewmenu(a_toolbar,'view');
+						}
+				) );
+
+				a_toolbar.Render();
+			</script>
+
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="down" grid="Default"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="down" IdField="DownloadId" grid="Default"/>
+
+<script type="text/javascript">
+	Grids['down'].SetDependantToolbarButtons( new Array('reset') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/downloads/downloads_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/incs/order_print.css
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/incs/order_print.css	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/incs/order_print.css	(revision 12131)
@@ -0,0 +1,53 @@
+.order_print_defaults TD,
+.order_preview_header,
+.order_preview_header TD,
+.order_print_preview_header TD,
+.order_preview_field_name,
+.order-totals-name,
+.arial2r,
+.orders_print_flat_table TD {
+	font-family: Arial;
+	font-size: 10pt;
+}
+
+.order_preview_header, .order_preview_header TD, .order_print_preview_header TD {
+	background-color: #C9E9FE;
+	font-weight: bold;
+}
+
+.order_print_preview_header TD {
+	background-color: #FFFFFF;
+}
+
+.order_preview_field_name {
+	font-weight: bold;
+	padding: 2px 4px 2px 4px;
+}
+
+.order-totals-name {
+	font-style: normal;
+}
+
+.border1 {
+	border: 1px solid #111111;
+}
+
+.arial2r {
+	color: #602830;
+	font-weight: bold;
+}
+
+.orders_flat_table, .orders_print_flat_table {
+	border-collapse: collapse;
+	margin: 5px;
+}
+
+.orders_flat_table TD {
+	padding: 2px 5px 2px 5px;
+	border: 1px solid #444444;
+}
+
+.orders_print_flat_table TD {
+	border: 1px solid #000000;
+	padding: 2px 5px 2px 5px;
+}
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/incs/order_print.css
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/payments/payments_list.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/payments/payments_list.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/payments/payments_list.tpl	(revision 12131)
@@ -0,0 +1,48 @@
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="apayments.log" section="in-commerce:paymentlog" title_preset="payments_log"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+	<tr>
+  		<td>
+	  		<script type="text/javascript">
+					a_toolbar = new ToolBar();
+
+					a_toolbar.AddButton( new ToolBarButton('refresh', '<inp2:m_phrase label="la_ToolTip_Refresh" escape="1"/>', function() {
+								window.location.href = window.location.href;
+							}
+					) );
+
+					a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+					a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+								show_viewmenu(a_toolbar,'view');
+							}
+					) );
+
+					a_toolbar.Render();
+
+					function edit()
+					{
+						// required for correct row selection
+					}
+			</script>
+		</td>
+
+		<inp2:m_RenderElement name="search_main_toolbar" prefix="apayments.log" grid="Log"/>
+	</tr>
+</tbody>
+</table>
+
+<inp2:m_DefineElement name="grid_userlink_td" format="">
+	<a href="<inp2:UserLink edit_template='users/users_edit'/>" onclick="return direct_edit('<inp2:m_Param name="PrefixSpecial"/>', this.href);" title="<inp2:m_phrase name="la_Edit_User"/>"><inp2:Field field="$field" no_special="no_special" grid="$grid" format="$format"/></a>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="grid_currency_td" format="" no_special="">
+	<inp2:Field field="$field" grid="$grid" no_special="$no_special" format="$format" currency="selected" />
+</inp2:m_DefineElement>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="apayments.log" IdField="AffiliatePaymentId" grid="Log" main_special=""/>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/admin_templates/payments/payments_list.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.11.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/admin_templates/category_properties.tpl
===================================================================
--- branches/5.1.x/in-commerce/admin_templates/category_properties.tpl	(nonexistent)
+++ branches/5.1.x/in-commerce/admin_templates/category_properties.tpl	(revision 12131)
@@ -0,0 +1,2 @@
+<inp2:m_RenderElement name="subsection" title="la_In-commerce"/>
+<inp2:m_RenderElement name="inp_edit_box" prefix="c" field="cust_p_ItemTemplate" type_field="cust_p_ItemTemplate" title="la_fld_cust_p_ItemTemplate" size="50"/>

Property changes on: branches/5.1.x/in-commerce/admin_templates/category_properties.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/install/upgrades.sql
===================================================================
--- branches/5.1.x/in-commerce/install/upgrades.sql	(nonexistent)
+++ branches/5.1.x/in-commerce/install/upgrades.sql	(revision 12131)
@@ -0,0 +1,39 @@
+# ===== v 4.3.9 =====
+
+INSERT INTO ImportScripts VALUES (DEFAULT, 'Products from CSV file [In-Commerce]', '', 'p', 'In-Commerce', '', 'CSV', '1');
+
+ALTER TABLE Products ADD OnSale TINYINT(1) NOT NULL default '0' AFTER Featured, ADD INDEX (OnSale);
+
+UPDATE Phrase SET Module = 'In-Commerce' WHERE Phrase IN ('lu_comm_Images', 'lu_comm_ImagesHeader');
+
+# ===== v 5.0.0 =====
+UPDATE Category SET Template = '/in-commerce/designs/section' WHERE Template = 'in-commerce/store/category';
+UPDATE Category SET CachedTemplate = '/in-commerce/designs/section' WHERE CachedTemplate = 'in-commerce/store/category';
+
+UPDATE ConfigurationValues SET VariableValue = '/in-commerce/designs/section' WHERE VariableName = 'p_CategoryTemplate';
+UPDATE ConfigurationValues SET VariableValue = 'in-commerce/designs/detail' WHERE VariableName = 'p_ItemTemplate';
+
+DELETE FROM PersistantSessionData WHERE VariableName IN ('affil_columns_.', 'ap_columns_.', 'apayments_columns_.', 'apayments.log_columns_.', 'd_columns_.', 'coup_columns_.', 'file_columns_.', 'po_columns_.', 'z_columns_.', 'tax_columns_.');
+DELETE FROM PersistantSessionData WHERE VariableName LIKE '%ord.%';
+
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:products.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:setting_folder.view', 11, 1, 1, 0);
+
+INSERT INTO ShippingQuoteEngines VALUES (DEFAULT, 'USPS.com', 0, 0, 0, 'a:21:{s:12:"AccountLogin";s:0:"";s:15:"AccountPassword";N;s:10:"UPSEnabled";N;s:10:"UPSAccount";s:0:"";s:11:"UPSInvoiced";N;s:10:"FDXEnabled";N;s:10:"FDXAccount";s:0:"";s:10:"DHLEnabled";N;s:10:"DHLAccount";s:0:"";s:11:"DHLInvoiced";N;s:10:"USPEnabled";N;s:10:"USPAccount";s:0:"";s:11:"USPInvoiced";N;s:10:"ARBEnabled";N;s:10:"ARBAccount";s:0:"";s:11:"ARBInvoiced";N;s:10:"1DYEnabled";N;s:10:"2DYEnabled";N;s:10:"3DYEnabled";N;s:10:"GNDEnabled";N;s:10:"ShipMethod";N;}', 'USPS');
+
+INSERT INTO ConfigurationAdmin VALUES ('Comm_CompanyName', 'la_Text_ContactsGeneral', 'la_text_CompanyName', 'text', NULL, NULL, 10.01, 0, 0);
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_CompanyName', '', 'In-Commerce', 'in-commerce:contacts');
+
+UPDATE ConfigurationAdmin SET prompt = 'la_text_StoreName', DisplayOrder = 10.02 WHERE VariableName = 'Comm_StoreName';
+
+INSERT INTO ConfigurationAdmin VALUES ('Comm_Contacts_Name', 'la_Text_ContactsGeneral', 'la_text_ContactName', 'text', NULL, NULL, 10.03, 0, 0);
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Contacts_Name', '', 'In-Commerce', 'in-commerce:contacts');
+
+UPDATE ConfigurationAdmin SET DisplayOrder = 10.04 WHERE VariableName = 'Comm_Contacts_Phone';
+UPDATE ConfigurationAdmin SET DisplayOrder = 10.05 WHERE VariableName = 'Comm_Contacts_Fax';
+UPDATE ConfigurationAdmin SET DisplayOrder = 10.06 WHERE VariableName = 'Comm_Contacts_Email';
+UPDATE ConfigurationAdmin SET DisplayOrder = 10.07 WHERE VariableName = 'Comm_Contacts_Additional';
+
+DELETE FROM Phrase WHERE Phrase IN ('la_fld_ManufacturerId', 'la_fld_DiscountId', 'la_fld_CouponId', 'la_fld_AffiliatePlanId', 'la_fld_AffiliateId', 'la_fld_ZoneId', 'la_fld_EngineId', 'la_fld_ShippingId', 'la_fld_ProductId', 'la_fld_OptionId', 'la_fld_CurrencyId');
+
+UPDATE Phrase SET Module = 'In-Commerce' WHERE ((Phrase LIKE '%Product%' OR Phrase LIKE '%Shipping%' OR Phrase LIKE '%Coupon%' OR Phrase LIKE '%Discount%' OR Phrase LIKE '%Report%' OR Phrase LIKE '%Currency%' OR Phrase LIKE '%Cart%') AND (Module = 'Core'));
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/install/upgrades.sql
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.11
\ No newline at end of property
Index: branches/5.1.x/in-commerce/install/english.lang
===================================================================
--- branches/5.1.x/in-commerce/install/english.lang	(nonexistent)
+++ branches/5.1.x/in-commerce/install/english.lang	(revision 12131)
@@ -0,0 +1,1510 @@
+<LANGUAGES>
+	<LANGUAGE PackName="English" Encoding="base64"><DATEFORMAT>m/d/Y</DATEFORMAT><TIMEFORMAT>g:i:s A</TIMEFORMAT><INPUTDATEFORMAT>m/d/Y</INPUTDATEFORMAT><INPUTTIMEFORMAT>g:i:s A</INPUTTIMEFORMAT><DECIMAL>.</DECIMAL><THOUSANDS>,</THOUSANDS><CHARSET>utf-8</CHARSET><UNITSYSTEM>2</UNITSYSTEM>
+		<PHRASES>
+			<PHRASE Label="la_AccountLogin" Module="In-Commerce" Type="1">QWNjb3VudA==</PHRASE>
+			<PHRASE Label="la_AddressLine1" Module="In-Commerce" Type="1">QWRkcmVzcyBMaW5lIDE=</PHRASE>
+			<PHRASE Label="la_AddressLine2" Module="In-Commerce" Type="1">QWRkcmVzcyBMaW5lIDI=</PHRASE>
+			<PHRASE Label="la_ADP" Module="In-Commerce" Type="1">QW5kb3JyYW4gUGVzZXRh</PHRASE>
+			<PHRASE Label="la_AED" Module="In-Commerce" Type="1">VUFFIERpcmhhbQ==</PHRASE>
+			<PHRASE Label="la_AFA" Module="In-Commerce" Type="1">QWZnaGFuaQ==</PHRASE>
+			<PHRASE Label="la_affiliate_already_exists" Module="In-Commerce" Type="1">YWZmaWxpYXRlIGFscmVhZHkgZXhpc3Rz</PHRASE>
+			<PHRASE Label="la_AFN" Module="In-Commerce" Type="1">QWZnaGFuaQ==</PHRASE>
+			<PHRASE Label="la_ALL" Module="In-Commerce" Type="1">TGVjaw==</PHRASE>
+			<PHRASE Label="la_Allowed" Module="In-Commerce" Type="1">QWxsb3dlZA==</PHRASE>
+			<PHRASE Label="la_AllowOrderDifferentTypes" Module="In-Commerce" Type="1">QWxsb3cgb3JkZXJpbmcgb2YgcHJvZHVjdHMgd2l0aCBkaWZmZXJlbnQgdHlwZXM=</PHRASE>
+			<PHRASE Label="la_AllowOrderingInNonPrimaryCurrency" Module="In-Commerce" Type="1">QWxsb3cgb3JkZXJpbmcgaW4gbm9uLXByaW1hcnkgY3VycmVuY2llcw==</PHRASE>
+			<PHRASE Label="la_AllowOrderMoreThanAvailable" Module="In-Commerce" Type="1">QWxsb3cgb3JkZXJpbmcgb2YgbW9yZSBxdWFudGl0eSB0aGFuIGF2YWlsYWJsZSBhcyBiYWNrb3JkZXI=</PHRASE>
+			<PHRASE Label="la_AMD" Module="In-Commerce" Type="1">QXJtZW5pYW4gRHJhbQ==</PHRASE>
+			<PHRASE Label="la_ANG" Module="In-Commerce" Type="1">TmV0aGVybGFuZHMgQW50aWxsYW4gR3VpbGRlcg==</PHRASE>
+			<PHRASE Label="la_AOA" Module="In-Commerce" Type="1">S3dhbnph</PHRASE>
+			<PHRASE Label="la_Archived" Module="In-Commerce" Type="1">QXJjaGl2ZWQ=</PHRASE>
+			<PHRASE Label="la_ARS" Module="In-Commerce" Type="1">QXJnZW50aW5lIFBlc28=</PHRASE>
+			<PHRASE Label="la_AUD" Module="In-Commerce" Type="1">QXVzdHJhbGlhbiBEb2xsYXI=</PHRASE>
+			<PHRASE Label="la_AutoBackorder" Module="In-Commerce" Type="1">QXV0byBCYWNrb3JkZXI=</PHRASE>
+			<PHRASE Label="la_AutoProcessRecurringOrders" Module="In-Commerce" Type="1">QXV0b21hdGljYWxseSBQcm9jZXNzIFJlY3VycmluZyBPcmRlcnM=</PHRASE>
+			<PHRASE Label="la_Availability" Module="In-Commerce" Type="1">QXZhaWxhYmlsaXR5</PHRASE>
+			<PHRASE Label="la_AWG" Module="In-Commerce" Type="1">QXJ1YmFuIEd1aWxkZXI=</PHRASE>
+			<PHRASE Label="la_AZM" Module="In-Commerce" Type="1">QXplcmJhaWphbmlhbiBNYW5hdA==</PHRASE>
+			<PHRASE Label="la_BackOrders" Module="In-Commerce" Type="1">QmFja09yZGVycw==</PHRASE>
+			<PHRASE Label="la_BAM" Module="In-Commerce" Type="1">Q29udmVydGlibGUgTWFya3M=</PHRASE>
+			<PHRASE Label="la_BankOfLatvia" Module="In-Commerce" Type="1">QmFuayBvZiBMYXR2aWEgLSB3d3cuYmFuay5sdg==</PHRASE>
+			<PHRASE Label="la_Base_Fee" Module="In-Commerce" Type="1">QmFzZSBGZWU=</PHRASE>
+			<PHRASE Label="la_BBD" Module="In-Commerce" Type="1">QmFyYmFkb3MgRG9sbGFy</PHRASE>
+			<PHRASE Label="la_BDT" Module="In-Commerce" Type="1">VGFrYQ==</PHRASE>
+			<PHRASE Label="la_BGL" Module="In-Commerce" Type="1">TGV2</PHRASE>
+			<PHRASE Label="la_BGN" Module="In-Commerce" Type="1">QnVsZ2FyaWFuIExldg==</PHRASE>
+			<PHRASE Label="la_BHD" Module="In-Commerce" Type="1">QmFocmFpbmkgRGluYXI=</PHRASE>
+			<PHRASE Label="la_BIF" Module="In-Commerce" Type="1">QnVydW5kaSBGcmFuYw==</PHRASE>
+			<PHRASE Label="la_BMD" Module="In-Commerce" Type="1">QmVybXVkaWFuIERvbGxhcg==</PHRASE>
+			<PHRASE Label="la_BND" Module="In-Commerce" Type="1">QnJ1bmVpIERvbGxhcg==</PHRASE>
+			<PHRASE Label="la_BOB" Module="In-Commerce" Type="1">Qm9saXZpYW5v</PHRASE>
+			<PHRASE Label="la_BOV" Module="In-Commerce" Type="1">TXZkb2w=</PHRASE>
+			<PHRASE Label="la_BRL" Module="In-Commerce" Type="1">QnJhemlsaWFuIFJlYWw=</PHRASE>
+			<PHRASE Label="la_BSD" Module="In-Commerce" Type="1">QmFoYW1pYW4gRG9sbGFy</PHRASE>
+			<PHRASE Label="la_BTN" Module="In-Commerce" Type="1">Tmd1bHRydW0=</PHRASE>
+			<PHRASE Label="la_btn_Add" Module="In-Commerce" Type="1">QWRk</PHRASE>
+			<PHRASE Label="la_btn_AddLocation" Module="In-Commerce" Type="1">QWRkIExvY2F0aW9u</PHRASE>
+			<PHRASE Label="la_btn_CancelOrder" Module="In-Commerce" Type="1">Q2FuY2VsIE9yZGVy</PHRASE>
+			<PHRASE Label="la_btn_Order" Module="In-Commerce" Type="1">T3JkZXI=</PHRASE>
+			<PHRASE Label="la_btn_ReceiveOrder" Module="In-Commerce" Type="1">UmVjZWl2ZSBPcmRlcg==</PHRASE>
+			<PHRASE Label="la_btn_Remove" Module="In-Commerce" Type="1">UmVtb3Zl</PHRASE>
+			<PHRASE Label="la_btn_RemoveLocations" Module="In-Commerce" Type="1">UmVtb3ZlIExvY2F0aW9ucw==</PHRASE>
+			<PHRASE Label="la_BuiltIn" Module="In-Commerce" Type="1">QnVpbHQtSW4=</PHRASE>
+			<PHRASE Label="la_button_add" Module="In-Commerce" Type="1">QWRk</PHRASE>
+			<PHRASE Label="la_button_receive_order" Module="In-Commerce" Type="1">UmVjZWl2ZSBvcmRlcg==</PHRASE>
+			<PHRASE Label="la_button_remove" Module="In-Commerce" Type="1">UmVtb3Zl</PHRASE>
+			<PHRASE Label="la_Button_Save" Module="In-Commerce" Type="1">U2F2ZQ==</PHRASE>
+			<PHRASE Label="la_BWP" Module="In-Commerce" Type="1">UHVsYQ==</PHRASE>
+			<PHRASE Label="la_ByAmount" Module="In-Commerce" Type="1">YnkgYW1vdW50</PHRASE>
+			<PHRASE Label="la_ByCategory" Module="In-Commerce" Type="1">QnkgU2VjdGlvbg==</PHRASE>
+			<PHRASE Label="la_ByCountry" Module="In-Commerce" Type="1">QnkgQ291bnRyeQ==</PHRASE>
+			<PHRASE Label="la_ByItem" Module="In-Commerce" Type="1">YnkgaXRlbQ==</PHRASE>
+			<PHRASE Label="la_byProduct" Module="In-Commerce" Type="1">QnkgUHJvZHVjdA==</PHRASE>
+			<PHRASE Label="la_BYR" Module="In-Commerce" Type="1">QmVsYXJ1c3NpYW4gUnVibGU=</PHRASE>
+			<PHRASE Label="la_ByState" Module="In-Commerce" Type="1">QnkgU3RhdGU=</PHRASE>
+			<PHRASE Label="la_ByUser" Module="In-Commerce" Type="1">QnkgVXNlcg==</PHRASE>
+			<PHRASE Label="la_ByWeight" Module="In-Commerce" Type="1">Ynkgd2VpZ2h0</PHRASE>
+			<PHRASE Label="la_ByZIP" Module="In-Commerce" Type="1">QnkgWklQ</PHRASE>
+			<PHRASE Label="la_by_amount" Module="In-Commerce" Type="1">YnkgYW1vdW50</PHRASE>
+			<PHRASE Label="la_by_items_sold" Module="In-Commerce" Type="1">YnkgaXRlbXMgc29sZA==</PHRASE>
+			<PHRASE Label="la_by_options" Module="In-Commerce" Type="1">QnkgUHJvZHVjdCBPcHRpb25z</PHRASE>
+			<PHRASE Label="la_by_product" Module="In-Commerce" Type="1">QnkgUHJvZHVjdA==</PHRASE>
+			<PHRASE Label="la_by_request" Module="In-Commerce" Type="1">QnkgUmVxdWVzdA==</PHRASE>
+			<PHRASE Label="la_BZD" Module="In-Commerce" Type="1">QmVsaXplIERvbGxhcg==</PHRASE>
+			<PHRASE Label="la_CAD" Module="In-Commerce" Type="1">Q2FuYWRpYW4gRG9sbGFy</PHRASE>
+			<PHRASE Label="la_CDF" Module="In-Commerce" Type="1">RnJhbmMgQ29uZ29sYWlz</PHRASE>
+			<PHRASE Label="la_CHF" Module="In-Commerce" Type="1">U3dpc3MgRnJhbmM=</PHRASE>
+			<PHRASE Label="la_City" Module="In-Commerce" Type="1">Q2l0eQ==</PHRASE>
+			<PHRASE Label="la_ClearCostsWarning" Module="In-Commerce" Type="1">RG8geW91IHJlYWxseSB3YW50IHRvIHJlc2V0IHdob2xlIGNvc3RzIHRhYmxlPw==</PHRASE>
+			<PHRASE Label="la_CLF" Module="In-Commerce" Type="1">VW5pZGFkZXMgZGUgZm9tZW50bw==</PHRASE>
+			<PHRASE Label="la_CloneCoupon" Module="In-Commerce" Type="1">Q2xvbmluZyBhIENvdXBvbg==</PHRASE>
+			<PHRASE Label="la_CLP" Module="In-Commerce" Type="1">Q2hpbGVhbiBQZXNv</PHRASE>
+			<PHRASE Label="la_CNY" Module="In-Commerce" Type="1">Q2hpbmEgWXVhbiBSZW5taW5iaQ==</PHRASE>
+			<PHRASE Label="la_COD" Module="In-Commerce" Type="1">Q09E</PHRASE>
+			<PHRASE Label="la_COD_Flat_Surcharge" Module="In-Commerce" Type="1">Q09EIEZsYXQgU3VyY2hhcmdl</PHRASE>
+			<PHRASE Label="la_COD_Percent_Surcharge" Module="In-Commerce" Type="1">Q09EIFBlcmNlbnQgU3VyY2hhcmdl</PHRASE>
+			<PHRASE Label="la_col_AccessDuration" Module="In-Commerce" Type="1">QWNjZXNzIER1cmF0aW9u</PHRASE>
+			<PHRASE Label="la_col_AccessDurationUnit" Module="In-Commerce" Type="1">QWNjZXNzIER1cmF0aW9uIFVuaXQ=</PHRASE>
+			<PHRASE Label="la_col_AddedOn" Module="In-Commerce" Type="1">QWRkZWQgT24=</PHRASE>
+			<PHRASE Label="la_col_AffiliateUser" Module="In-Commerce" Type="1">QWZmaWxpYXRlIFVzZXI=</PHRASE>
+			<PHRASE Label="la_col_AltName" Module="In-Commerce" Type="1">QWx0IFZhbHVl</PHRASE>
+			<PHRASE Label="la_col_Amount" Module="In-Commerce" Type="1">QW1vdW50</PHRASE>
+			<PHRASE Label="la_col_Availability" Module="In-Commerce" Type="1">QXZhaWwu</PHRASE>
+			<PHRASE Label="la_col_BaseFee" Module="In-Commerce" Type="1">QmFzZSBGZWU=</PHRASE>
+			<PHRASE Label="la_col_BuiltIn" Module="In-Commerce" Type="1">QnVpbHQtSW4=</PHRASE>
+			<PHRASE Label="la_col_CODallowed" Module="In-Commerce" Type="1">Q09EIEFsbG93ZWQ=</PHRASE>
+			<PHRASE Label="la_col_Code" Module="In-Commerce" Type="1">Q29kZQ==</PHRASE>
+			<PHRASE Label="la_col_CODFlatSurcharge" Module="In-Commerce" Type="1">Q09EIEZsYXQgU3VyZWNoYXJnZQ==</PHRASE>
+			<PHRASE Label="la_col_CODFlatSurecharge" Module="In-Commerce" Type="1">Q09EIGZsYXQgc3VyZWNoYXJnZQ==</PHRASE>
+			<PHRASE Label="la_col_CODPercentSurcharge" Module="In-Commerce" Type="1">Q09EIFBlcmNlbnQgU3VyY2hhcmdl</PHRASE>
+			<PHRASE Label="la_col_Combination" Module="In-Commerce" Type="1">Q29tYmluYXRpb24=</PHRASE>
+			<PHRASE Label="la_col_Comment" Module="In-Commerce" Type="1">Q29tbWVudA==</PHRASE>
+			<PHRASE Label="la_col_Commission" Module="In-Commerce" Type="1">QWZmaWxsaWF0ZSBDb21taXNzaW9u</PHRASE>
+			<PHRASE Label="la_col_Cost" Module="In-Commerce" Type="1">Q29zdA==</PHRASE>
+			<PHRASE Label="la_col_CouponCode" Module="In-Commerce" Type="1">Q291cG9uIENvZGU=</PHRASE>
+			<PHRASE Label="la_col_CouponItemType" Module="In-Commerce" Type="1">Q291cG9uIEl0ZW0gVHlwZQ==</PHRASE>
+			<PHRASE Label="la_col_CreditCardNumber" Module="In-Commerce" Type="1">Q3JlZGl0IENhcmQgTnVtYmVy</PHRASE>
+			<PHRASE Label="la_col_CurrencyName" Module="In-Commerce" Type="1">TmFtZQ==</PHRASE>
+			<PHRASE Label="la_col_CurrencySymbol" Module="In-Commerce" Type="1">U3ltYm9s</PHRASE>
+			<PHRASE Label="la_col_CurrencySymbolPosition" Module="In-Commerce" Type="1">U3ltYm9sIFBvc2l0aW9u</PHRASE>
+			<PHRASE Label="la_col_CustomerName" Module="In-Commerce" Type="1">Q3VzdG9tZXIgTmFtZQ==</PHRASE>
+			<PHRASE Label="la_col_DisplayOnFront" Module="In-Commerce" Type="1">RGlzcGxheSBPbiBGcm9udA==</PHRASE>
+			<PHRASE Label="la_col_DownloadedFileName" Module="In-Commerce" Type="1">RmlsZW5hbWU=</PHRASE>
+			<PHRASE Label="la_col_DownloadedProductName" Module="In-Commerce" Type="1">UHJvZHVjdCBOYW1l</PHRASE>
+			<PHRASE Label="la_col_End" Module="In-Commerce" Type="1">RW5k</PHRASE>
+			<PHRASE Label="la_col_EndedOn" Module="In-Commerce" Type="1">RW5kZWQgT24=</PHRASE>
+			<PHRASE Label="la_col_Expiration" Module="In-Commerce" Type="1">RXhwaXJhdGlvbg==</PHRASE>
+			<PHRASE Label="la_col_ExtendedPrice" Module="In-Commerce" Type="1">RXh0LiBQcmljZQ==</PHRASE>
+			<PHRASE Label="la_col_FileName" Module="In-Commerce" Type="1">TmFtZQ==</PHRASE>
+			<PHRASE Label="la_col_FilePath" Module="In-Commerce" Type="1">RmlsZW5hbWU=</PHRASE>
+			<PHRASE Label="la_col_FlatSurcharge" Module="In-Commerce" Type="1">RmxhdCBTdXJjaGFyZ2U=</PHRASE>
+			<PHRASE Label="la_col_FromAmount" Module="In-Commerce" Type="1">RnJvbSBBbW91bnQ=</PHRASE>
+			<PHRASE Label="la_col_FromToUser" Module="In-Commerce" Type="1">RnJvbS9UbyBVc2Vy</PHRASE>
+			<PHRASE Label="la_col_FromUser" Module="In-Commerce" Type="1">RnJvbSBVc2Vy</PHRASE>
+			<PHRASE Label="la_col_Group" Module="In-Commerce" Type="1">R3JvdXA=</PHRASE>
+			<PHRASE Label="la_col_IPAddress" Module="In-Commerce" Type="1">SVAgQWRkcmVzcw==</PHRASE>
+			<PHRASE Label="la_col_ISOCode" Module="In-Commerce" Type="1">SVNPIENvZGU=</PHRASE>
+			<PHRASE Label="la_col_ItemName" Module="In-Commerce" Type="1">TmFtZQ==</PHRASE>
+			<PHRASE Label="la_col_ItemType" Module="In-Commerce" Type="1">RGlzY291bnQgSXRlbSBUeXBl</PHRASE>
+			<PHRASE Label="la_col_LastUpdated" Module="In-Commerce" Type="1">TGFzdCBVcGRhdGVk</PHRASE>
+			<PHRASE Label="la_col_LastUsedBy" Module="In-Commerce" Type="1">TGFzdCBVc2VkIEJ5</PHRASE>
+			<PHRASE Label="la_col_LastUsedOn" Module="In-Commerce" Type="1">TGFzdCBVc2VkIE9u</PHRASE>
+			<PHRASE Label="la_col_Listable" Module="In-Commerce" Type="1">TGlzdGFibGU=</PHRASE>
+			<PHRASE Label="la_col_ListingQuantity" Module="In-Commerce" Type="1">TGlzdGluZyBRdHk=</PHRASE>
+			<PHRASE Label="la_col_Manufacturer" Module="In-Commerce" Type="1">TWFudWZhY3R1cmVy</PHRASE>
+			<PHRASE Label="la_col_ManufacturerName" Module="In-Commerce" Type="1">TmFtZQ==</PHRASE>
+			<PHRASE Label="la_col_MaxQty" Module="In-Commerce" Type="1">TWF4IFF0eQ==</PHRASE>
+			<PHRASE Label="la_col_MinQty" Module="In-Commerce" Type="1">TWluIFF0eQ==</PHRASE>
+			<PHRASE Label="la_col_Negotiated" Module="In-Commerce" Type="1">TmVnb3RpYXRlZA==</PHRASE>
+			<PHRASE Label="la_col_NumberOfUses" Module="In-Commerce" Type="1">TnVtYmVyIE9mIFVzZXM=</PHRASE>
+			<PHRASE Label="la_col_OnHold" Module="In-Commerce" Type="1">T24gSG9sZA==</PHRASE>
+			<PHRASE Label="la_col_OnSale" Module="In-Commerce" Type="1">T24gU2FsZQ==</PHRASE>
+			<PHRASE Label="la_col_OptionType" Module="In-Commerce" Type="1">T3B0aW9uIFR5cGU=</PHRASE>
+			<PHRASE Label="la_col_OrderDate" Module="In-Commerce" Type="1">RGF0ZQ==</PHRASE>
+			<PHRASE Label="la_col_OrderIP" Module="In-Commerce" Type="1">SVAgQWRkcmVzcw==</PHRASE>
+			<PHRASE Label="la_col_OrderNumber" Module="In-Commerce" Type="1">TnVtYmVy</PHRASE>
+			<PHRASE Label="la_col_OrderTotal" Module="In-Commerce" Type="1">T3JkZXIgVG90YWw=</PHRASE>
+			<PHRASE Label="la_col_PaymentDate" Module="In-Commerce" Type="1">UGF5bWVudCBEYXRl</PHRASE>
+			<PHRASE Label="la_col_PaymentReference" Module="In-Commerce" Type="1">UGF5bWVudCBSZWZlcmVuY2U=</PHRASE>
+			<PHRASE Label="la_col_PaymentType" Module="In-Commerce" Type="1">UGF5bWVudCBUeXBl</PHRASE>
+			<PHRASE Label="la_col_PaymentTypeName" Module="In-Commerce" Type="1">TmFtZQ==</PHRASE>
+			<PHRASE Label="la_col_Percent" Module="In-Commerce" Type="1">UGVyY2VudA==</PHRASE>
+			<PHRASE Label="la_col_PercentSurcharge" Module="In-Commerce" Type="1">UGVyY2VudCBTdXJjaGFyZ2U=</PHRASE>
+			<PHRASE Label="la_col_PlanName" Module="In-Commerce" Type="1">UGxhbiBOYW1l</PHRASE>
+			<PHRASE Label="la_col_PlanType" Module="In-Commerce" Type="1">UGxhbiBUeXBl</PHRASE>
+			<PHRASE Label="la_col_Points" Module="In-Commerce" Type="1">UG9pbnRz</PHRASE>
+			<PHRASE Label="la_col_Price" Module="In-Commerce" Type="1">UHJpY2U=</PHRASE>
+			<PHRASE Label="la_col_Processing" Module="In-Commerce" Type="1">UHJvY2Vzc2luZw==</PHRASE>
+			<PHRASE Label="la_col_Product" Module="In-Commerce" Type="1">UHJvZHVjdA==</PHRASE>
+			<PHRASE Label="la_col_ProductBackOrderDate" Module="In-Commerce" Type="1">QmFja09yZGVyIERhdGU=</PHRASE>
+			<PHRASE Label="la_col_ProductCreatedOn" Module="In-Commerce" Type="1">Q3JlYXRlZCBPbg==</PHRASE>
+			<PHRASE Label="la_col_ProductName" Module="In-Commerce" Type="1">TmFtZQ==</PHRASE>
+			<PHRASE Label="la_col_ProductNameId" Module="In-Commerce" Type="1">UHJvZHVjdCBOYW1lIChJRCk=</PHRASE>
+			<PHRASE Label="la_col_ProductSKU" Module="In-Commerce" Type="1">U0tV</PHRASE>
+			<PHRASE Label="la_col_ProductType" Module="In-Commerce" Type="1">VHlwZQ==</PHRASE>
+			<PHRASE Label="la_col_ProductWeight" Module="In-Commerce" Type="1">V2VpZ2h0</PHRASE>
+			<PHRASE Label="la_col_Profit" Module="In-Commerce" Type="1">UHJvZml0</PHRASE>
+			<PHRASE Label="la_col_Qty" Module="In-Commerce" Type="0">UXR5</PHRASE>
+			<PHRASE Label="la_col_QtyBackordered" Module="In-Commerce" Type="0">QmFja29yZGVyZWQ=</PHRASE>
+			<PHRASE Label="la_col_QtyInStock" Module="In-Commerce" Type="1">UXR5IEluIFN0b2Nr</PHRASE>
+			<PHRASE Label="la_col_QtyInStockMin" Module="In-Commerce" Type="1">UXR5SW5TdG9ja01pbg==</PHRASE>
+			<PHRASE Label="la_col_QtyOnOrder" Module="In-Commerce" Type="1">UXR5IE9uIE9yZGVy</PHRASE>
+			<PHRASE Label="la_col_QtyReserved" Module="In-Commerce" Type="1">UXR5IFJlc2VydmVk</PHRASE>
+			<PHRASE Label="la_col_Quantity" Module="In-Commerce" Type="1">UXR5Lg==</PHRASE>
+			<PHRASE Label="la_col_QuantityAvailable" Module="In-Commerce" Type="1">QXZhaWwu</PHRASE>
+			<PHRASE Label="la_col_QuantityReserved" Module="In-Commerce" Type="1">UmVzZXJ2ZWQ=</PHRASE>
+			<PHRASE Label="la_col_RateToPrimary" Module="In-Commerce" Type="1">UmF0ZSBUbyBQcmltYXJ5</PHRASE>
+			<PHRASE Label="la_col_RegisteredOn" Module="In-Commerce" Type="1">UmVnaXN0ZXJlZCBPbg==</PHRASE>
+			<PHRASE Label="la_col_RemainingAmount" Module="In-Commerce" Type="1">UmVtYWluaW5nIEFtb3VudA==</PHRASE>
+			<PHRASE Label="la_col_Required" Module="In-Commerce" Type="1">UmVxdWlyZWQ=</PHRASE>
+			<PHRASE Label="la_col_ReturnAmount" Module="In-Commerce" Type="1">UmV0LiBBbW91bnQ=</PHRASE>
+			<PHRASE Label="la_col_ReturnedOn" Module="In-Commerce" Type="1">UmV0LiBEYXRl</PHRASE>
+			<PHRASE Label="la_col_ReturnType" Module="In-Commerce" Type="1">UmV0LiBUeXBl</PHRASE>
+			<PHRASE Label="la_col_Shipping" Module="In-Commerce" Type="1">U2hpcHBpbmc=</PHRASE>
+			<PHRASE Label="la_col_ShippingFromLocation" Module="In-Commerce" Type="1">RnJvbSBMb2NhdGlvbg==</PHRASE>
+			<PHRASE Label="la_col_ShippingName" Module="In-Commerce" Type="1">TmFtZQ==</PHRASE>
+			<PHRASE Label="la_col_ShippingQuoteEngineName" Module="In-Commerce" Type="1">TmFtZQ==</PHRASE>
+			<PHRASE Label="la_col_ShippingType" Module="In-Commerce" Type="1">VHlwZQ==</PHRASE>
+			<PHRASE Label="la_col_Size" Module="In-Commerce" Type="1">U2l6ZQ==</PHRASE>
+			<PHRASE Label="la_col_SKU" Module="In-Commerce" Type="1">U0tV</PHRASE>
+			<PHRASE Label="la_col_Start" Module="In-Commerce" Type="1">U3RhcnQ=</PHRASE>
+			<PHRASE Label="la_col_StartedOn" Module="In-Commerce" Type="1">U3RhcnRlZCBPbg==</PHRASE>
+			<PHRASE Label="la_col_Tax" Module="In-Commerce" Type="1">VGF4</PHRASE>
+			<PHRASE Label="la_col_TaxApplyToProcessing" Module="In-Commerce" Type="1">QXBwbHkgdG8gUHJvY2Vzc2luZw==</PHRASE>
+			<PHRASE Label="la_col_TaxApplyToShipping" Module="In-Commerce" Type="1">QXBwbHkgdG8gU2hpcHBpbmc=</PHRASE>
+			<PHRASE Label="la_col_TaxValue" Module="In-Commerce" Type="1">VGF4IFZhbHVl</PHRASE>
+			<PHRASE Label="la_col_ToAmount" Module="In-Commerce" Type="1">VG8gQW1vdW50</PHRASE>
+			<PHRASE Label="la_col_TotalAmount" Module="In-Commerce" Type="1">VG90YWwgQW1vdW50</PHRASE>
+			<PHRASE Label="la_col_UnitsLimit" Module="In-Commerce" Type="1">TGltaXQ=</PHRASE>
+			<PHRASE Label="la_col_URL" Module="In-Commerce" Type="1">VVJM</PHRASE>
+			<PHRASE Label="la_col_Weight" Module="In-Commerce" Type="1">V2VpZ2h0</PHRASE>
+			<PHRASE Label="la_col_ZoneName" Module="In-Commerce" Type="1">Wm9uZSBuYW1l</PHRASE>
+			<PHRASE Label="la_col_ZoneType" Module="In-Commerce" Type="1">Wm9uZSBUeXBl</PHRASE>
+			<PHRASE Label="la_Combined" Module="In-Commerce" Type="1">Q29tYmluZWQ=</PHRASE>
+			<PHRASE Label="la_comment_LeaveBlank" Module="In-Commerce" Type="1">KGxlYXZlIGJsYW5rIGZvciB1bmxpbWl0ZWQp</PHRASE>
+			<PHRASE Label="la_comm_Any" Module="In-Commerce" Type="1">QW55</PHRASE>
+			<PHRASE Label="la_comm_OrderContents" Module="In-Commerce" Type="1">T3JkZXIgQ29udGVudHM=</PHRASE>
+			<PHRASE Label="la_comm_ProductsByManuf" Module="In-Commerce" Type="0">UHJvZHVjdHMgYnkgbWFudWZhY3R1cmVy</PHRASE>
+			<PHRASE Label="la_comm_ShippingBillingInfo" Module="In-Commerce" Type="1">U2hpcHBpbmcgJiBCaWxsaW5nIEluZm9ybWF0aW9u</PHRASE>
+			<PHRASE Label="la_comm_Timeframe" Module="In-Commerce" Type="1">VGltZWZyYW1l</PHRASE>
+			<PHRASE Label="la_config_ShowProductImagesInOrders" Module="In-Commerce" Type="1">U2hvdyBQcm9kdWN0IEltYWdlcyBpbiBPcmRlcnM=</PHRASE>
+			<PHRASE Label="la_conf_DaysToBeNew" Module="In-Commerce" Type="1">TnVtYmVyIG9mIGRheXMgZm9yIGEgcHJvZHVjdCB0byBiZSBOZXc=</PHRASE>
+			<PHRASE Label="la_conf_DefaultCouponDuration" Module="In-Commerce" Type="1">RGVmYXVsdCBjb3Vwb24gZHVyYXRpb24gKGRheXMp</PHRASE>
+			<PHRASE Label="la_conf_EditorPicksAboveRegular" Module="In-Commerce" Type="1">RGlzcGxheSBFZGl0b3IgUGlja3MgYWJvdmUgcmVndWxhciBwcm9kdWN0cw==</PHRASE>
+			<PHRASE Label="la_conf_OrderProductsBy" Module="In-Commerce" Type="1">T3JkZXIgcHJvZHVjdHMgYnk=</PHRASE>
+			<PHRASE Label="la_conf_ThenBy" Module="In-Commerce" Type="1">VGhlbiBCeQ==</PHRASE>
+			<PHRASE Label="la_COP" Module="In-Commerce" Type="1">Q29sb21iaWFuIFBlc28=</PHRASE>
+			<PHRASE Label="la_COU" Module="In-Commerce" Type="1">Q09V</PHRASE>
+			<PHRASE Label="la_couldnt_retrieve_rate" Module="In-Commerce" Type="1">Q291bGRuJ3QgcmV0cmlldmUgY3VycmVuY3kgcmF0ZSE=</PHRASE>
+			<PHRASE Label="la_Country" Module="In-Commerce" Type="1">Q291bnRyeQ==</PHRASE>
+			<PHRASE Label="la_CouponCode" Module="In-Commerce" Type="1">Q291cG9uIENvZGU=</PHRASE>
+			<PHRASE Label="la_CRC" Module="In-Commerce" Type="1">Q29zdGEgUmljYW4gQ29sb24=</PHRASE>
+			<PHRASE Label="la_CreditDirect" Module="In-Commerce" Type="1">Q3JlZGl0IERpcmVjdA==</PHRASE>
+			<PHRASE Label="la_CreditPreAuthorize" Module="In-Commerce" Type="1">Q3JlZGl0IFByZS1BdXRob3JpemU=</PHRASE>
+			<PHRASE Label="la_CSD" Module="In-Commerce" Type="1">Q1NE</PHRASE>
+			<PHRASE Label="la_CUP" Module="In-Commerce" Type="1">Q3ViYW4gUGVzbw==</PHRASE>
+			<PHRASE Label="la_CVE" Module="In-Commerce" Type="1">Q2FwZSBWZXJkZSBFc2N1ZG8=</PHRASE>
+			<PHRASE Label="la_CYP" Module="In-Commerce" Type="1">Q3lwcnVzIFBvdW5k</PHRASE>
+			<PHRASE Label="la_CZK" Module="In-Commerce" Type="1">Q3plY2ggS29ydW5h</PHRASE>
+			<PHRASE Label="la_day" Module="In-Commerce" Type="1">ZGF5</PHRASE>
+			<PHRASE Label="la_Denied" Module="In-Commerce" Type="1">RGVuaWVk</PHRASE>
+			<PHRASE Label="la_Details" Module="In-Commerce" Type="1">VmlldyBEZXRhaWxz</PHRASE>
+			<PHRASE Label="la_Discount" Module="In-Commerce" Type="1">RGlzY291bnQ=</PHRASE>
+			<PHRASE Label="la_DJF" Module="In-Commerce" Type="1">RGppYm91dGkgRnJhbmM=</PHRASE>
+			<PHRASE Label="la_DKK" Module="In-Commerce" Type="1">RGFuaXNoIEtyb25l</PHRASE>
+			<PHRASE Label="la_DOP" Module="In-Commerce" Type="1">RG9taW5pY2FuIFBlc28=</PHRASE>
+			<PHRASE Label="la_DZD" Module="In-Commerce" Type="1">QWxnZXJpYW4gRGluYXI=</PHRASE>
+			<PHRASE Label="la_ECS" Module="In-Commerce" Type="1">U3VjcmU=</PHRASE>
+			<PHRASE Label="la_ECV" Module="In-Commerce" Type="1">VW5pZGFkIGRlIFZhbG9yIENvbnN0YW50ZSAoVVZDKQ==</PHRASE>
+			<PHRASE Label="la_Edit_User" Module="In-Commerce" Type="1">RWRpdCBVc2Vy</PHRASE>
+			<PHRASE Label="la_EEK" Module="In-Commerce" Type="1">S3Jvb24=</PHRASE>
+			<PHRASE Label="la_EGP" Module="In-Commerce" Type="1">RWd5cHRpYW4gUG91bmQ=</PHRASE>
+			<PHRASE Label="la_EnableBackorderAvailabilityDate" Module="In-Commerce" Type="1">RW5hYmxlIGJhY2tvcmRlciBhdmFpbGFiaWxpdHkgZGF0ZQ==</PHRASE>
+			<PHRASE Label="la_EnableBackordering" Module="In-Commerce" Type="1">RW5hYmxlIEJhY2tvcmRlcmluZw==</PHRASE>
+			<PHRASE Label="la_enable_html" Module="In-Commerce" Type="1">RW5hYmxlIEhUTUw/</PHRASE>
+			<PHRASE Label="la_EnterNumberOfCopies" Module="In-Commerce" Type="1">TnVtYmVyIE9mIENvcGllcw==</PHRASE>
+			<PHRASE Label="la_EntireOrderConfirmation" Module="In-Commerce" Type="1">VGhpcyB3aWxsIHJlbW92ZSBhbGwgc2VsZWN0ZWQgcHJvZHVjdHMhIEFyZSB5b3Ugc3VyZT8=</PHRASE>
+			<PHRASE Label="la_ERN" Module="In-Commerce" Type="1">TmFrZmE=</PHRASE>
+			<PHRASE Label="la_error_CannotDeletePaymentType" Module="In-Commerce" Type="1">VGhlIHByaW1hcnkgcGF5bWVudCB0eXBlIGNhbm5vdCBiZSBkZWxldGVkIQ==</PHRASE>
+			<PHRASE Label="la_error_EnableCurlFirst" Module="In-Commerce" Type="1">RW5hYmxlIENVUkwgZmlyc3Q=</PHRASE>
+			<PHRASE Label="la_error_FillInShippingFromAddress" Module="In-Commerce" Type="1">RmlsbCBpbiBTaGlwcGluZyBGcm9tIGFkZHJlc3MgaW4gQ29udGFjdCBJbmZvcm1hdGlvbiBiZWZvcmUgZW5hYmxpbmcgSW50ZXJzaGlwcGVy</PHRASE>
+			<PHRASE Label="la_ETB" Module="In-Commerce" Type="1">RXRoaW9waWFuIEJpcnI=</PHRASE>
+			<PHRASE Label="la_EUR" Module="In-Commerce" Type="1">RXVybw==</PHRASE>
+			<PHRASE Label="la_EuropeanCentralBank" Module="In-Commerce" Type="1">RXVyb3BlYW4gQ2VudHJhbCBCYW5rIC0gd3d3LmVjYi5pbnQ=</PHRASE>
+			<PHRASE Label="la_event_prod_affiliate.payment" Module="In-Commerce" Type="1">QWZmaWxpYXRlIHBheW1lbnQgaXNzdWVk</PHRASE>
+			<PHRASE Label="la_event_prod_affiliate.payment_type_changed" Module="In-Commerce" Type="1">QWZmaWxpYXRlIHBheW1lbnQgdHlwZSBjaGFuZ2Vk</PHRASE>
+			<PHRASE Label="la_event_prod_affiliate.register" Module="In-Commerce" Type="1">QWZmaWxpYXRlIHJlZ2lzdGVyZWQ=</PHRASE>
+			<PHRASE Label="la_event_prod_affiliate.registration_approved" Module="In-Commerce" Type="1">QWZmaWxpYXRlIHJlZ2lzdHJhdGlvbiBhcHByb3ZlZA==</PHRASE>
+			<PHRASE Label="la_event_prod_affiliate.registration_denied" Module="In-Commerce" Type="1">QWZmaWxpYXRlIHJlZ2lzdHJhdGlvbiBkZW5pZWQ=</PHRASE>
+			<PHRASE Label="la_event_prod_backorder.add" Module="In-Commerce" Type="1">QmFja29yZGVyIEFkZGVk</PHRASE>
+			<PHRASE Label="la_event_prod_backorder.fullfill" Module="In-Commerce" Type="1">QmFja29yZGVyIEZ1bGxmaWxsZWQ=</PHRASE>
+			<PHRASE Label="la_event_prod_backorder.process" Module="In-Commerce" Type="1">QmFja29yZGVyIFByb2Nlc3NlZA==</PHRASE>
+			<PHRASE Label="la_event_prod_order.approve" Module="In-Commerce" Type="1">T3JkZXIgQXBwcm92ZWQ=</PHRASE>
+			<PHRASE Label="la_event_prod_order.deny" Module="In-Commerce" Type="1">T3JkZXIgRGVuaWVk</PHRASE>
+			<PHRASE Label="la_event_prod_order.ship" Module="In-Commerce" Type="1">T3JkZXIgU2hpcHBlZA==</PHRASE>
+			<PHRASE Label="la_event_prod_order.submit" Module="In-Commerce" Type="1">T3JkZXIgU3VibWl0dGVk</PHRASE>
+			<PHRASE Label="la_event_user.GiftCertificate" Module="In-Commerce" Type="1">R2lmdCBDZXJ0aWZpY2F0ZQ==</PHRASE>
+			<PHRASE Label="la_event_user.suggest_product" Module="In-Commerce" Type="1">U3VnZ2VzdCBwcm9kdWN0IHRvIGEgZnJpZW5k</PHRASE>
+			<PHRASE Label="la_event_user.suggest_site" Module="In-Commerce" Type="1">U3VnZ2VzdCBzaXRlIHRvIGEgZnJpZW5k</PHRASE>
+			<PHRASE Label="la_ExchangeRateSource" Module="In-Commerce" Type="1">Q2hvb3NlIHRoZSBleGNoYW5nZSByYXRlIHNvdXJjZQ==</PHRASE>
+			<PHRASE Label="la_Expiration" Module="In-Commerce" Type="1">RXhwaXJhdGlvbg==</PHRASE>
+			<PHRASE Label="la_Features" Module="In-Commerce" Type="1">RmVhdHVyZXM=</PHRASE>
+			<PHRASE Label="la_FederalReserveBank" Module="In-Commerce" Type="1">RmVkZXJhbCBSZXNlcnZlIEJhbmsgb2YgTmV3IFlvcmsgLSB3d3cubnkuZnJiLm9yZw==</PHRASE>
+			<PHRASE Label="la_FJD" Module="In-Commerce" Type="1">RmlqaSBEb2xsYXI=</PHRASE>
+			<PHRASE Label="la_FKP" Module="In-Commerce" Type="1">RmFsa2xhbmQgSXNsYW5kcyBQb3VuZA==</PHRASE>
+			<PHRASE Label="la_Flat" Module="In-Commerce" Type="1">RmxhdA==</PHRASE>
+			<PHRASE Label="la_fld_AccessDuration" Module="In-Commerce" Type="1">QWNjZXNzIER1cmF0aW9u</PHRASE>
+			<PHRASE Label="la_fld_AccessDurationType" Module="In-Commerce" Type="1">QWNjZXNzIER1cmF0aW9uIFR5cGU=</PHRASE>
+			<PHRASE Label="la_fld_AccessDurationUnit" Module="In-Commerce" Type="1">QWNjZXNzIER1cmF0aW9uIFVuaXQ=</PHRASE>
+			<PHRASE Label="la_fld_AccessEnd" Module="In-Commerce" Type="1">QWNjZXNzIEVuZA==</PHRASE>
+			<PHRASE Label="la_fld_AccessGroup" Module="In-Commerce" Type="1">QWNjZXNzIEdyb3Vw</PHRASE>
+			<PHRASE Label="la_fld_AccessStart" Module="In-Commerce" Type="1">QWNjZXNzIFN0YXJ0</PHRASE>
+			<PHRASE Label="la_fld_AccumulatedAmount" Module="In-Commerce" Type="1">QWNjdW11bGF0ZWQgQW1vdW50</PHRASE>
+			<PHRASE Label="la_fld_AddedOn" Module="In-Commerce" Type="1">QWRkZWQgT24=</PHRASE>
+			<PHRASE Label="la_fld_Address1" Module="In-Commerce" Type="1">QWRkcmVzcyBMaW5lIDE=</PHRASE>
+			<PHRASE Label="la_fld_Address2" Module="In-Commerce" Type="1">QWRkcmVzcyBMaW5lIDI=</PHRASE>
+			<PHRASE Label="la_fld_AdminComment" Module="In-Commerce" Type="1">QWRtaW4gQ29tbWVudA==</PHRASE>
+			<PHRASE Label="la_fld_AdminComments" Module="In-Commerce" Type="1">QWRtaW4gQ29tbWVudHM=</PHRASE>
+			<PHRASE Label="la_fld_AffiliateCode" Module="In-Commerce" Type="1">QWZmaWxpYXRlIENvZGU=</PHRASE>
+			<PHRASE Label="la_fld_AffiliateCommission" Module="In-Commerce" Type="1">QWZmaWxpYXRlIENvbW1pc3Npb24=</PHRASE>
+			<PHRASE Label="la_fld_AffiliateLink" Module="In-Commerce" Type="1">QWZmaWxpYXRlIExpbms=</PHRASE>
+			<PHRASE Label="la_fld_AffiliatePlan" Module="In-Commerce" Type="1">QWZmaWxpYXRlIFBsYW4=</PHRASE>
+			<PHRASE Label="la_fld_AffiliatePlanPayment" Module="In-Commerce" Type="1">UGF5bWVudA==</PHRASE>
+			<PHRASE Label="la_fld_AffiliateUser" Module="In-Commerce" Type="1">QWZmaWxpYXRlIFVzZXI=</PHRASE>
+			<PHRASE Label="la_fld_AllowedShippingTypes" Module="In-Commerce" Type="1">U2VsZWN0ZWQ=</PHRASE>
+			<PHRASE Label="la_fld_Amount" Module="In-Commerce" Type="1">QW1vdW50</PHRASE>
+			<PHRASE Label="la_fld_AmountToPay" Module="In-Commerce" Type="1">QW1vdW50IFRvIFBheQ==</PHRASE>
+			<PHRASE Label="la_fld_AssignedCoupon" Module="In-Commerce" Type="1">QXNzaWduZWQgQ291cG9u</PHRASE>
+			<PHRASE Label="la_fld_AuthorizationResult" Module="In-Commerce" Type="1">QXV0aG9yaXphdGlvbiBSZXN1bHQ=</PHRASE>
+			<PHRASE Label="la_fld_Availability" Module="In-Commerce" Type="1">QXZhaWxhYmxl</PHRASE>
+			<PHRASE Label="la_fld_AvailableGroups" Module="In-Commerce" Type="1">QXZhaWxhYmxlIFVzZXIgR3JvdXBz</PHRASE>
+			<PHRASE Label="la_fld_AvailableShippingTypes" Module="In-Commerce" Type="1">QXZhaWxhYmxl</PHRASE>
+			<PHRASE Label="la_fld_BackOrder" Module="In-Commerce" Type="1">QmFja09yZGVy</PHRASE>
+			<PHRASE Label="la_fld_BackOrderDate" Module="In-Commerce" Type="1">QmFja29yZGVyIGF2YWlsYWJpbGl0eSBkYXRl</PHRASE>
+			<PHRASE Label="la_fld_BaseFee" Module="In-Commerce" Type="1">QmFzZSBGZWU=</PHRASE>
+			<PHRASE Label="la_fld_BillingAddress1" Module="In-Commerce" Type="1">QmlsbGluZyBBZGRyZXNzIExpbmUgMQ==</PHRASE>
+			<PHRASE Label="la_fld_BillingAddress2" Module="In-Commerce" Type="1">QmlsbGluZyBBZGRyZXNzIExpbmUgMg==</PHRASE>
+			<PHRASE Label="la_fld_BillingCity" Module="In-Commerce" Type="1">QmlsbGluZyBDaXR5</PHRASE>
+			<PHRASE Label="la_fld_BillingCompany" Module="In-Commerce" Type="1">QmlsbGluZyBDb21wYW55</PHRASE>
+			<PHRASE Label="la_fld_BillingCountry" Module="In-Commerce" Type="1">QmlsbGluZyBDb3VudHJ5</PHRASE>
+			<PHRASE Label="la_fld_BillingEmail" Module="In-Commerce" Type="1">QmlsbGluZyBFbWFpbA==</PHRASE>
+			<PHRASE Label="la_fld_BillingFax" Module="In-Commerce" Type="1">QmlsbGluZyBGYXg=</PHRASE>
+			<PHRASE Label="la_fld_BillingPhone" Module="In-Commerce" Type="1">QmlsbGluZyBQaG9uZQ==</PHRASE>
+			<PHRASE Label="la_fld_BillingState" Module="In-Commerce" Type="1">QmlsbGluZyBTdGF0ZQ==</PHRASE>
+			<PHRASE Label="la_fld_BillingTo" Module="In-Commerce" Type="1">QmlsbGluZyBUbw==</PHRASE>
+			<PHRASE Label="la_fld_BillingZip" Module="In-Commerce" Type="1">QmlsbGluZyBaaXBjb2Rl</PHRASE>
+			<PHRASE Label="la_fld_BlockShippingAddress" Module="In-Commerce" Type="1">QmxvY2sgU2hpcHBpbmcgQWRkcmVzcyBFZGl0aW5n</PHRASE>
+			<PHRASE Label="la_fld_CaptureResult" Module="In-Commerce" Type="1">Q2FwdHVyZSBSZXN1bHQ=</PHRASE>
+			<PHRASE Label="la_fld_ChargeOnNextApprove" Module="In-Commerce" Type="1">Q2hhcmdlIG9uIE5leHQgQXBwcm92ZQ==</PHRASE>
+			<PHRASE Label="la_fld_CODallowed" Module="In-Commerce" Type="1">Q09EIEFsbG93ZWQ=</PHRASE>
+			<PHRASE Label="la_fld_Code" Module="In-Commerce" Type="1">Q29kZQ==</PHRASE>
+			<PHRASE Label="la_fld_CODFlatSurcharge" Module="In-Commerce" Type="1">Q09EIEZsYXQgU3VyY2hhcmdl</PHRASE>
+			<PHRASE Label="la_fld_CODPercentSurcharge" Module="In-Commerce" Type="1">Q09EIFBlcmNlbnQgU3VyY2hhcmdl</PHRASE>
+			<PHRASE Label="la_fld_Comment" Module="In-Commerce" Type="1">Q29tbWVudA==</PHRASE>
+			<PHRASE Label="la_fld_Cost" Module="In-Commerce" Type="1">Q29zdA==</PHRASE>
+			<PHRASE Label="la_fld_CostType" Module="In-Commerce" Type="1">Q29zdCBUeXBl</PHRASE>
+			<PHRASE Label="la_fld_CouponCode" Module="In-Commerce" Type="1">Q291cG9uIENvZGU=</PHRASE>
+			<PHRASE Label="la_fld_CreditCardNumber" Module="In-Commerce" Type="1">Q3JlZGl0IENhcmQgTnVtYmVy</PHRASE>
+			<PHRASE Label="la_fld_CurrencyName" Module="In-Commerce" Type="1">TmFtZQ==</PHRASE>
+			<PHRASE Label="la_fld_CurrencySymbol" Module="In-Commerce" Type="1">U3ltYm9s</PHRASE>
+			<PHRASE Label="la_fld_CurrencySymbolPosition" Module="In-Commerce" Type="1">U3ltYm9sIFBvc2l0aW9u</PHRASE>
+			<PHRASE Label="la_fld_cust_p_ItemTemplate" Module="In-Commerce" Type="1">UHJvZHVjdCBJdGVtIFRlbXBsYXRl</PHRASE>
+			<PHRASE Label="la_fld_Date" Module="In-Commerce" Type="1">RGF0ZQ==</PHRASE>
+			<PHRASE Label="la_fld_DeliveryMethod" Module="In-Commerce" Type="1">RGVsaXZlcnkgTWV0aG9k</PHRASE>
+			<PHRASE Label="la_fld_DescriptionExcerpt" Module="In-Commerce" Type="1">RXhjZXJwdA==</PHRASE>
+			<PHRASE Label="la_fld_Discount" Module="In-Commerce" Type="1">RGlzY291bnQ=</PHRASE>
+			<PHRASE Label="la_fld_DisplayOnFront" Module="In-Commerce" Type="1">RGlzcGxheSBPbiBGcm9udA==</PHRASE>
+			<PHRASE Label="la_fld_EmptyCellsAre" Module="In-Commerce" Type="1">RW1wdHkgQ2VsbHMgQXJl</PHRASE>
+			<PHRASE Label="la_fld_End" Module="In-Commerce" Type="1">RW5kIERhdGU=</PHRASE>
+			<PHRASE Label="la_fld_Expiration" Module="In-Commerce" Type="1">RXhwaXJhdGlvbg==</PHRASE>
+			<PHRASE Label="la_fld_Featured" Module="In-Commerce" Type="1">RmVhdHVyZWQ=</PHRASE>
+			<PHRASE Label="la_fld_FilePath" Module="In-Commerce" Type="1">RmlsZQ==</PHRASE>
+			<PHRASE Label="la_fld_FirstDayDelivery" Module="In-Commerce" Type="1">Rmlyc3QgRGF5</PHRASE>
+			<PHRASE Label="la_fld_FlatSurcharge" Module="In-Commerce" Type="1">RmxhdCBTdXJjaGFyZ2U=</PHRASE>
+			<PHRASE Label="la_fld_FreeShippingMinAmount" Module="In-Commerce" Type="1">TWluaW11bSBPcmRlciBUb3RhbCBmb3IgRnJlZSBTaGlwcGluZw==</PHRASE>
+			<PHRASE Label="la_fld_From" Module="In-Commerce" Type="1">RnJvbQ==</PHRASE>
+			<PHRASE Label="la_fld_FromAmount" Module="In-Commerce" Type="1">RnJvbSBBbW91bnQ=</PHRASE>
+			<PHRASE Label="la_fld_FromDateTime" Module="In-Commerce" Type="1">RnJvbSBkYXRlL3RpbWU=</PHRASE>
+			<PHRASE Label="la_fld_Gateway" Module="In-Commerce" Type="1">R2F0ZXdheQ==</PHRASE>
+			<PHRASE Label="la_fld_GroundDelivery" Module="In-Commerce" Type="1">R3JvdW5kIERlbGl2ZXJ5</PHRASE>
+			<PHRASE Label="la_fld_Group" Module="In-Commerce" Type="1">VXNlciBHcm91cA==</PHRASE>
+			<PHRASE Label="la_fld_Groups" Module="In-Commerce" Type="1">VXNlciBHcm91cHMgU2VsZWN0aW9u</PHRASE>
+			<PHRASE Label="la_fld_Instructions" Module="In-Commerce" Type="1">SW5zdHJ1Y3Rpb25z</PHRASE>
+			<PHRASE Label="la_fld_InsuranceFee" Module="In-Commerce" Type="1">SW5zdXJhbmNlIENvc3Q=</PHRASE>
+			<PHRASE Label="la_fld_Insurance_Fee" Module="In-Commerce" Type="1">SW5zdXJhbmNlIENvc3Q=</PHRASE>
+			<PHRASE Label="la_fld_Insurance_Type" Module="In-Commerce" Type="1">SW5zdXJhbmNlIFR5cGU=</PHRASE>
+			<PHRASE Label="la_fld_InventoryStatus" Module="In-Commerce" Type="1">RW5hYmxlZA==</PHRASE>
+			<PHRASE Label="la_fld_IsFreePromoShipping" Module="In-Commerce" Type="1">VXNlIGFzIEZyZWUgUHJvbW8gU2hpcHBpbmc=</PHRASE>
+			<PHRASE Label="la_fld_ISOCode" Module="In-Commerce" Type="1">SVNPIENvZGU=</PHRASE>
+			<PHRASE Label="la_fld_IsRecurringBilling" Module="In-Commerce" Type="1">UmVjdXJyaW5nIEJpbGxpbmc=</PHRASE>
+			<PHRASE Label="la_fld_ItemsSold" Module="In-Commerce" Type="1">SXRlbXMgU29sZA==</PHRASE>
+			<PHRASE Label="la_fld_LastPaymentDate" Module="In-Commerce" Type="1">TGFzdCBQYXltZW50IERhdGU=</PHRASE>
+			<PHRASE Label="la_fld_LastUsedBy" Module="In-Commerce" Type="1">TGFzdCBVc2VkIEJ5</PHRASE>
+			<PHRASE Label="la_fld_LastUsedOn" Module="In-Commerce" Type="1">TGFzdCBVc2VkIE9u</PHRASE>
+			<PHRASE Label="la_fld_Listable" Module="In-Commerce" Type="1">TGlzdGFibGU=</PHRASE>
+			<PHRASE Label="la_fld_ManageCombinations" Module="In-Commerce" Type="1">TWFuYWdlIE9wdGlvbnMgQ29tYmluYXRpb25z</PHRASE>
+			<PHRASE Label="la_fld_ManageShipping" Module="In-Commerce" Type="1">TWFuYWdlIFNoaXBwaW5nIFR5cGVz</PHRASE>
+			<PHRASE Label="la_fld_Manufacturer" Module="In-Commerce" Type="1">TWFudWZhY3R1cmVy</PHRASE>
+			<PHRASE Label="la_fld_MaxQty" Module="In-Commerce" Type="1">TWF4IFF0eQ==</PHRASE>
+			<PHRASE Label="la_fld_MinimumPaymentAmount" Module="In-Commerce" Type="1">TWluaW1hbCBQYXltZW50IEFtb3VudA==</PHRASE>
+			<PHRASE Label="la_fld_MinQty" Module="In-Commerce" Type="1">TWluIFF0eQ==</PHRASE>
+			<PHRASE Label="la_fld_MSRP" Module="In-Commerce" Type="1">TVNSUA==</PHRASE>
+			<PHRASE Label="la_fld_Negotiated" Module="In-Commerce" Type="1">TmVnb3RpYXRlZA==</PHRASE>
+			<PHRASE Label="la_fld_NextCharge" Module="In-Commerce" Type="1">TmV4dCBDaGFyZ2UgRGF0ZQ==</PHRASE>
+			<PHRASE Label="la_fld_NumberOfUses" Module="In-Commerce" Type="1">TnVtYmVyIE9mIFVzZXM=</PHRASE>
+			<PHRASE Label="la_fld_OnHold" Module="In-Commerce" Type="1">T24gSG9sZA==</PHRASE>
+			<PHRASE Label="la_fld_OnSale" Module="In-Commerce" Type="1">UHJvZHVjdCBvbiBTYWxl</PHRASE>
+			<PHRASE Label="la_fld_OptionPrice" Module="In-Commerce" Type="1">T3B0aW9uIFByaWNl</PHRASE>
+			<PHRASE Label="la_fld_OptionsSelectionMode" Module="In-Commerce" Type="1">T3B0aW9ucyBTZWxlY3Rpb24gTW9kZQ==</PHRASE>
+			<PHRASE Label="la_fld_OptionType" Module="In-Commerce" Type="1">T3B0aW9uIFR5cGU=</PHRASE>
+			<PHRASE Label="la_fld_OptionValue" Module="In-Commerce" Type="1">T3B0aW9uIFZhbHVl</PHRASE>
+			<PHRASE Label="la_fld_OrderId" Module="In-Commerce" Type="1">T3JkZXIgSUQ=</PHRASE>
+			<PHRASE Label="la_fld_OrderIP" Module="In-Commerce" Type="1">SVAgQWRkcmVzcw==</PHRASE>
+			<PHRASE Label="la_fld_OrderNumber" Module="In-Commerce" Type="1">TnVtYmVy</PHRASE>
+			<PHRASE Label="la_fld_Original" Module="In-Commerce" Type="1">T3JpZ2luYWw=</PHRASE>
+			<PHRASE Label="la_fld_OriginalAmount" Module="In-Commerce" Type="1">T3JpZ2luYWwgQW1vdW50</PHRASE>
+			<PHRASE Label="la_fld_PaymentAccount" Module="In-Commerce" Type="1">UGF5bWVudCBBY2NvdW50</PHRASE>
+			<PHRASE Label="la_fld_PaymentCardType" Module="In-Commerce" Type="1">Q2FyZCBUeXBl</PHRASE>
+			<PHRASE Label="la_fld_PaymentCCExpDate" Module="In-Commerce" Type="1">Q2FyZCBFeHBpcmF0aW9u</PHRASE>
+			<PHRASE Label="la_fld_PaymentCVV2" Module="In-Commerce" Type="1">Q1ZWMg==</PHRASE>
+			<PHRASE Label="la_fld_PaymentDate" Module="In-Commerce" Type="1">UGF5bWVudCBEYXRl</PHRASE>
+			<PHRASE Label="la_fld_PaymentExpires" Module="In-Commerce" Type="1">UGF5bWVudCBEYXRlL0V4cGlyYXRpb24=</PHRASE>
+			<PHRASE Label="la_fld_PaymentInterval" Module="In-Commerce" Type="1">UGF5bWVudCBJbnRlcnZhbA==</PHRASE>
+			<PHRASE Label="la_fld_PaymentNameOnCard" Module="In-Commerce" Type="1">TmFtZSBvbiB0aGUgQ2FyZA==</PHRASE>
+			<PHRASE Label="la_fld_PaymentReference" Module="In-Commerce" Type="1">UGF5bWVudCBSZWZlcmVuY2U=</PHRASE>
+			<PHRASE Label="la_fld_PaymentType" Module="In-Commerce" Type="1">UGF5bWVudCBUeXBl</PHRASE>
+			<PHRASE Label="la_fld_PaymentTypeCurrencies" Module="In-Commerce" Type="1">QXZhaWxhYmxlIEN1cnJlbmNpZXM=</PHRASE>
+			<PHRASE Label="la_fld_PaymentTypeId" Module="In-Commerce" Type="1">UGF5bWVudCBUeXBlIElk</PHRASE>
+			<PHRASE Label="la_fld_PercentSurcharge" Module="In-Commerce" Type="1">UGVyY2VudCBTdXJjaGFyZ2U=</PHRASE>
+			<PHRASE Label="la_fld_Period" Module="In-Commerce" Type="1">UGVyaW9k</PHRASE>
+			<PHRASE Label="la_fld_PlacedOrdersEdit" Module="In-Commerce" Type="1">QWxsb3cgUGxhY2VkIE9yZGVycyBFZGl0aW5n</PHRASE>
+			<PHRASE Label="la_fld_PlanType" Module="In-Commerce" Type="1">UGxhbiBUeXBl</PHRASE>
+			<PHRASE Label="la_fld_Points" Module="In-Commerce" Type="1">UG9pbnRz</PHRASE>
+			<PHRASE Label="la_fld_Price" Module="In-Commerce" Type="1">UHJpY2U=</PHRASE>
+			<PHRASE Label="la_fld_PriceType" Module="In-Commerce" Type="1">UHJpY2UgTW9kaWZpZXIgVHlwZQ==</PHRASE>
+			<PHRASE Label="la_fld_ProcessingFee" Module="In-Commerce" Type="1">UHJvY2Vzc2luZyBGZWU=</PHRASE>
+			<PHRASE Label="la_fld_ProductFreeShipping" Module="In-Commerce" Type="1">TWluaW11bSBxdWFudGl0eSBmb3IgRnJlZSBTaGlwcGluZw==</PHRASE>
+			<PHRASE Label="la_fld_ProductType" Module="In-Commerce" Type="1">UHJvZHVjdCBUeXBl</PHRASE>
+			<PHRASE Label="la_fld_Product_MaxHotNumber" Module="In-Commerce" Type="1">TWF4aW11bSBudW1iZXIgb2YgVG9wIFNlbGxlciBpdGVtcw==</PHRASE>
+			<PHRASE Label="la_fld_Product_MinPopRating" Module="In-Commerce" Type="1">TWluaW11bSByYXRpbmcgdG8gY29uc2lkZXIgaXRlbSBQT1A=</PHRASE>
+			<PHRASE Label="la_fld_Product_MinPopVotes" Module="In-Commerce" Type="1">TWluaW11bSBudW1iZXIgb2Ygc29sZCBpdGVtcyB0byBjb25zaWRlciBpdGVtIFBPUA==</PHRASE>
+			<PHRASE Label="la_fld_Qty" Module="In-Commerce" Type="1">UXVhbnRpdHk=</PHRASE>
+			<PHRASE Label="la_fld_QtyBackOrdered" Module="In-Commerce" Type="1">UXR5IEJhY2tPcmRlcmVk</PHRASE>
+			<PHRASE Label="la_fld_QtyInStock" Module="In-Commerce" Type="1">UXR5IEluIFN0b2Nr</PHRASE>
+			<PHRASE Label="la_fld_QtyInStockMin" Module="In-Commerce" Type="1">TWluaW11bSBxdWFudGl0eSBpbiBzdG9jayB0aHJlc2hvbGQ=</PHRASE>
+			<PHRASE Label="la_fld_QtyOnOrder" Module="In-Commerce" Type="1">UXR5IE9uIE9yZGVy</PHRASE>
+			<PHRASE Label="la_fld_QtyReserved" Module="In-Commerce" Type="1">UXR5IFJlc2VydmVk</PHRASE>
+			<PHRASE Label="la_fld_QtySold" Module="In-Commerce" Type="1">UXR5IFNvbGQ=</PHRASE>
+			<PHRASE Label="la_fld_RateToPrimary" Module="In-Commerce" Type="1">UmF0ZSBUbyBQcmltYXJ5</PHRASE>
+			<PHRASE Label="la_fld_RecipientName" Module="In-Commerce" Type="1">UmVjaXBpZW50J3MgTmFtZQ==</PHRASE>
+			<PHRASE Label="la_fld_RegisteredOn" Module="In-Commerce" Type="1">UmVnaXN0ZXJlZCBPbg==</PHRASE>
+			<PHRASE Label="la_fld_RemainingAmount" Module="In-Commerce" Type="1">UmVtYWluaW5nIEFtb3VudA==</PHRASE>
+			<PHRASE Label="la_fld_ReportType" Module="In-Commerce" Type="1">UmVwb3J0IFR5cGU=</PHRASE>
+			<PHRASE Label="la_fld_SecondDayDelivery" Module="In-Commerce" Type="1">U2Vjb25kIERheQ==</PHRASE>
+			<PHRASE Label="la_fld_SelectedGroups" Module="In-Commerce" Type="1">U2VsZWN0ZWQgVXNlciBHcm91cHM=</PHRASE>
+			<PHRASE Label="la_fld_SenderName" Module="In-Commerce" Type="1">U2VuZGVyJ3MgTmFtZQ==</PHRASE>
+			<PHRASE Label="la_fld_ShipMethod" Module="In-Commerce" Type="1">U2hpcCBNZXRob2Q=</PHRASE>
+			<PHRASE Label="la_fld_ShippingAddress1" Module="In-Commerce" Type="1">U2hpcHBpbmcgQWRkcmVzcyBMaW5lIDE=</PHRASE>
+			<PHRASE Label="la_fld_ShippingAddress2" Module="In-Commerce" Type="1">U2hpcHBpbmcgQWRkcmVzcyBMaW5lIDI=</PHRASE>
+			<PHRASE Label="la_fld_ShippingCity" Module="In-Commerce" Type="1">U2hpcHBpbmcgQ2l0eQ==</PHRASE>
+			<PHRASE Label="la_fld_ShippingCode" Module="In-Commerce" Type="1">Q29kZQ==</PHRASE>
+			<PHRASE Label="la_fld_ShippingCompany" Module="In-Commerce" Type="1">U2hpcHBpbmcgQ29tcGFueQ==</PHRASE>
+			<PHRASE Label="la_fld_ShippingControl" Module="In-Commerce" Type="1">U2hpcHBpbmcgQ29udHJvbA==</PHRASE>
+			<PHRASE Label="la_fld_ShippingCost" Module="In-Commerce" Type="1">U2hpcHBpbmcgQ29zdA==</PHRASE>
+			<PHRASE Label="la_fld_ShippingCountry" Module="In-Commerce" Type="1">U2hpcHBpbmcgQ291bnRyeQ==</PHRASE>
+			<PHRASE Label="la_fld_ShippingCustomerAccount" Module="In-Commerce" Type="1">U2hpcHBpbmcgQ3VzdG9tZXIgQWNjb3VudA==</PHRASE>
+			<PHRASE Label="la_fld_ShippingDate" Module="In-Commerce" Type="1">U2hpcHBpbmcgRGF0ZS9UaW1l</PHRASE>
+			<PHRASE Label="la_fld_ShippingEmail" Module="In-Commerce" Type="1">U2hpcHBpbmcgRW1haWw=</PHRASE>
+			<PHRASE Label="la_fld_ShippingFax" Module="In-Commerce" Type="1">U2hpcHBpbmcgRmF4</PHRASE>
+			<PHRASE Label="la_fld_ShippingMode" Module="In-Commerce" Type="1">QWxsb3dlZCBTaGlwcGluZyBUeXBlcw==</PHRASE>
+			<PHRASE Label="la_fld_ShippingName" Module="In-Commerce" Type="1">TmFtZQ==</PHRASE>
+			<PHRASE Label="la_fld_ShippingOptions" Module="In-Commerce" Type="1">U2hpcHBpbmcgT3B0aW9ucw==</PHRASE>
+			<PHRASE Label="la_fld_ShippingPhone" Module="In-Commerce" Type="1">U2hpcHBpbmcgUGhvbmU=</PHRASE>
+			<PHRASE Label="la_fld_ShippingQuoteEngineName" Module="In-Commerce" Type="1">TmFtZQ==</PHRASE>
+			<PHRASE Label="la_fld_ShippingState" Module="In-Commerce" Type="1">U2hpcHBpbmcgU3RhdGU=</PHRASE>
+			<PHRASE Label="la_fld_ShippingTo" Module="In-Commerce" Type="1">U2hpcHBpbmcgVG8=</PHRASE>
+			<PHRASE Label="la_fld_ShippingTracking" Module="In-Commerce" Type="1">U2hpcHBpbmcgVHJhY2tpbmcvUmVmZXJlbmNl</PHRASE>
+			<PHRASE Label="la_fld_ShippingType" Module="In-Commerce" Type="1">U2hpcHBpbmcgVHlwZQ==</PHRASE>
+			<PHRASE Label="la_fld_ShippingTypeId" Module="In-Commerce" Type="1">U2hpcHBpbmcgVHlwZSBJRA==</PHRASE>
+			<PHRASE Label="la_fld_ShippingTypes" Module="In-Commerce" Type="1">U2hpcHBpbmcgVHlwZXM=</PHRASE>
+			<PHRASE Label="la_fld_ShippingZip" Module="In-Commerce" Type="1">U2hpcHBpbmcgWmlwY29kZQ==</PHRASE>
+			<PHRASE Label="la_fld_SKU" Module="In-Commerce" Type="1">U0tV</PHRASE>
+			<PHRASE Label="la_fld_SpeedCode" Module="In-Commerce" Type="1">U3BlZWQgQ29kZQ==</PHRASE>
+			<PHRASE Label="la_fld_SSN" Module="In-Commerce" Type="1">U1NOL1RheCBJZC9WQVQgTnVtYmVy</PHRASE>
+			<PHRASE Label="la_fld_Start" Module="In-Commerce" Type="1">U3RhcnQgRGF0ZQ==</PHRASE>
+			<PHRASE Label="la_fld_SubTotal" Module="In-Commerce" Type="1">U3VidG90YWw=</PHRASE>
+			<PHRASE Label="la_fld_TaxApplyToProcessing" Module="In-Commerce" Type="1">QXBwbHkgdG8gUHJvY2Vzc2luZw==</PHRASE>
+			<PHRASE Label="la_fld_TaxApplyToShipping" Module="In-Commerce" Type="1">QXBwbHkgdG8gU2hpcHBpbmc=</PHRASE>
+			<PHRASE Label="la_fld_TaxValue" Module="In-Commerce" Type="1">VGF4IFZhbHVl</PHRASE>
+			<PHRASE Label="la_fld_ThirdDayDelivery" Module="In-Commerce" Type="1">VGhpcmQgRGF5</PHRASE>
+			<PHRASE Label="la_fld_Time" Module="In-Commerce" Type="1">VGltZQ==</PHRASE>
+			<PHRASE Label="la_fld_ToAmount" Module="In-Commerce" Type="1">VG8gQW1vdW50</PHRASE>
+			<PHRASE Label="la_fld_ToDateTime" Module="In-Commerce" Type="1">VG8gZGF0ZS90aW1l</PHRASE>
+			<PHRASE Label="la_fld_TopSeller" Module="In-Commerce" Type="1">VG9wIFNlbGxlcg==</PHRASE>
+			<PHRASE Label="la_fld_TotalAmount" Module="In-Commerce" Type="1">VG90YWwgQW1vdW50</PHRASE>
+			<PHRASE Label="la_fld_TotalReturns" Module="In-Commerce" Type="1">VG90YWwgUmV0dXJucw==</PHRASE>
+			<PHRASE Label="la_fld_TotalSavings" Module="In-Commerce" Type="1">VG90YWwgU2F2aW5ncw==</PHRASE>
+			<PHRASE Label="la_fld_UnitsLimit" Module="In-Commerce" Type="1">TGluaXQ=</PHRASE>
+			<PHRASE Label="la_fld_UserComment" Module="In-Commerce" Type="1">VXNlciBDb21tZW50</PHRASE>
+			<PHRASE Label="la_fld_VAT" Module="In-Commerce" Type="1">U2FsZXMgVGF4L1ZBVA==</PHRASE>
+			<PHRASE Label="la_fld_VerificationResult" Module="In-Commerce" Type="1">VmVyaWZpY2F0aW9uIFJlc3VsdA==</PHRASE>
+			<PHRASE Label="la_fld_Weight" Module="In-Commerce" Type="1">V2VpZ2h0</PHRASE>
+			<PHRASE Label="la_fld_WeightType" Module="In-Commerce" Type="1">V2VpZ2h0IE1vZGlmaWVyIFR5cGU=</PHRASE>
+			<PHRASE Label="la_fld_ZoneName" Module="In-Commerce" Type="1">Wm9uZSBOYW1l</PHRASE>
+			<PHRASE Label="la_fld_ZoneType" Module="In-Commerce" Type="1">VHlwZQ==</PHRASE>
+			<PHRASE Label="la_fld_Zone_Name" Module="In-Commerce" Type="1">Wm9uZSBOYW1l</PHRASE>
+			<PHRASE Label="la_fld_Zone_Type" Module="In-Commerce" Type="1">VHlwZQ==</PHRASE>
+			<PHRASE Label="la_FontColor" Module="In-Commerce" Type="1">Rm9udCBDb2xvcg==</PHRASE>
+			<PHRASE Label="la_FreeShipping" Module="In-Commerce" Type="1">RnJlZSBTaGlwcGluZw==</PHRASE>
+			<PHRASE Label="la_GBP" Module="In-Commerce" Type="1">UG91bmQgU3Rlcmxpbmc=</PHRASE>
+			<PHRASE Label="la_GEL" Module="In-Commerce" Type="1">TGFyaQ==</PHRASE>
+			<PHRASE Label="la_GenerateCode" Module="In-Commerce" Type="1">R2VuZXJhdGUgQ29kZQ==</PHRASE>
+			<PHRASE Label="la_GHC" Module="In-Commerce" Type="1">Q2VkaQ==</PHRASE>
+			<PHRASE Label="la_GIP" Module="In-Commerce" Type="1">R2licmFsdGFyIFBvdW5k</PHRASE>
+			<PHRASE Label="la_GMD" Module="In-Commerce" Type="1">RGFsYXNp</PHRASE>
+			<PHRASE Label="la_GNF" Module="In-Commerce" Type="1">R3VpbmVhIEZyYW5j</PHRASE>
+			<PHRASE Label="la_GTQ" Module="In-Commerce" Type="1">UXVldHphbA==</PHRASE>
+			<PHRASE Label="la_GWP" Module="In-Commerce" Type="1">R3VpbmVhLUJpc3NhdSBQZXNv</PHRASE>
+			<PHRASE Label="la_GYD" Module="In-Commerce" Type="1">R3V5YW5hIERvbGxhcg==</PHRASE>
+			<PHRASE Label="la_Handling" Module="In-Commerce" Type="1">aGFuZGxpbmc=</PHRASE>
+			<PHRASE Label="la_Help" Module="In-Commerce" Type="1">SGVscA==</PHRASE>
+			<PHRASE Label="la_HKD" Module="In-Commerce" Type="1">SG9uZyBLb25nIERvbGxhcg==</PHRASE>
+			<PHRASE Label="la_HNL" Module="In-Commerce" Type="1">TGVtcGlyYQ==</PHRASE>
+			<PHRASE Label="la_HRK" Module="In-Commerce" Type="1">Q3JvYXRpYW4ga3VuYQ==</PHRASE>
+			<PHRASE Label="la_HTG" Module="In-Commerce" Type="1">R291cmRl</PHRASE>
+			<PHRASE Label="la_HUF" Module="In-Commerce" Type="1">Rm9yaW50</PHRASE>
+			<PHRASE Label="la_IDR" Module="In-Commerce" Type="1">UnVwaWFo</PHRASE>
+			<PHRASE Label="la_ILS" Module="In-Commerce" Type="1">TmV3IElzcmFlbGkgU2hlcWVs</PHRASE>
+			<PHRASE Label="la_In-commerce" Module="In-Commerce" Type="1">SW4tY29tbWVyY2U=</PHRASE>
+			<PHRASE Label="la_Incomplete" Module="In-Commerce" Type="1">SW5jb21wbGV0ZQ==</PHRASE>
+			<PHRASE Label="la_INR" Module="In-Commerce" Type="1">SW5kaWFuIFJ1cGVl</PHRASE>
+			<PHRASE Label="la_Insurance_Fee" Module="In-Commerce" Type="1">SW5zdXJhbmNl</PHRASE>
+			<PHRASE Label="la_InvalidState" Module="In-Commerce" Type="1">U3RhdGUgaXMgaW52YWxpZA==</PHRASE>
+			<PHRASE Label="la_Invoiced" Module="In-Commerce" Type="1">SW52b2ljZWQ=</PHRASE>
+			<PHRASE Label="la_IQD" Module="In-Commerce" Type="1">SXJhcWkgRGluYXI=</PHRASE>
+			<PHRASE Label="la_IRR" Module="In-Commerce" Type="1">SXJhbmlhbiBSaWFs</PHRASE>
+			<PHRASE Label="la_ISK" Module="In-Commerce" Type="1">SWNlbGFuZCBLcm9uYQ==</PHRASE>
+			<PHRASE Label="la_ISOUsedIfBlank" Module="In-Commerce" Type="1">SVNPIENvZGUgd2lsbCBiZSB1c2VkIGlmIGxlZnQgYmxhbms=</PHRASE>
+			<PHRASE Label="la_ItemBackordered" Module="In-Commerce" Type="0">YmFja29yZGVyZWQ=</PHRASE>
+			<PHRASE Label="la_ItemTab_Products" Module="In-Commerce" Type="1">UHJvZHVjdHM=</PHRASE>
+			<PHRASE Label="la_JMD" Module="In-Commerce" Type="1">SmFtYWljYW4gRG9sbGFy</PHRASE>
+			<PHRASE Label="la_JOD" Module="In-Commerce" Type="1">Sm9yZGFuaWFuIERpbmFy</PHRASE>
+			<PHRASE Label="la_JPY" Module="In-Commerce" Type="1">WWVu</PHRASE>
+			<PHRASE Label="la_KES" Module="In-Commerce" Type="1">S2VueWFuIFNoaWxsaW5n</PHRASE>
+			<PHRASE Label="la_kg" Module="In-Commerce" Type="1">a2c=</PHRASE>
+			<PHRASE Label="la_KGS" Module="In-Commerce" Type="1">U29t</PHRASE>
+			<PHRASE Label="la_KHR" Module="In-Commerce" Type="1">UmllbA==</PHRASE>
+			<PHRASE Label="la_KMF" Module="In-Commerce" Type="1">Q29tb3JvIEZyYW5j</PHRASE>
+			<PHRASE Label="la_KPW" Module="In-Commerce" Type="1">Tm9ydGggS29yZWFuIFdvbg==</PHRASE>
+			<PHRASE Label="la_KRW" Module="In-Commerce" Type="1">V29u</PHRASE>
+			<PHRASE Label="la_KWD" Module="In-Commerce" Type="1">S3V3YWl0aSBEaW5hcg==</PHRASE>
+			<PHRASE Label="la_KYD" Module="In-Commerce" Type="1">Q2F5bWFuIElzbGFuZHMgRG9sbGFy</PHRASE>
+			<PHRASE Label="la_KZT" Module="In-Commerce" Type="1">VGVuZ2U=</PHRASE>
+			<PHRASE Label="la_LAK" Module="In-Commerce" Type="1">S2lw</PHRASE>
+			<PHRASE Label="la_LBP" Module="In-Commerce" Type="1">TGViYW5lc2UgUG91bmQ=</PHRASE>
+			<PHRASE Label="la_lbs" Module="In-Commerce" Type="1">cG91bmRz</PHRASE>
+			<PHRASE Label="la_Left" Module="In-Commerce" Type="1">TGVmdA==</PHRASE>
+			<PHRASE Label="la_LKR" Module="In-Commerce" Type="1">U3JpIExhbmthIFJ1cGVl</PHRASE>
+			<PHRASE Label="la_LRD" Module="In-Commerce" Type="1">TGliZXJpYW4gRG9sbGFy</PHRASE>
+			<PHRASE Label="la_LSL" Module="In-Commerce" Type="1">TG90aQ==</PHRASE>
+			<PHRASE Label="la_LTL" Module="In-Commerce" Type="1">TGl0aHVhbmlhbiBMaXR1cw==</PHRASE>
+			<PHRASE Label="la_LVL" Module="In-Commerce" Type="1">TGF0dmlhbiBMYXRz</PHRASE>
+			<PHRASE Label="la_LYD" Module="In-Commerce" Type="1">THliaWFuIERpbmFy</PHRASE>
+			<PHRASE Label="la_MAD" Module="In-Commerce" Type="1">TW9yb2NjYW4gRGlyaGFt</PHRASE>
+			<PHRASE Label="la_Manual" Module="In-Commerce" Type="1">TWFudWFs</PHRASE>
+			<PHRASE Label="la_MaskProcessedCreditCards" Module="In-Commerce" Type="1">TWFzayBQcm9jZXNzZWQgQ3JlZGl0IENhcmRz</PHRASE>
+			<PHRASE Label="la_MaxAddresses" Module="In-Commerce" Type="1">TnVtYmVyIG9mIGFsbG93ZWQgYWRkcmVzc2Vz</PHRASE>
+			<PHRASE Label="la_MDL" Module="In-Commerce" Type="1">TW9sZG92YW4gTGV1</PHRASE>
+			<PHRASE Label="la_MGA" Module="In-Commerce" Type="1">TUdB</PHRASE>
+			<PHRASE Label="la_MGF" Module="In-Commerce" Type="1">TWFsYWdhc3kgRnJhbmM=</PHRASE>
+			<PHRASE Label="la_MKD" Module="In-Commerce" Type="1">RGVuYXI=</PHRASE>
+			<PHRASE Label="la_MMK" Module="In-Commerce" Type="1">S3lhdA==</PHRASE>
+			<PHRASE Label="la_MNT" Module="In-Commerce" Type="1">VHVncmlr</PHRASE>
+			<PHRASE Label="la_ModifyByValue" Module="In-Commerce" Type="1">VmFsdWU=</PHRASE>
+			<PHRASE Label="la_ModifyOperation" Module="In-Commerce" Type="1">T3BlcmF0aW9u</PHRASE>
+			<PHRASE Label="la_month" Module="In-Commerce" Type="1">bW9udGg=</PHRASE>
+			<PHRASE Label="la_MOP" Module="In-Commerce" Type="1">UGF0YWNh</PHRASE>
+			<PHRASE Label="la_MRO" Module="In-Commerce" Type="1">T3VndWl5YQ==</PHRASE>
+			<PHRASE Label="la_MTL" Module="In-Commerce" Type="1">TWFsdGVzZSBMaXJh</PHRASE>
+			<PHRASE Label="la_MUR" Module="In-Commerce" Type="1">TWF1cml0aXVzIFJ1cGVl</PHRASE>
+			<PHRASE Label="la_MVR" Module="In-Commerce" Type="1">UnVmaXlhYQ==</PHRASE>
+			<PHRASE Label="la_MWK" Module="In-Commerce" Type="1">S3dhY2hh</PHRASE>
+			<PHRASE Label="la_MXN" Module="In-Commerce" Type="1">TWV4aWNhbiBQZXNv</PHRASE>
+			<PHRASE Label="la_MXV" Module="In-Commerce" Type="1">TWV4aWNhbiBVbmlkYWQgZGUgSW52ZXJzaW9uIChVREkp</PHRASE>
+			<PHRASE Label="la_MYR" Module="In-Commerce" Type="1">TWFsYXlzaWFuIFJpbmdnaXQ=</PHRASE>
+			<PHRASE Label="la_MZM" Module="In-Commerce" Type="1">TWV0aWNhbA==</PHRASE>
+			<PHRASE Label="la_NAD" Module="In-Commerce" Type="1">TmFtaWJpYSBEb2xsYXI=</PHRASE>
+			<PHRASE Label="la_NGN" Module="In-Commerce" Type="1">TmFpcmE=</PHRASE>
+			<PHRASE Label="la_NIO" Module="In-Commerce" Type="1">Q29yZG9iYSBPcm8=</PHRASE>
+			<PHRASE Label="la_NOK" Module="In-Commerce" Type="1">Tm9yd2VnaWFuIEtyb25l</PHRASE>
+			<PHRASE Label="la_NoShipments" Module="In-Commerce" Type="1">Tm8gU2hpcG1lbnRz</PHRASE>
+			<PHRASE Label="la_NotAllowed" Module="In-Commerce" Type="1">Tm90IEFsbG93ZWQ=</PHRASE>
+			<PHRASE Label="la_NoZonesOrBrackets" Module="In-Commerce" Type="1">WW91IG11c3QgaGF2ZSBib3RoIHpvbmVzIGFuZCBicmFja2V0cyBkZWZpbmVkIGJlZm9yZSBlZGl0aW5nIHNoaXBwaW5nIGNvc3Rz</PHRASE>
+			<PHRASE Label="la_NPR" Module="In-Commerce" Type="1">TmVwYWxlc2UgUnVwZWU=</PHRASE>
+			<PHRASE Label="la_NZD" Module="In-Commerce" Type="1">TmV3IFplYWxhbmQgRG9sbGFy</PHRASE>
+			<PHRASE Label="la_OMR" Module="In-Commerce" Type="1">UmlhbCBPbWFuaQ==</PHRASE>
+			<PHRASE Label="la_opt_Email" Module="In-Commerce" Type="1">RS1tYWls</PHRASE>
+			<PHRASE Label="la_opt_Exchange" Module="In-Commerce" Type="1">RXhjaGFuZ2U=</PHRASE>
+			<PHRASE Label="la_opt_List" Module="In-Commerce" Type="1">TGlzdGluZw==</PHRASE>
+			<PHRASE Label="la_opt_PermanentCookie" Module="In-Commerce" Type="1">UGVybWFuZW50IENvb2tpZQ==</PHRASE>
+			<PHRASE Label="la_opt_PostalMail" Module="In-Commerce" Type="1">UG9zdGFsIE1haWw=</PHRASE>
+			<PHRASE Label="la_opt_PriceCalculationByOptimal" Module="In-Commerce" Type="1">T3B0aW1hbCBQcmljZQ==</PHRASE>
+			<PHRASE Label="la_opt_PriceCalculationByPrimary" Module="In-Commerce" Type="1">UHJpbWFyeSBQcmljZQ==</PHRASE>
+			<PHRASE Label="la_opt_Refund" Module="In-Commerce" Type="1">UmVmdW5k</PHRASE>
+			<PHRASE Label="la_opt_Selection" Module="In-Commerce" Type="1">U2VsZWN0aW9u</PHRASE>
+			<PHRASE Label="la_opt_Session" Module="In-Commerce" Type="1">U2Vzc2lvbg==</PHRASE>
+			<PHRASE Label="la_opt_Warranty" Module="In-Commerce" Type="1">V2FycmFudHk=</PHRASE>
+			<PHRASE Label="la_OrderMainNumberDigits" Module="In-Commerce" Type="1">T3JkZXIgbWFpbiBudW1iZXIgZGlnaXRz</PHRASE>
+			<PHRASE Label="la_OrderSecNumberDigits" Module="In-Commerce" Type="1">T3JkZXIgc3VibnVtYmVyIGRpZ2l0cw==</PHRASE>
+			<PHRASE Label="la_OrderSubtotal" Module="In-Commerce" Type="1">U3VidG90YWw=</PHRASE>
+			<PHRASE Label="la_orders_NextOrderNumber" Module="In-Commerce" Type="1">TmV4dCBPcmRlciBOdW1iZXI=</PHRASE>
+			<PHRASE Label="la_orders_RequireLogin" Module="In-Commerce" Type="1">UmVxdWlyZSBsb2dpbiBiZWZvcmUgY2hlY2tvdXQ=</PHRASE>
+			<PHRASE Label="la_Order_Billing_Information" Module="In-Commerce" Type="1">T3JkZXIgQmlsbGluZyBJbmZvcm1hdGlvbg==</PHRASE>
+			<PHRASE Label="la_Order_Preview" Module="In-Commerce" Type="1">T3JkZXIgUHJldmlldw==</PHRASE>
+			<PHRASE Label="la_Overall" Module="In-Commerce" Type="1">T3ZlcmFsbA==</PHRASE>
+			<PHRASE Label="la_oz" Module="In-Commerce" Type="1">b3VuY2Vz</PHRASE>
+			<PHRASE Label="la_PAB" Module="In-Commerce" Type="1">QmFsYm9h</PHRASE>
+			<PHRASE Label="la_PEN" Module="In-Commerce" Type="1">TnVldm8gU29s</PHRASE>
+			<PHRASE Label="la_Percent" Module="In-Commerce" Type="1">UGVyY2VudA==</PHRASE>
+			<PHRASE Label="la_Perpage_Manufacturers" Module="In-Commerce" Type="1">TWFudWZhY3R1cmVycyBwZXIgcGFnZQ==</PHRASE>
+			<PHRASE Label="la_Perpage_Manufacturers_Short" Module="In-Commerce" Type="1">TWFudWZhY3R1cmVycyBwZXIgcGFnZSBvbiBhIHNob3J0IGxpc3Rpbmc=</PHRASE>
+			<PHRASE Label="la_Perpage_Products" Module="In-Commerce" Type="1">TnVtYmVyIG9mIHByb2R1Y3RzIHBlciBwYWdl</PHRASE>
+			<PHRASE Label="la_Perpage_Products_Shortlist" Module="In-Commerce" Type="1">TnVtYmVyIG9mIHByb2R1Y3RzIHBlciBwYWdlIG9uIGEgc2hvcnQgbGlzdGluZw==</PHRASE>
+			<PHRASE Label="la_PerUnit" Module="In-Commerce" Type="1">UGVyIFVuaXQ=</PHRASE>
+			<PHRASE Label="la_PGK" Module="In-Commerce" Type="1">S2luYQ==</PHRASE>
+			<PHRASE Label="la_PHP" Module="In-Commerce" Type="1">UGhpbGlwcGluZSBQZXNv</PHRASE>
+			<PHRASE Label="la_PKR" Module="In-Commerce" Type="1">UGFraXN0YW4gUnVwZWU=</PHRASE>
+			<PHRASE Label="la_PLN" Module="In-Commerce" Type="1">WmxvdHk=</PHRASE>
+			<PHRASE Label="la_Precision" Module="In-Commerce" Type="1">UHJlY2lzaW9u</PHRASE>
+			<PHRASE Label="la_prefix_ord" Module="In-Commerce" Type="1">T3JkZXI=</PHRASE>
+			<PHRASE Label="la_ProcessBackorderingAuto" Module="In-Commerce" Type="1">UHJvY2VzcyBiYWNrb3JkZXJzIGF1dG9tYXRpY2FsbHk=</PHRASE>
+			<PHRASE Label="la_Processed" Module="In-Commerce" Type="1">UHJvY2Vzc2Vk</PHRASE>
+			<PHRASE Label="la_ProcessingFee" Module="In-Commerce" Type="1">UHJvY2Vzc2luZyBGZWU=</PHRASE>
+			<PHRASE Label="la_Product" Module="In-Commerce" Type="1">UHJvZHVjdA==</PHRASE>
+			<PHRASE Label="la_ProductDeleted" Module="In-Commerce" Type="1">UHJvZHVjdCBEZWxldGVk</PHRASE>
+			<PHRASE Label="la_product_downloadable" Module="In-Commerce" Type="1">RG93bmxvYWRhYmxl</PHRASE>
+			<PHRASE Label="la_product_package" Module="In-Commerce" Type="1">UGFja2FnZQ==</PHRASE>
+			<PHRASE Label="la_product_service" Module="In-Commerce" Type="1">U2VydmljZQ==</PHRASE>
+			<PHRASE Label="la_product_subscription" Module="In-Commerce" Type="1">U3Vic2NyaXB0aW9u</PHRASE>
+			<PHRASE Label="la_product_tangible" Module="In-Commerce" Type="1">VGFuZ2libGU=</PHRASE>
+			<PHRASE Label="la_prompt_affiliate_cookie_duration" Module="In-Commerce" Type="1">QWZmaWxpYXRlIENvb2tpZSBEdXJhdGlvbiAoaW4gZGF5cyk=</PHRASE>
+			<PHRASE Label="la_prompt_affiliate_group" Module="In-Commerce" Type="1">QWZmaWxpYXRlIEdyb3Vw</PHRASE>
+			<PHRASE Label="la_prompt_affiliate_storage_method" Module="In-Commerce" Type="1">QWZmaWxpYXRlIFN0b3JhZ2UgTWV0aG9k</PHRASE>
+			<PHRASE Label="la_prompt_Multilingual" Module="In-Commerce" Type="1">TXVsdGlsaW5ndWFs</PHRASE>
+			<PHRASE Label="la_prompt_PriceBracketCalculation" Module="In-Commerce" Type="1">Q2FsY3VsYXRlIFByaWNpbmcgYnk=</PHRASE>
+			<PHRASE Label="la_prompt_register_as_affiliate" Module="In-Commerce" Type="1">QWxsb3cgcmVnaXN0cmF0aW9uIGFzIGFmZmlsaWF0ZQ==</PHRASE>
+			<PHRASE Label="la_PropagateValues" Module="In-Commerce" Type="1">UHJvcGFnYXRlIFZhbHVlcw==</PHRASE>
+			<PHRASE Label="la_PYG" Module="In-Commerce" Type="1">R3VhcmFuaQ==</PHRASE>
+			<PHRASE Label="la_QAR" Module="In-Commerce" Type="1">UWF0YXJpIFJpYWw=</PHRASE>
+			<PHRASE Label="la_quartely" Module="In-Commerce" Type="1">cXVhcnRlcg==</PHRASE>
+			<PHRASE Label="la_RecalculateOrder" Module="In-Commerce" Type="1">UmVjYWxjdWxhdGUgT3JkZXI=</PHRASE>
+			<PHRASE Label="la_RecurringChargeInverval" Module="In-Commerce" Type="1">Q2hhcmdlIFJlY3VycmluZyBPcmRlcnMgKGRheXMgaW4gYWR2YW5jZSk=</PHRASE>
+			<PHRASE Label="la_RecurringOrderDenied" Module="In-Commerce" Type="1">UmVjdXJyaW5nIE9yZGVyIERlbmllZA==</PHRASE>
+			<PHRASE Label="la_RecurringOrderProcessed" Module="In-Commerce" Type="1">UmVjdXJyaW5nIE9yZGVyIFByb2Nlc3NlZA==</PHRASE>
+			<PHRASE Label="la_ResetBackorderFlag" Module="In-Commerce" Type="1">UmVzZXQgYmFja29yZGVyIGZsYWcgYXV0b21hdGljYWxseSB3aGVuIEF2YWlsYWJsZSBxdWFudGl0eSBpcyBlcXVhbCB0bywgb3IgYWJvdmU=</PHRASE>
+			<PHRASE Label="la_reset_to_base" Module="In-Commerce" Type="1">UmVzZXQgVG8gQmFzZQ==</PHRASE>
+			<PHRASE Label="la_Right" Module="In-Commerce" Type="1">UmlnaHQ=</PHRASE>
+			<PHRASE Label="la_ROL" Module="In-Commerce" Type="1">TGV1</PHRASE>
+			<PHRASE Label="la_RUB" Module="In-Commerce" Type="1">UnVzc2lhbiBSdWJsZQ==</PHRASE>
+			<PHRASE Label="la_RUR" Module="In-Commerce" Type="1">UnVzc2lhbiBSdWJsZQ==</PHRASE>
+			<PHRASE Label="la_RWF" Module="In-Commerce" Type="1">UndhbmRhIEZyYW5j</PHRASE>
+			<PHRASE Label="la_SAR" Module="In-Commerce" Type="1">U2F1ZGkgUml5YWw=</PHRASE>
+			<PHRASE Label="la_SBD" Module="In-Commerce" Type="1">U29sb21vbiBJc2xhbmRzIERvbGxhcg==</PHRASE>
+			<PHRASE Label="la_SCR" Module="In-Commerce" Type="1">U2V5Y2hlbGxlcyBSdXBlZQ==</PHRASE>
+			<PHRASE Label="la_SDD" Module="In-Commerce" Type="1">U3VkYW5lc2UgRGluYXI=</PHRASE>
+			<PHRASE Label="la_section_AdvertisingMaterials" Module="In-Commerce" Type="1">QWR2ZXJ0aXNpbmcgTWF0ZXJpYWxz</PHRASE>
+			<PHRASE Label="la_section_Affiliate" Module="In-Commerce" Type="1">QWZmaWxpYXRl</PHRASE>
+			<PHRASE Label="la_section_Backordering" Module="In-Commerce" Type="1">QmFja29yZGVyaW5n</PHRASE>
+			<PHRASE Label="la_section_Comments" Module="In-Commerce" Type="1">Q29tbWVudHM=</PHRASE>
+			<PHRASE Label="la_section_CreditCard" Module="In-Commerce" Type="1">Q3JlZGl0IENhcmQ=</PHRASE>
+			<PHRASE Label="la_section_Currency" Module="In-Commerce" Type="1">Q3VycmVuY3k=</PHRASE>
+			<PHRASE Label="la_section_EmailDelivery" Module="In-Commerce" Type="1">U2VuZCB2aWEgRS1tYWlsIHRv</PHRASE>
+			<PHRASE Label="la_section_File" Module="In-Commerce" Type="1">RmlsZQ==</PHRASE>
+			<PHRASE Label="la_section_Files" Module="In-Commerce" Type="1">RmlsZXM=</PHRASE>
+			<PHRASE Label="la_section_help_file_missing" Module="In-Commerce" Type="1">IFRoaXMgaGVscCBzZWN0aW9uIGRvZXMgbm90IHlldCBleGlzdCwgaXQncyBjb21pbmcgc29vbiE=</PHRASE>
+			<PHRASE Label="la_section_OrderBilling" Module="In-Commerce" Type="1">QmlsbGluZyBJbmZvcm1hdGlvbg==</PHRASE>
+			<PHRASE Label="la_section_OrderShipping" Module="In-Commerce" Type="1">U2hpcHBpbmcgSW5mb3JtYXRpb24=</PHRASE>
+			<PHRASE Label="la_section_PostalDelivery" Module="In-Commerce" Type="1">U2VuZCB2aWEgUG9zdGFsIE1haWwgdG8=</PHRASE>
+			<PHRASE Label="la_section_PriceBracket" Module="In-Commerce" Type="1">UHJpY2UgQnJhY2tldA==</PHRASE>
+			<PHRASE Label="la_section_Product" Module="In-Commerce" Type="1">UHJvZHVjdA==</PHRASE>
+			<PHRASE Label="la_section_ShippingCosts" Module="In-Commerce" Type="1">U2hpcHBpbmcgQ29zdHM=</PHRASE>
+			<PHRASE Label="la_section_ShippingZone" Module="In-Commerce" Type="1">U2hpcHBpbmcgWm9uZQ==</PHRASE>
+			<PHRASE Label="la_section_Statistics" Module="In-Commerce" Type="1">U3RhdGlzdGljcw==</PHRASE>
+			<PHRASE Label="la_section_StoreSettings" Module="In-Commerce" Type="1">U3RvcmUgU2V0dGluZ3M=</PHRASE>
+			<PHRASE Label="la_section_TaxZone" Module="In-Commerce" Type="1">VGF4IFpvbmU=</PHRASE>
+			<PHRASE Label="la_SEK" Module="In-Commerce" Type="1">U3dlZGlzaCBLcm9uYQ==</PHRASE>
+			<PHRASE Label="la_SelectedOnly" Module="In-Commerce" Type="1">U2VsZWN0ZWQgUHJvZHVjdHMgT25seQ==</PHRASE>
+			<PHRASE Label="la_SetBackorderFlag" Module="In-Commerce" Type="1">U2V0IGJhY2tvcmRlciBmbGFnIGF1dG9tYXRpY2FsbHkgd2hlbiBBdmFpbGFibGUgcXVhbnRpdHkgaXMgZXF1YWwgdG8=</PHRASE>
+			<PHRASE Label="la_SGD" Module="In-Commerce" Type="1">U2luZ2Fwb3JlIERvbGxhcg==</PHRASE>
+			<PHRASE Label="la_ShippingHandling" Module="In-Commerce" Type="1">U2hpcHBpbmcgYW5kIEhhbmRsaW5n</PHRASE>
+			<PHRASE Label="la_ShippingId" Module="In-Commerce" Type="1">SUQ=</PHRASE>
+			<PHRASE Label="la_shipping_AnyAndSelected" Module="In-Commerce" Type="1">QW55ICsgU2VsZWN0ZWQ=</PHRASE>
+			<PHRASE Label="la_Shipping_Code" Module="In-Commerce" Type="1">U2hpcHBpbmcgQ29kZQ==</PHRASE>
+			<PHRASE Label="la_Shipping_From_Location" Module="In-Commerce" Type="1">RnJvbSBMb2NhdGlvbg==</PHRASE>
+			<PHRASE Label="la_shipping_Limited" Module="In-Commerce" Type="1">U2VsZWN0ZWQgT25seQ==</PHRASE>
+			<PHRASE Label="la_Shipping_Name" Module="In-Commerce" Type="1">TmFtZQ==</PHRASE>
+			<PHRASE Label="la_Shipping_Type" Module="In-Commerce" Type="1">VHlwZQ==</PHRASE>
+			<PHRASE Label="la_ship_all_together" Module="In-Commerce" Type="0">U2hpcCBhbGwgaXRlbXMgdG9nZXRoZXI=</PHRASE>
+			<PHRASE Label="la_ship_backorders_upon_avail" Module="In-Commerce" Type="0">U2hpcCBiYWNrb3JkZXJzIHVwb24gYXZhaWxhYmxl</PHRASE>
+			<PHRASE Label="la_ship_backorder_separately" Module="In-Commerce" Type="0">U2hpcCBiYWNrb3JkZXJlZCBpdGVtcyBzZXBhcmF0ZWx5</PHRASE>
+			<PHRASE Label="la_SHP" Module="In-Commerce" Type="1">U2FpbnQgSGVsZW5hIFBvdW5k</PHRASE>
+			<PHRASE Label="la_SIT" Module="In-Commerce" Type="1">VG9sYXI=</PHRASE>
+			<PHRASE Label="la_SKK" Module="In-Commerce" Type="1">U2xvdmFrIEtvcnVuYQ==</PHRASE>
+			<PHRASE Label="la_SLL" Module="In-Commerce" Type="1">TGVvbmU=</PHRASE>
+			<PHRASE Label="la_SOS" Module="In-Commerce" Type="1">U29tYWxpIFNoaWxsaW5n</PHRASE>
+			<PHRASE Label="la_Speed_Code" Module="In-Commerce" Type="1">U3BlZWQgQ29kZQ==</PHRASE>
+			<PHRASE Label="la_SRD" Module="In-Commerce" Type="1">U1JE</PHRASE>
+			<PHRASE Label="la_SRG" Module="In-Commerce" Type="1">U3VyaW5hbWUgR3VpbGRlcg==</PHRASE>
+			<PHRASE Label="la_StartingOrderNumber" Module="In-Commerce" Type="1">U3RhcnRpbmcgb3JkZXIgbnVtYmVy</PHRASE>
+			<PHRASE Label="la_State" Module="In-Commerce" Type="1">U3RhdGU=</PHRASE>
+			<PHRASE Label="la_STD" Module="In-Commerce" Type="1">RG9icmE=</PHRASE>
+			<PHRASE Label="la_StoreName" Module="In-Commerce" Type="1">TmFtZQ==</PHRASE>
+			<PHRASE Label="la_SubTotal" Module="In-Commerce" Type="1">U3VidG90YWw=</PHRASE>
+			<PHRASE Label="la_SVC" Module="In-Commerce" Type="1">RWwgU2FsdmFkb3IgQ29sb24=</PHRASE>
+			<PHRASE Label="la_SYP" Module="In-Commerce" Type="1">U3lyaWFuIFBvdW5k</PHRASE>
+			<PHRASE Label="la_SZL" Module="In-Commerce" Type="1">TGlsYW5nZW5p</PHRASE>
+			<PHRASE Label="la_tab_Access" Module="In-Commerce" Type="1">QWNjZXNz</PHRASE>
+			<PHRASE Label="la_tab_AccessAndPricing" Module="In-Commerce" Type="1">QWNjZXNzICYgUHJpY2luZw==</PHRASE>
+			<PHRASE Label="la_tab_AffiliatePaymentTypes" Module="In-Commerce" Type="1">QWZmaWxpYXRlIFBheW1lbnQgVHlwZXM=</PHRASE>
+			<PHRASE Label="la_tab_AffiliatePlans" Module="In-Commerce" Type="1">QWZmaWxpYXRlIFBsYW5z</PHRASE>
+			<PHRASE Label="la_tab_Affiliates" Module="In-Commerce" Type="1">QWZmaWxpYXRlcw==</PHRASE>
+			<PHRASE Label="la_tab_Archived" Module="In-Commerce" Type="1">QXJjaGl2ZWQ=</PHRASE>
+			<PHRASE Label="la_tab_Backorders" Module="In-Commerce" Type="1">QmFja29yZGVycw==</PHRASE>
+			<PHRASE Label="la_tab_Billing" Module="In-Commerce" Type="1">QmlsbGluZw==</PHRASE>
+			<PHRASE Label="la_tab_Brackets" Module="In-Commerce" Type="1">QnJhY2tldHM=</PHRASE>
+			<PHRASE Label="la_tab_ConfigContacts" Module="In-Commerce" Type="1">Q29udGFjdCBJbmZvcm1hdGlvbg==</PHRASE>
+			<PHRASE Label="la_tab_Costs" Module="In-Commerce" Type="1">Q29zdHM=</PHRASE>
+			<PHRASE Label="la_tab_Coupons" Module="In-Commerce" Type="1">Q291cG9ucw==</PHRASE>
+			<PHRASE Label="la_tab_CouponsItems" Module="In-Commerce" Type="1">SXRlbXM=</PHRASE>
+			<PHRASE Label="la_tab_Currencies" Module="In-Commerce" Type="1">Q3VycmVuY2llcw==</PHRASE>
+			<PHRASE Label="la_tab_CustomShippingTypes" Module="In-Commerce" Type="1">Q3VzdG9tIFNoaXBwaW5nIFR5cGVz</PHRASE>
+			<PHRASE Label="la_tab_Denied" Module="In-Commerce" Type="1">RGVuaWVk</PHRASE>
+			<PHRASE Label="la_tab_DiscountItems" Module="In-Commerce" Type="1">SXRlbXM=</PHRASE>
+			<PHRASE Label="la_tab_Discounts" Module="In-Commerce" Type="1">RGlzY291bnRz</PHRASE>
+			<PHRASE Label="la_tab_DiscountsAndCoupons" Module="In-Commerce" Type="1">RGlzY291bnRzICYgQ291cG9ucw==</PHRASE>
+			<PHRASE Label="la_tab_DownloadLog" Module="In-Commerce" Type="1">RG93bmxvYWQgTG9n</PHRASE>
+			<PHRASE Label="la_tab_Editing_Shipping_type" Module="In-Commerce" Type="1">RWRpdGluZyBTaGlwcGluZyB0eXBl</PHRASE>
+			<PHRASE Label="la_tab_FilesAndPricing" Module="In-Commerce" Type="1">RmlsZXMgJiBQcmljaW5n</PHRASE>
+			<PHRASE Label="la_tab_Gateway" Module="In-Commerce" Type="1">R2F0ZXdheQ==</PHRASE>
+			<PHRASE Label="la_tab_GiftCertificates" Module="In-Commerce" Type="1">R2lmdCBDZXJ0aWZpY2F0ZXM=</PHRASE>
+			<PHRASE Label="la_tab_Incomplete" Module="In-Commerce" Type="1">SW5jb21wbGV0ZQ==</PHRASE>
+			<PHRASE Label="la_tab_Inventory" Module="In-Commerce" Type="1">SW52ZW50b3J5</PHRASE>
+			<PHRASE Label="la_tab_Manufacturers" Module="In-Commerce" Type="1">TWFudWZhY3R1cmVycw==</PHRASE>
+			<PHRASE Label="la_tab_NewRegional" Module="In-Commerce" Type="1">TkVXIFJlZ2lvbmFs</PHRASE>
+			<PHRASE Label="la_tab_Options" Module="In-Commerce" Type="1">T3B0aW9ucw==</PHRASE>
+			<PHRASE Label="la_tab_Orders" Module="In-Commerce" Type="1">T3JkZXJz</PHRASE>
+			<PHRASE Label="la_tab_PaymentLog" Module="In-Commerce" Type="1">VHJhbnNhY3Rpb25z</PHRASE>
+			<PHRASE Label="la_tab_Payments" Module="In-Commerce" Type="1">UGF5bWVudHM=</PHRASE>
+			<PHRASE Label="la_tab_PaymentTypes" Module="In-Commerce" Type="1">UGF5bWVudCBUeXBlcw==</PHRASE>
+			<PHRASE Label="la_tab_Pending" Module="In-Commerce" Type="1">UGVuZGluZw==</PHRASE>
+			<PHRASE Label="la_tab_Preview" Module="In-Commerce" Type="1">UHJldmlldw==</PHRASE>
+			<PHRASE Label="la_tab_Pricing" Module="In-Commerce" Type="1">UHJpY2luZw==</PHRASE>
+			<PHRASE Label="la_tab_Processed" Module="In-Commerce" Type="1">UHJvY2Vzc2Vk</PHRASE>
+			<PHRASE Label="la_tab_Products" Module="In-Commerce" Type="1">UHJvZHVjdHM=</PHRASE>
+			<PHRASE Label="la_tab_Reports" Module="In-Commerce" Type="1">UmVwb3J0cyAmIExvZ3M=</PHRASE>
+			<PHRASE Label="la_tab_Returns" Module="In-Commerce" Type="1">UmV0dXJuZWQ=</PHRASE>
+			<PHRASE Label="la_tab_SaleReports" Module="In-Commerce" Type="1">U2FsZXMgUmVwb3J0</PHRASE>
+			<PHRASE Label="la_tab_Shipping" Module="In-Commerce" Type="1">U2hpcHBpbmc=</PHRASE>
+			<PHRASE Label="la_tab_ShippingQuoteEngines" Module="In-Commerce" Type="1">U2hpcHBpbmcgUXVvdGUgRW5naW5lcw==</PHRASE>
+			<PHRASE Label="la_tab_ShippingZones" Module="In-Commerce" Type="1">U2hpcHBpbmcgWm9uZXM=</PHRASE>
+			<PHRASE Label="la_tab_Shipping_Types" Module="In-Commerce" Type="1">RWRpdGluZyBTaGlwcGluZyBUeXBlcw==</PHRASE>
+			<PHRASE Label="la_tab_Taxes" Module="In-Commerce" Type="1">VGF4ZXM=</PHRASE>
+			<PHRASE Label="la_tab_ToShip" Module="In-Commerce" Type="1">VG8gU2hpcA==</PHRASE>
+			<PHRASE Label="la_text_Additional" Module="In-Commerce" Type="1">QWRkaXRpb25hbA==</PHRASE>
+			<PHRASE Label="la_Text_Affiliates" Module="In-Commerce" Type="1">QWZmaWxpYXRlcw==</PHRASE>
+			<PHRASE Label="la_Text_Carriers" Module="In-Commerce" Type="1">Q2FycmllcnM=</PHRASE>
+			<PHRASE Label="la_Text_Combination" Module="In-Commerce" Type="1">Q29tYmluYXRpb24=</PHRASE>
+			<PHRASE Label="la_text_CompanyName" Module="In-Commerce" Type="1">Q29tcGFueSBOYW1l</PHRASE>
+			<PHRASE Label="la_text_ContactName" Module="In-Commerce" Type="1">Q29udGFjdCBOYW1l</PHRASE>
+			<PHRASE Label="la_Text_ContactsGeneral" Module="In-Commerce" Type="1">R2VuZXJhbCBjb250YWN0IGluZm9ybWF0aW9u</PHRASE>
+			<PHRASE Label="la_Text_Coupons" Module="In-Commerce" Type="1">Q291cG9ucw==</PHRASE>
+			<PHRASE Label="la_Text_Currencies" Module="In-Commerce" Type="1">Q3VycmVuY2llcw==</PHRASE>
+			<PHRASE Label="la_Text_Delivery" Module="In-Commerce" Type="1">RGVsaXZlcnk=</PHRASE>
+			<PHRASE Label="la_text_Fax" Module="In-Commerce" Type="1">RmF4</PHRASE>
+			<PHRASE Label="la_Text_Manufacturers" Module="In-Commerce" Type="1">TWFudWZhY3R1cmVycw==</PHRASE>
+			<PHRASE Label="la_Text_Option" Module="In-Commerce" Type="1">T3B0aW9u</PHRASE>
+			<PHRASE Label="la_Text_Orders" Module="In-Commerce" Type="1">T3JkZXJz</PHRASE>
+			<PHRASE Label="la_Text_Other" Module="In-Commerce" Type="1">T3RoZXI=</PHRASE>
+			<PHRASE Label="la_Text_PricingCalculation" Module="In-Commerce" Type="1">UHJpY2UgQnJha2V0IENhbGN1bGF0aW9u</PHRASE>
+			<PHRASE Label="la_text_Product" Module="In-Commerce" Type="1">UHJvZHVjdA==</PHRASE>
+			<PHRASE Label="la_Text_Products" Module="In-Commerce" Type="1">UHJvZHVjdHM=</PHRASE>
+			<PHRASE Label="la_Text_Properties" Module="In-Commerce" Type="1">UHJvcGVydGllcw==</PHRASE>
+			<PHRASE Label="la_Text_ShippingAddress" Module="In-Commerce" Type="1">U2hpcHBpbmcgRnJvbSBhZGRyZXNz</PHRASE>
+			<PHRASE Label="la_Text_Shipping_Type" Module="In-Commerce" Type="1">U2hpcHBpbmcgVHlwZQ==</PHRASE>
+			<PHRASE Label="la_Text_StoreAddress" Module="In-Commerce" Type="1">Q29udGFjdCBBZGRyZXNz</PHRASE>
+			<PHRASE Label="la_text_StoreName" Module="In-Commerce" Type="1">U3RvcmUgTmFtZQ==</PHRASE>
+			<PHRASE Label="la_Text_TopSellers" Module="In-Commerce" Type="1">VG9wIHNlbGxlcnM=</PHRASE>
+			<PHRASE Label="la_THB" Module="In-Commerce" Type="1">QmFodA==</PHRASE>
+			<PHRASE Label="la_title_AddingCurrency" Module="In-Commerce" Type="1">QWRkaW5nIEN1cnJlbmN5</PHRASE>
+			<PHRASE Label="la_title_AddingGiftCertificate" Module="In-Commerce" Type="1">QWRkaW5nIEdpZnQgQ2VydGlmaWNhdGU=</PHRASE>
+			<PHRASE Label="la_title_AddingManufacturer" Module="In-Commerce" Type="1">QWRkaW5nIG1hbnVmYWN0dXJlcg==</PHRASE>
+			<PHRASE Label="la_title_AddingPaymentType" Module="In-Commerce" Type="1">QWRkaW5nIFBheW1lbnQgVHlwZQ==</PHRASE>
+			<PHRASE Label="la_title_AddingShippingType" Module="In-Commerce" Type="1">QWRkaW5nIFNoaXBwaW5nIFR5cGU=</PHRASE>
+			<PHRASE Label="la_title_AddingShippingZone" Module="In-Commerce" Type="1">QWRkaW5nIFNoaXBwaW5nIFpvbmU=</PHRASE>
+			<PHRASE Label="la_title_AddingTaxZone" Module="In-Commerce" Type="1">QWRkaW5nIFRheCBab25l</PHRASE>
+			<PHRASE Label="la_title_Adding_Affiliate" Module="In-Commerce" Type="1">QWRkaW5nIEFmZmlsaWF0ZQ==</PHRASE>
+			<PHRASE Label="la_title_Adding_Affiliate_Payment_Type" Module="In-Commerce" Type="1">QWRkaW5nIEFmZmlsaWF0ZSBQYXltZW50IFR5cGU=</PHRASE>
+			<PHRASE Label="la_title_Adding_Affiliate_Plan" Module="In-Commerce" Type="1">QWRkaW5nIEFmZmlsaWF0ZSBQbGFu</PHRASE>
+			<PHRASE Label="la_title_Adding_Coupon" Module="In-Commerce" Type="1">QWRkaW5nIENvdXBvbg==</PHRASE>
+			<PHRASE Label="la_title_Adding_Discount" Module="In-Commerce" Type="1">QWRkaW5nIERpc2NvdW50</PHRASE>
+			<PHRASE Label="la_title_Adding_File" Module="In-Commerce" Type="1">QWRkaW5nIEZpbGU=</PHRASE>
+			<PHRASE Label="la_title_Adding_Option" Module="In-Commerce" Type="1">QWRkaW5nIE9wdGlvbg==</PHRASE>
+			<PHRASE Label="la_title_Adding_Order" Module="In-Commerce" Type="1">QWRkaW5nIE9yZGVy</PHRASE>
+			<PHRASE Label="la_title_Adding_Order_Item" Module="In-Commerce" Type="1">QWRkaW5nIE9yZGVyIEl0ZW0=</PHRASE>
+			<PHRASE Label="la_title_Adding_PriceBracket" Module="In-Commerce" Type="1">QWRkaW5nIFByaWNlIEJyYWNrZXQ=</PHRASE>
+			<PHRASE Label="la_title_Adding_Product" Module="In-Commerce" Type="1">QWRkaW5nIFByb2R1Y3Q=</PHRASE>
+			<PHRASE Label="la_title_AffiliatePayments" Module="In-Commerce" Type="1">QWZmaWxpYXRlIFBheW1lbnRz</PHRASE>
+			<PHRASE Label="la_title_AffiliatePaymentTypes" Module="In-Commerce" Type="1">QWZmaWxpYXRlIFBheW1lbnQgVHlwZXM=</PHRASE>
+			<PHRASE Label="la_title_AffiliatePlans" Module="In-Commerce" Type="1">QWZmaWxpYXRlIFBsYW5z</PHRASE>
+			<PHRASE Label="la_title_AffiliatePlansBrackets" Module="In-Commerce" Type="1">QnJhY2tldHM=</PHRASE>
+			<PHRASE Label="la_title_Affiliates" Module="In-Commerce" Type="1">QWZmaWxpYXRlcw==</PHRASE>
+			<PHRASE Label="la_title_ApplyModifier" Module="In-Commerce" Type="1">QXBwbHkgTW9kaWZpZXI=</PHRASE>
+			<PHRASE Label="la_title_BackOrders" Module="In-Commerce" Type="1">QmFja29yZGVycyBMaXN0</PHRASE>
+			<PHRASE Label="la_title_Brackets" Module="In-Commerce" Type="1">QnJhY2tldHM=</PHRASE>
+			<PHRASE Label="la_title_Costs" Module="In-Commerce" Type="1">Q29zdHM=</PHRASE>
+			<PHRASE Label="la_title_CouponItems" Module="In-Commerce" Type="1">Q291cG9uIEl0ZW1z</PHRASE>
+			<PHRASE Label="la_title_Coupons" Module="In-Commerce" Type="1">Q291cG9ucw==</PHRASE>
+			<PHRASE Label="la_title_CouponSelector" Module="In-Commerce" Type="1">Q291cG9uIFNlbGVjdG9y</PHRASE>
+			<PHRASE Label="la_title_Currencies" Module="In-Commerce" Type="1">Q3VycmVuY2llcw==</PHRASE>
+			<PHRASE Label="la_title_DiscountItems" Module="In-Commerce" Type="1">RGlzY291bnQgSXRlbXM=</PHRASE>
+			<PHRASE Label="la_title_Discounts" Module="In-Commerce" Type="1">RGlzY291bnRz</PHRASE>
+			<PHRASE Label="la_title_EditingCurrency" Module="In-Commerce" Type="1">RWRpdGluZyBDdXJyZW5jeQ==</PHRASE>
+			<PHRASE Label="la_title_EditingGiftCertificate" Module="In-Commerce" Type="1">RWRpdGluZyBHaWZ0IENlcnRpZmljYXRl</PHRASE>
+			<PHRASE Label="la_title_EditingManufacturer" Module="In-Commerce" Type="1">RWRpdGluZyBNYW51ZmFjdHVyZXI=</PHRASE>
+			<PHRASE Label="la_title_EditingPaymentType" Module="In-Commerce" Type="1">RWRpdGluZyBQYXltZW50IFR5cGU=</PHRASE>
+			<PHRASE Label="la_title_EditingShippingQuoteEngine" Module="In-Commerce" Type="1">RWRpdGluZyBTaGlwcGluZyBRdW90ZSBFbmdpbmU=</PHRASE>
+			<PHRASE Label="la_title_EditingShippingType" Module="In-Commerce" Type="1">RWRpdGluZyBTaGlwcGluZyBUeXBl</PHRASE>
+			<PHRASE Label="la_title_EditingShippingZone" Module="In-Commerce" Type="1">RWRpdGluZyBTaGlwcGluZyBab25l</PHRASE>
+			<PHRASE Label="la_title_EditingTaxZone" Module="In-Commerce" Type="1">RWRpdGluZyBUYXggWm9uZQ==</PHRASE>
+			<PHRASE Label="la_title_Editing_Affiliate" Module="In-Commerce" Type="1">RWRpdGluZyBBZmZpbGlhdGU=</PHRASE>
+			<PHRASE Label="la_title_Editing_Affiliate_Payment_Type" Module="In-Commerce" Type="1">RWRpdGluZyBBZmZpbGlhdGUgUGF5bWVudCBUeXBl</PHRASE>
+			<PHRASE Label="la_title_Editing_Affiliate_Plan" Module="In-Commerce" Type="1">RWRpdGluZyBBZmZpbGlhdGUgUGxhbg==</PHRASE>
+			<PHRASE Label="la_title_Editing_Coupon" Module="In-Commerce" Type="1">RWRpdGluZyBDb3Vwb24=</PHRASE>
+			<PHRASE Label="la_title_Editing_Discount" Module="In-Commerce" Type="1">RWRpdGluZyBEaXNjb3VudA==</PHRASE>
+			<PHRASE Label="la_title_Editing_File" Module="In-Commerce" Type="1">RWRpdGluZyBGaWxl</PHRASE>
+			<PHRASE Label="la_title_Editing_Option" Module="In-Commerce" Type="1">RWRpdGluZyBPcHRpb24=</PHRASE>
+			<PHRASE Label="la_title_Editing_Order" Module="In-Commerce" Type="1">RWRpdGluZyBPcmRlcg==</PHRASE>
+			<PHRASE Label="la_title_Editing_Order_Item" Module="In-Commerce" Type="1">RWRpdGluZyBPcmRlciBJdGVt</PHRASE>
+			<PHRASE Label="la_title_Editing_PriceBracket" Module="In-Commerce" Type="1">RWRpdGluZyBQcmljZSBCcmFja2V0</PHRASE>
+			<PHRASE Label="la_title_Editing_Product" Module="In-Commerce" Type="1">RWRpdGluZyBQcm9kdWN0</PHRASE>
+			<PHRASE Label="la_title_FileDownloads" Module="In-Commerce" Type="1">RmlsZSBEb3dubG9hZHM=</PHRASE>
+			<PHRASE Label="la_title_Gateway" Module="In-Commerce" Type="1">R2F0ZXdheQ==</PHRASE>
+			<PHRASE Label="la_title_GiftCertificates" Module="In-Commerce" Type="1">R2lmdCBDZXJ0aWZpY2F0ZXM=</PHRASE>
+			<PHRASE Label="la_title_ImportProducts" Module="In-Commerce" Type="1">SW1wb3J0IFByb2R1Y3Rz</PHRASE>
+			<PHRASE Label="la_title_In-Commerce" Module="In-Commerce" Type="1">RS1jb21tZXJjZQ==</PHRASE>
+			<PHRASE Label="la_title_IncompleteOrders" Module="In-Commerce" Type="1">SW5jb21wbGV0ZSBPcmRlcnMgTGlzdA==</PHRASE>
+			<PHRASE Label="la_title_ManagingOptionCombinations" Module="In-Commerce" Type="1">TWFuYWdpbmcgT3B0aW9uIENvbWJpbmF0aW9ucw==</PHRASE>
+			<PHRASE Label="la_title_ManagingShippingOptions" Module="In-Commerce" Type="1">TWFuYWdlIFNoaXBwaW5nIFR5cGVz</PHRASE>
+			<PHRASE Label="la_title_Manufacturers" Module="In-Commerce" Type="1">TWFudWZhY3R1cmVycw==</PHRASE>
+			<PHRASE Label="la_title_NewCurrency" Module="In-Commerce" Type="1">TmV3IEN1cnJlbmN5</PHRASE>
+			<PHRASE Label="la_title_NewGiftCertificate" Module="In-Commerce" Type="1">TmV3IEdpZnQgQ2VydGlmaWNhdGU=</PHRASE>
+			<PHRASE Label="la_title_NewManufacturer" Module="In-Commerce" Type="1">TmV3IG1hbnVmYWN0dXJlcg==</PHRASE>
+			<PHRASE Label="la_title_NewPaymentType" Module="In-Commerce" Type="1">TmV3IFBheW1lbnQgVHlwZQ==</PHRASE>
+			<PHRASE Label="la_title_NewProduct" Module="In-Commerce" Type="1">TmV3IFByb2R1Y3Q=</PHRASE>
+			<PHRASE Label="la_title_NewShippingType" Module="In-Commerce" Type="1">TmV3IFNoaXBwaW5nIFR5cGU=</PHRASE>
+			<PHRASE Label="la_title_NewShippingZone" Module="In-Commerce" Type="1">TmV3IFNoaXBwaW5nIFpvbmU=</PHRASE>
+			<PHRASE Label="la_title_NewTax" Module="In-Commerce" Type="1">TmV3IFRheCBab25l</PHRASE>
+			<PHRASE Label="la_title_New_Affiliate" Module="In-Commerce" Type="1">TmV3IEFmZmlsaWF0ZQ==</PHRASE>
+			<PHRASE Label="la_title_New_Affiliate_Payment_Type" Module="In-Commerce" Type="1">TmV3IEFmZmlsaWF0ZSBQYXltZW50IFR5cGU=</PHRASE>
+			<PHRASE Label="la_title_New_Affiliate_Plan" Module="In-Commerce" Type="1">TmV3IEFmZmlsaWF0ZSBQbGFu</PHRASE>
+			<PHRASE Label="la_title_New_Coupon" Module="In-Commerce" Type="1">TmV3IENvdXBvbg==</PHRASE>
+			<PHRASE Label="la_title_New_Discount" Module="In-Commerce" Type="1">TmV3IERpc2NvdW50</PHRASE>
+			<PHRASE Label="la_title_New_File" Module="In-Commerce" Type="1">TmV3IEZpbGU=</PHRASE>
+			<PHRASE Label="la_title_New_Option" Module="In-Commerce" Type="1">TmV3IE9wdGlvbg==</PHRASE>
+			<PHRASE Label="la_title_New_Order" Module="In-Commerce" Type="1">TmV3IE9yZGVy</PHRASE>
+			<PHRASE Label="la_title_New_PriceBracket" Module="In-Commerce" Type="1">TmV3IFByaWNlIEJyYWNrZXQ=</PHRASE>
+			<PHRASE Label="la_title_OrderBilling" Module="In-Commerce" Type="1">QmlsbGluZw==</PHRASE>
+			<PHRASE Label="la_title_OrderGWResult" Module="In-Commerce" Type="1">VHJhbnNhY3Rpb24gRGV0YWlscw==</PHRASE>
+			<PHRASE Label="la_title_OrderItems" Module="In-Commerce" Type="1">SXRlbXM=</PHRASE>
+			<PHRASE Label="la_title_OrderPreview" Module="In-Commerce" Type="1">UHJldmlldw==</PHRASE>
+			<PHRASE Label="la_title_Orders" Module="In-Commerce" Type="1">T3JkZXJz</PHRASE>
+			<PHRASE Label="la_title_OrdersArchived" Module="In-Commerce" Type="1">QXJjaGl2ZWQgT3JkZXJzIExpc3Q=</PHRASE>
+			<PHRASE Label="la_title_OrdersDenied" Module="In-Commerce" Type="1">RGVuaWVkIE9yZGVycyBMaXN0</PHRASE>
+			<PHRASE Label="la_title_OrdersExport" Module="In-Commerce" Type="1">T3JkZXJzIEV4cG9ydA==</PHRASE>
+			<PHRASE Label="la_title_OrderShipping" Module="In-Commerce" Type="1">U2hpcHBpbmc=</PHRASE>
+			<PHRASE Label="la_title_OrdersProcessed" Module="In-Commerce" Type="1">UHJvY2Vzc2VkIE9yZGVycyBMaXN0</PHRASE>
+			<PHRASE Label="la_title_OrdersReturns" Module="In-Commerce" Type="1">T3JkZXJzIHdpdGggUmV0dXJucw==</PHRASE>
+			<PHRASE Label="la_title_OrdersSearch" Module="In-Commerce" Type="1">Rm91bmQgT3JkZXJzIExpc3Q=</PHRASE>
+			<PHRASE Label="la_title_OrdersToShip" Module="In-Commerce" Type="1">VG8gU2hpcCBPcmRlcnMgTGlzdA==</PHRASE>
+			<PHRASE Label="la_title_Payments" Module="In-Commerce" Type="1">UGF5bWVudHM=</PHRASE>
+			<PHRASE Label="la_title_PaymentTypes" Module="In-Commerce" Type="1">UGF5bWVudCBUeXBlcw==</PHRASE>
+			<PHRASE Label="la_title_PayOut_To" Module="In-Commerce" Type="1">UGF5IE91dCBUbw==</PHRASE>
+			<PHRASE Label="la_title_PendingOrders" Module="In-Commerce" Type="1">UGVuZGluZyBPcmRlcnMgTGlzdA==</PHRASE>
+			<PHRASE Label="la_title_Products" Module="In-Commerce" Type="1">UHJvZHVjdHM=</PHRASE>
+			<PHRASE Label="la_title_ProductsExport" Module="In-Commerce" Type="1">UHJvZHVjdHMgRXhwb3J0</PHRASE>
+			<PHRASE Label="la_title_Product_Access" Module="In-Commerce" Type="1">QWNjZXNz</PHRASE>
+			<PHRASE Label="la_title_Product_AccessPricing" Module="In-Commerce" Type="1">UHJpY2luZw==</PHRASE>
+			<PHRASE Label="la_title_Product_Files" Module="In-Commerce" Type="1">RmlsZXM=</PHRASE>
+			<PHRASE Label="la_title_Product_Inventory" Module="In-Commerce" Type="1">SW52ZW50b3J5</PHRASE>
+			<PHRASE Label="la_title_Product_Options" Module="In-Commerce" Type="1">UHJvZHVjdCBPcHRpb25z</PHRASE>
+			<PHRASE Label="la_title_Product_PackageContent" Module="In-Commerce" Type="1">UGFja2FnZSBDb250ZW50</PHRASE>
+			<PHRASE Label="la_title_Product_Pricing" Module="In-Commerce" Type="1">UHJpY2luZw==</PHRASE>
+			<PHRASE Label="la_title_ReportOptions" Module="In-Commerce" Type="1">U2FsZXMgUmVwb3J0IC0gT3B0aW9ucw==</PHRASE>
+			<PHRASE Label="la_title_ReportResults" Module="In-Commerce" Type="1">U2FsZXMgUmVwb3J0IFJlc3VsdHM=</PHRASE>
+			<PHRASE Label="la_title_SalesReportChart" Module="In-Commerce" Type="1">U2FsZXMgUmVwb3J0IENoYXJ0</PHRASE>
+			<PHRASE Label="la_title_ShippingQuoteEngines" Module="In-Commerce" Type="1">U2hpcHBpbmcgUXVvdGUgRW5naW5lcw==</PHRASE>
+			<PHRASE Label="la_title_ShippingTypes" Module="In-Commerce" Type="1">U2hpcHBpbmcgVHlwZXM=</PHRASE>
+			<PHRASE Label="la_title_Taxes" Module="In-Commerce" Type="1">VGF4ZXM=</PHRASE>
+			<PHRASE Label="la_title_Zones" Module="In-Commerce" Type="1">Wm9uZXM=</PHRASE>
+			<PHRASE Label="la_TJS" Module="In-Commerce" Type="1">U29tb25p</PHRASE>
+			<PHRASE Label="la_TMM" Module="In-Commerce" Type="1">TWFuYXQ=</PHRASE>
+			<PHRASE Label="la_TND" Module="In-Commerce" Type="1">VHVuaXNpYW4gRGluYXI=</PHRASE>
+			<PHRASE Label="la_Tooltip_Add_Items" Module="In-Commerce" Type="1">QWRkIEl0ZW1z</PHRASE>
+			<PHRASE Label="la_ToolTip_Add_Product" Module="In-Commerce" Type="1">QWRkIFByb2R1Y3Q=</PHRASE>
+			<PHRASE Label="la_ToolTip_Archive" Module="In-Commerce" Type="1">QXJjaGl2ZQ==</PHRASE>
+			<PHRASE Label="la_tooltip_Arrange" Module="In-Commerce" Type="1">QXJyYW5nZQ==</PHRASE>
+			<PHRASE Label="la_tooltip_ClearAll" Module="In-Commerce" Type="1">Q2xlYXIgQWxs</PHRASE>
+			<PHRASE Label="la_tooltip_EntireOrder" Module="In-Commerce" Type="1">RW50aXJlIE9yZGVy</PHRASE>
+			<PHRASE Label="la_tooltip_Flip" Module="In-Commerce" Type="1">RmxpcA==</PHRASE>
+			<PHRASE Label="la_ToolTip_GoToOrder" Module="In-Commerce" Type="1">R28gdG8gT3JkZXI=</PHRASE>
+			<PHRASE Label="la_tooltip_Infinity" Module="In-Commerce" Type="1">SW5maW5pdHk=</PHRASE>
+			<PHRASE Label="la_tooltip_Modify" Module="In-Commerce" Type="1">TW9kaWZ5</PHRASE>
+			<PHRASE Label="la_tooltip_MoreBrackets" Module="In-Commerce" Type="1">TW9yZSBCcmFja2V0cw==</PHRASE>
+			<PHRASE Label="la_ToolTip_NewAffiliatePaymentType" Module="In-Commerce" Type="1">TmV3IEFmZmlsaWF0ZSBQYXltZW50IFR5cGU=</PHRASE>
+			<PHRASE Label="la_ToolTip_NewGiftCertificate" Module="In-Commerce" Type="1">TmV3IEdpZnQgQ2VydGlmaWNhdGU=</PHRASE>
+			<PHRASE Label="la_tooltip_NewManufacturer" Module="In-Commerce" Type="1">TmV3IE1hbnVmYWN0dXJlcg==</PHRASE>
+			<PHRASE Label="la_ToolTip_NewOption" Module="In-Commerce" Type="1">TmV3IE9wdGlvbg==</PHRASE>
+			<PHRASE Label="la_tooltip_NewPaymentType" Module="In-Commerce" Type="1">TmV3IFBheW1lbnQgVHlwZQ==</PHRASE>
+			<PHRASE Label="la_ToolTip_NewPricing" Module="In-Commerce" Type="1">TmV3IFByaWNpbmc=</PHRASE>
+			<PHRASE Label="la_tooltip_newproduct" Module="In-Commerce" Type="1">TmV3IFByb2R1Y3Q=</PHRASE>
+			<PHRASE Label="la_ToolTip_New_Affiliate" Module="In-Commerce" Type="1">TmV3IEFmZmlsaWF0ZQ==</PHRASE>
+			<PHRASE Label="la_ToolTip_New_Affiliate_Plan" Module="In-Commerce" Type="1">TmV3IEFmZmlsaWF0ZSBQbGFu</PHRASE>
+			<PHRASE Label="la_tooltip_New_Coupon" Module="In-Commerce" Type="0">TmV3IENvdXBvbg==</PHRASE>
+			<PHRASE Label="la_tooltip_New_Discount" Module="In-Commerce" Type="0">TmV3IERpc2NvdW50</PHRASE>
+			<PHRASE Label="la_ToolTip_New_Order" Module="In-Commerce" Type="1">TmV3IE9yZGVy</PHRASE>
+			<PHRASE Label="la_ToolTip_New_PricingLimit" Module="In-Commerce" Type="1">TmV3IFByaWNpbmcgTGltaXQ=</PHRASE>
+			<PHRASE Label="la_tooltip_new_products" Module="In-Commerce" Type="1">QWRkIG5ldyBwcm9kdWN0cw==</PHRASE>
+			<PHRASE Label="la_tooltip_new_shipping" Module="In-Commerce" Type="1">TmV3IFNoaXBwaW5nIHR5cGU=</PHRASE>
+			<PHRASE Label="la_tooltip_new_Zone" Module="In-Commerce" Type="1">TmV3IFpvbmU=</PHRASE>
+			<PHRASE Label="la_ToolTip_PayOut" Module="In-Commerce" Type="1">UGF5IE91dA==</PHRASE>
+			<PHRASE Label="la_tooltip_PlaceOrder" Module="In-Commerce" Type="1">UGxhY2UgT3JkZXI=</PHRASE>
+			<PHRASE Label="la_Tooltip_Process" Module="In-Commerce" Type="1">UHJvY2Vzcw==</PHRASE>
+			<PHRASE Label="la_Tooltip_ResetToBilling" Module="In-Commerce" Type="1">UmVzZXQgVG8gQmlsbGluZw==</PHRASE>
+			<PHRASE Label="la_ToolTip_ResetToPending" Module="In-Commerce" Type="1">UmVzZXQgVG8gUGVuZGluZw==</PHRASE>
+			<PHRASE Label="la_ToolTip_ResetToShipping" Module="In-Commerce" Type="1">UmVzZXQgVG8gU2hpcHBpbmc=</PHRASE>
+			<PHRASE Label="la_Tooltip_ResetToUser" Module="In-Commerce" Type="1">UmVzZXQgVG8gVXNlcg==</PHRASE>
+			<PHRASE Label="la_tooltip_RunReport" Module="In-Commerce" Type="1">UnVuIFJlcG9ydA==</PHRASE>
+			<PHRASE Label="la_ToolTip_SaveAndPrint" Module="In-Commerce" Type="1">U2F2ZSAmIFByaW50</PHRASE>
+			<PHRASE Label="la_Tooltip_Ship" Module="In-Commerce" Type="1">U2hpcA==</PHRASE>
+			<PHRASE Label="la_ToolTip_UpdateRates" Module="In-Commerce" Type="1">VXBkYXRlIFJhdGVz</PHRASE>
+			<PHRASE Label="la_tooltip_view_chart" Module="In-Commerce" Type="1">VmlldyBDaGFydA==</PHRASE>
+			<PHRASE Label="la_TOP" Module="In-Commerce" Type="1">UGFgYW5nYQ==</PHRASE>
+			<PHRASE Label="la_ToShip" Module="In-Commerce" Type="1">VG8gU2hpcA==</PHRASE>
+			<PHRASE Label="la_TotalSavings" Module="In-Commerce" Type="1">VG90YWwgU2F2aW5ncw==</PHRASE>
+			<PHRASE Label="la_TPE" Module="In-Commerce" Type="1">VGltb3IgRXNjdWRv</PHRASE>
+			<PHRASE Label="la_TRL" Module="In-Commerce" Type="1">VHVya2lzaCBMaXJh</PHRASE>
+			<PHRASE Label="la_TRY" Module="In-Commerce" Type="1">VFJZ</PHRASE>
+			<PHRASE Label="la_TTD" Module="In-Commerce" Type="1">VHJpbmlkYWQgYW5kIFRvYmFnbyBEb2xsYXI=</PHRASE>
+			<PHRASE Label="la_TWD" Module="In-Commerce" Type="1">TmV3IFRhaXdhbiBEb2xsYXI=</PHRASE>
+			<PHRASE Label="la_Txt_=" Module="In-Commerce" Type="1">RXF1YWxz</PHRASE>
+			<PHRASE Label="la_TZS" Module="In-Commerce" Type="1">VGFuemFuaWFuIFNoaWxsaW5n</PHRASE>
+			<PHRASE Label="la_UAH" Module="In-Commerce" Type="1">SHJ5dm5pYQ==</PHRASE>
+			<PHRASE Label="la_UGX" Module="In-Commerce" Type="1">VWdhbmRhIFNoaWxsaW5n</PHRASE>
+			<PHRASE Label="la_UpdateRate" Module="In-Commerce" Type="1">VXBkYXRlIFJhdGUgVG8gUHJpbWFyeQ==</PHRASE>
+			<PHRASE Label="la_USD" Module="In-Commerce" Type="1">VVMgRG9sbGFy</PHRASE>
+			<PHRASE Label="la_Used" Module="In-Commerce" Type="1">VXNlZA==</PHRASE>
+			<PHRASE Label="la_UserDefined" Module="In-Commerce" Type="1">VXNlciBEZWZpbmVk</PHRASE>
+			<PHRASE Label="la_USN" Module="In-Commerce" Type="1">VVMgRG9sbGFyIChOZXh0IGRheSk=</PHRASE>
+			<PHRASE Label="la_USS" Module="In-Commerce" Type="1">VVMgRG9sbGFyIChTYW1lIGRheSk=</PHRASE>
+			<PHRASE Label="la_UYU" Module="In-Commerce" Type="1">UGVzbyBVcnVndWF5bw==</PHRASE>
+			<PHRASE Label="la_UZS" Module="In-Commerce" Type="1">VXpiZWtpc3RhbiBTdW0=</PHRASE>
+			<PHRASE Label="la_VAT" Module="In-Commerce" Type="1">U2FsZXMgVGF4L1ZBVA==</PHRASE>
+			<PHRASE Label="la_VEB" Module="In-Commerce" Type="1">Qm9saXZhcg==</PHRASE>
+			<PHRASE Label="la_ViewLabel" Module="In-Commerce" Type="1">VmlldyBMYWJlbA==</PHRASE>
+			<PHRASE Label="la_VND" Module="In-Commerce" Type="1">RG9uZw==</PHRASE>
+			<PHRASE Label="la_VUV" Module="In-Commerce" Type="1">VmF0dQ==</PHRASE>
+			<PHRASE Label="la_WarningCurrenciesNotUsed" Module="In-Commerce" Type="1">Rm9sbG93aW5nIGN1cnJlbmNpZXMgYXJlIG5vdCBzdXBwb3J0ZWQgaW4gYW55IHBheW1lbnQgdHlwZXM=</PHRASE>
+			<PHRASE Label="la_WarningRemoveUnusedCurrencies" Module="In-Commerce" Type="1">V291bGQgeW91IGxpa2UgdG8gZGlzYWJsZSB0aGVt</PHRASE>
+			<PHRASE Label="la_warning_ChangeInventoryStatus" Module="In-Commerce" Type="1">QXJlIHlvdSBzdXJlIHlvdSB3YW50IHRvIGNoYW5nZSBJbnZlbnRvcnkgU3RhdHVzPyBDaGFuZ2luZyB0aGUgc3RhdHVzIG1heSBhZmZlY3QgY3VycmVudCBvcmRlcnMgYW5kIHByb2R1Y3QgcXVhbnRpdGllcy4=</PHRASE>
+			<PHRASE Label="la_warning_SelectOptionCombination" Module="In-Commerce" Type="1">U2VsZWN0IG9wdGlvbiBjb21iaW5hdGlvbiB0byB1c2U=</PHRASE>
+			<PHRASE Label="la_warning_UpdateAllCurrencyRates" Module="In-Commerce" Type="1">RG8geW91IHdhbnQgdG8gdXBkYXRlIGFsbCByYXRlcw==</PHRASE>
+			<PHRASE Label="la_warning_UpdateSelectedCurrencyRates" Module="In-Commerce" Type="1">QXJlIHlvdSBzdXJlIHlvdSB3YW50IHRvIHVwZGF0ZSB0aGUgc2VsZWN0ZWQgcmF0ZXM=</PHRASE>
+			<PHRASE Label="la_WholeOrder" Module="In-Commerce" Type="1">V2hvbGUgT3JkZXI=</PHRASE>
+			<PHRASE Label="la_WST" Module="In-Commerce" Type="1">VGFsYQ==</PHRASE>
+			<PHRASE Label="la_XAF" Module="In-Commerce" Type="1">Q0ZBIEZyYW5jIEJFQUM=</PHRASE>
+			<PHRASE Label="la_XCD" Module="In-Commerce" Type="1">RWFzdCBDYXJpYmJlYW4gRG9sbGFy</PHRASE>
+			<PHRASE Label="la_XDR" Module="In-Commerce" Type="1">WERS</PHRASE>
+			<PHRASE Label="la_XOF" Module="In-Commerce" Type="1">Q0ZBIEZyYW5jIEJDRUFP</PHRASE>
+			<PHRASE Label="la_XPF" Module="In-Commerce" Type="1">Q0ZQIEZyYW5j</PHRASE>
+			<PHRASE Label="la_YER" Module="In-Commerce" Type="1">WWVtZW5pIFJpYWw=</PHRASE>
+			<PHRASE Label="la_YUM" Module="In-Commerce" Type="1">WXVnb3NsYXZpYW4gRGluYXI=</PHRASE>
+			<PHRASE Label="la_ZAR" Module="In-Commerce" Type="1">UmFuZA==</PHRASE>
+			<PHRASE Label="la_Zeros" Module="In-Commerce" Type="1">WmVyb3M=</PHRASE>
+			<PHRASE Label="la_ZIP" Module="In-Commerce" Type="1">WklQ</PHRASE>
+			<PHRASE Label="la_ZMK" Module="In-Commerce" Type="1">S3dhY2hh</PHRASE>
+			<PHRASE Label="la_zones_AvailableCountries" Module="In-Commerce" Type="1">QXZhaWxhYmxlIGNvdW50cmllcw==</PHRASE>
+			<PHRASE Label="la_zones_AvailableStates" Module="In-Commerce" Type="1">QXZhaWxhYmxlIHN0YXRlcw==</PHRASE>
+			<PHRASE Label="la_zones_AvailableZips" Module="In-Commerce" Type="1">QXZhaWxhYmxlIFpJUCBjb2Rlcw==</PHRASE>
+			<PHRASE Label="la_zones_SelectedCountries" Module="In-Commerce" Type="1">U2hpcCB0byBDb3VudHJpZXM=</PHRASE>
+			<PHRASE Label="la_zones_SelectedStates" Module="In-Commerce" Type="1">U2hpcCB0byBTdGF0ZXMvUHJvdmljZXM=</PHRASE>
+			<PHRASE Label="la_zones_SelectedZips" Module="In-Commerce" Type="1">U2hpcCB0byBaSVAgY29kZXM=</PHRASE>
+			<PHRASE Label="la_ZWD" Module="In-Commerce" Type="1">WmltYmFid2UgRG9sbGFy</PHRASE>
+			<PHRASE Label="lu_AdditionalInfo" Module="In-Commerce" Type="0">QWRkaXRpb25hbCBJbmZv</PHRASE>
+			<PHRASE Label="lu_addressmodificationblocked" Module="In-Commerce" Type="0">QWRkcmVzcyBpcyBsb2NrZWQgZm9yIG1vZGlmaWNhdGlvbnM=</PHRASE>
+			<PHRASE Label="lu_AddressUsedAs" Module="In-Commerce" Type="0">QWRkcmVzcyBVc2VkIEFz</PHRASE>
+			<PHRASE Label="lu_AdjustShippingManually" Module="In-Commerce" Type="0">U3BsaXQgeW91ciBvcmRlciBhbmQgY2hhbmdlIHNoaXBwaW5nIG9wdGlvbnM=</PHRASE>
+			<PHRASE Label="lu_Affiliate" Module="In-Commerce" Type="0">QWZmaWxpYXRl</PHRASE>
+			<PHRASE Label="lu_affiliateispendingordisabled" Module="In-Commerce" Type="0">WW91ciBBZmZsaWF0ZSBhY2NvdW50IGlzIHBlbmRpbmcgb3IgZGlzYWJsZWQ=</PHRASE>
+			<PHRASE Label="lu_AffiliateMaterials" Module="In-Commerce" Type="0">QWZmaWxpYXRlIE1hdGVyaWFscw==</PHRASE>
+			<PHRASE Label="lu_AffiliateMaterialsText" Module="In-Commerce" Type="0">QWR2ZXJ0aXNpbmcgbWF0ZXJpYWxzIC0gbGlua3MsIGNvZGUgc2FtcGxlcywgYmFubmVycyBldGMu</PHRASE>
+			<PHRASE Label="lu_AffiliatePayments" Module="In-Commerce" Type="0">QWZmaWxpYXRlIFBheW1lbnRz</PHRASE>
+			<PHRASE Label="lu_AffiliatePaymentsText" Module="In-Commerce" Type="0">TG9nIG9mIGNvbW1pc3Npb24gcGF5bWVudHM=</PHRASE>
+			<PHRASE Label="lu_affiliatepaymenttypechangedmessage" Module="In-Commerce" Type="0">VGhhbmtzIHlvdS4gWW91ciBwYXltZW50IHR5cGUgaGFzIGJlZW4gY2hhbmdlZC4=</PHRASE>
+			<PHRASE Label="lu_AffiliateStatisticsText" Module="In-Commerce" Type="0">VmlzaXRzIGFuZCBvcmRlcnMgc3RhdGlzdGljcw==</PHRASE>
+			<PHRASE Label="lu_all_available_backordered" Module="In-Commerce" Type="0">QWxsIGF2YWlsYWJsZS9iYWNrb3JkZXJlZCBpdGVtcw==</PHRASE>
+			<PHRASE Label="lu_BecomeAnAffiliateDescription" Module="In-Commerce" Type="0">SW5zdHJ1Y3Rpb25zIGFuZCBSZWd1bGF0aW9ucw==</PHRASE>
+			<PHRASE Label="lu_billing_Address" Module="In-Commerce" Type="0">QWRkcmVzcw==</PHRASE>
+			<PHRASE Label="lu_billing_CardExpiration" Module="In-Commerce" Type="0">Q2FyZCBFeHBpcmF0aW9u</PHRASE>
+			<PHRASE Label="lu_billing_CardType" Module="In-Commerce" Type="0">Q2FyZCBUeXBl</PHRASE>
+			<PHRASE Label="lu_billing_Company" Module="In-Commerce" Type="0">Q29tcGFueQ==</PHRASE>
+			<PHRASE Label="lu_billing_CreditCardNumber" Module="In-Commerce" Type="0">Q3JlZGl0IENhcmQgTnVtYmVy</PHRASE>
+			<PHRASE Label="lu_billing_CVV2" Module="In-Commerce" Type="0">Q1ZWMg==</PHRASE>
+			<PHRASE Label="lu_billing_Email" Module="In-Commerce" Type="0">RS1tYWls</PHRASE>
+			<PHRASE Label="lu_billing_NameOnCard" Module="In-Commerce" Type="0">TmFtZSBvbiB0aGUgQ2FyZA==</PHRASE>
+			<PHRASE Label="lu_btn_BuyNow" Module="In-Commerce" Type="0">QnV5IE5vdw==</PHRASE>
+			<PHRASE Label="lu_btn_DownloadNow" Module="In-Commerce" Type="0">RG93bmxvYWQgTm93</PHRASE>
+			<PHRASE Label="lu_btn_ManageAddresses" Module="In-Commerce" Type="0">TWFuYWdlIEFkZHJlc3Nlcw==</PHRASE>
+			<PHRASE Label="lu_btn_NewAddress" Module="In-Commerce" Type="0">TmV3IEFkZHJlc3M=</PHRASE>
+			<PHRASE Label="lu_btn_ProceedToPreview" Module="In-Commerce" Type="0">UHJvY2VlZCB0byBwcmV2aWV3</PHRASE>
+			<PHRASE Label="lu_btn_RateProduct" Module="In-Commerce" Type="0">UmF0ZSBQcm9kdWN0</PHRASE>
+			<PHRASE Label="lu_btn_RateThisProduct" Module="In-Commerce" Type="0">UmF0ZSB0aGlzIHByb2R1Y3Q=</PHRASE>
+			<PHRASE Label="lu_btn_RemoveFromWishList" Module="In-Commerce" Type="0">UmVtb3ZlIEZyb20gV2lzaCBMaXN0</PHRASE>
+			<PHRASE Label="lu_btn_ReviewThisProduct" Module="In-Commerce" Type="0">Q29tbWVudCB0aGlzIFByb2R1Y3Q=</PHRASE>
+			<PHRASE Label="lu_btn_UpdateAddress" Module="In-Commerce" Type="0">VXBkYXRlIEFkZHJlc3M=</PHRASE>
+			<PHRASE Label="lu_CancelRecurring_confirm" Module="In-Commerce" Type="0">UmVjdXJyaW5nIE9yZGVyIENhbmNlbCBDb25maXJtYXRpb24=</PHRASE>
+			<PHRASE Label="lu_cancelrecurring_confirmed" Module="In-Commerce" Type="0">UmVvY2N1cnJpbmcgYmlsbGluZyBpcyBjYW5jZWxlZC4=</PHRASE>
+			<PHRASE Label="lu_CancelRecurring_confirm_prompt" Module="In-Commerce" Type="0">QXJlIHlvdSBzdXJlIHlvdSB3YW50IHRvIGNhbmNlbCB0aGlzIHJlY3VycmluZyBvcmRlcj8=</PHRASE>
+			<PHRASE Label="lu_CancelRecurring_ok" Module="In-Commerce" Type="0">WW91ciByZWN1cnJpbmcgb3JkZXIgaGFzIGJlZW4gc3VjY2Vzc2Z1bGx5IGNhbmNlbGxlZA==</PHRASE>
+			<PHRASE Label="lu_CancelRecurring_title" Module="In-Commerce" Type="0">Q2FuY2VsIFJlY3VycmluZyBPcmRlcg==</PHRASE>
+			<PHRASE Label="lu_cart_BackorderFlag" Module="In-Commerce" Type="0">KGJhY2tvcmRlcmVkKQ==</PHRASE>
+			<PHRASE Label="lu_cart_Checkout" Module="In-Commerce" Type="0">Q2hlY2tvdXQ=</PHRASE>
+			<PHRASE Label="lu_Cart_FreeShippingAvailable" Module="In-Commerce" Type="0">ZnJlZSBzaGlwcGluZw==</PHRASE>
+			<PHRASE Label="lu_cart_OrderTotal" Module="In-Commerce" Type="0">T3JkZXIgVG90YWw=</PHRASE>
+			<PHRASE Label="lu_cart_TotalItems" Module="In-Commerce" Type="0">VG90YWwgSXRlbXM=</PHRASE>
+			<PHRASE Label="lu_cart_ViewCart" Module="In-Commerce" Type="0">VmlldyBDYXJ0</PHRASE>
+			<PHRASE Label="lu_cc_expired" Module="In-Commerce" Type="0">Q3JlZGl0IGNhcmQgaXMgZXhwaXJlZA==</PHRASE>
+			<PHRASE Label="lu_cc_validation_error" Module="In-Commerce" Type="0">Q3JlZGl0IGNhcmQgbnVtYmVyIGlzIGludmFsaWQ=</PHRASE>
+			<PHRASE Label="lu_changeaffiliatepaymenttypedescription" Module="In-Commerce" Type="0">UGxlYXNlIGNvbXBsZXRlIHRoZSBmb3JtIGJlbG93IHRvIGNoYW5nZSB5b3VyIGFmZmlsaWF0ZSBwYXltZW50IHR5cGUuIFRoZSBjaGFuZ2Ugd2lsbCB0YWtlIGVmZmVjdCBzdGFydGluZyBmcm9tIHRoZSBuZXh0IHNjaGVkdWxlZCBhZmZpbGlhdGUgcGF5bWVudC4=</PHRASE>
+			<PHRASE Label="lu_ChangePaymentType" Module="In-Commerce" Type="0">Q2hhbmdlIFBheW1lbnQgVHlwZQ==</PHRASE>
+			<PHRASE Label="lu_ChangePaymentTypeText" Module="In-Commerce" Type="0">UGF5bWVudCBvcHRpb25zIGZvciBhZmZpbGlhdGUgY29tbWlzc2lvbnM=</PHRASE>
+			<PHRASE Label="lu_col_ordercommissionearned" Module="In-Commerce" Type="0">Q29tbWlzc2lvbiBlYXJuZWQ=</PHRASE>
+			<PHRASE Label="lu_col_ordercount" Module="In-Commerce" Type="0">T3JkZXJz</PHRASE>
+			<PHRASE Label="lu_col_ordernumber" Module="In-Commerce" Type="0">T3JkZXIgIw==</PHRASE>
+			<PHRASE Label="lu_col_ordertotalamount" Module="In-Commerce" Type="0">VG90YWwgc2FsZXM=</PHRASE>
+			<PHRASE Label="lu_col_referer" Module="In-Commerce" Type="0">UmVmZXJyZXI=</PHRASE>
+			<PHRASE Label="lu_commAddressListText" Module="In-Commerce" Type="0">TWFuYWdlIHlvdXIgc2hpcHBpbmcgYW5kIGJpbGxpbmcgYWRkcmVzc2Vz</PHRASE>
+			<PHRASE Label="lu_comm_AccessDuration" Module="In-Commerce" Type="0">QWNjZXNzIER1cmF0aW9u</PHRASE>
+			<PHRASE Label="lu_comm_Actions" Module="In-Commerce" Type="0">QWN0aW9ucw==</PHRASE>
+			<PHRASE Label="lu_comm_Added" Module="In-Commerce" Type="0">QWRkZWQ=</PHRASE>
+			<PHRASE Label="lu_comm_AddedOn" Module="In-Commerce" Type="0">QWRkZWQgT24=</PHRASE>
+			<PHRASE Label="lu_comm_Address" Module="In-Commerce" Type="0">QWRkcmVzcw==</PHRASE>
+			<PHRASE Label="lu_comm_AddressLine" Module="In-Commerce" Type="0">QWRkcmVzcyBMaW5l</PHRASE>
+			<PHRASE Label="lu_comm_AddressList" Module="In-Commerce" Type="0">QWRkcmVzc2Vz</PHRASE>
+			<PHRASE Label="lu_comm_addtofav" Module="In-Commerce" Type="0">QWRkIFRvIEZhdm9yaXRlcw==</PHRASE>
+			<PHRASE Label="lu_comm_AddToFavourites" Module="In-Commerce" Type="0">QWRkIFRvIFdpc2ggTGlzdA==</PHRASE>
+			<PHRASE Label="lu_comm_AdvancedSearch" Module="In-Commerce" Type="0">QWR2YW5jZWQgU2VhcmNo</PHRASE>
+			<PHRASE Label="lu_comm_Affiliate" Module="In-Commerce" Type="0">QWZmaWxpYXRl</PHRASE>
+			<PHRASE Label="lu_comm_AffiliateAgreement" Module="In-Commerce" Type="0">YWZmaWxpYXRlIGFncmVlbWVudA==</PHRASE>
+			<PHRASE Label="lu_comm_AffiliateIsPendingOrDisabled" Module="In-Commerce" Type="0">WW91ciBhZmZpbGlhdGUgcmVnaXN0cmF0aW9uIGlzIHBlbmRpbmcgb3IgZGlzYWJsZWQuIElmIHlvdSBoYXZlIHJlZ2lzdGVyZWQgcmVjZW50bHksIHBsZWFzZSB3YWl0IHVudGlsIHRoZSBzaXRlIGFkbWluaXN0cmF0b3JzIGFwcHJvdmUgeW91ciBhcHBsaWNhdGlvbi4gWW91IHdpbGwgYmUgbm90aWZpZWQgdmlhIGUtbWFpbC4=</PHRASE>
+			<PHRASE Label="lu_comm_AffiliateMaterials" Module="In-Commerce" Type="0">SW5zdHJ1Y3Rpb25zL0FkdmVydGlzaW5nIE1hdGVyaWFscw==</PHRASE>
+			<PHRASE Label="lu_comm_AffiliateMaterialsText" Module="In-Commerce" Type="0">QWR2ZXJ0aXNpbmcgbWF0ZXJpYWxzIC0gbGlua3MsIGNvZGUgc2FtcGxlcywgYmFubmVycyBldGMu</PHRASE>
+			<PHRASE Label="lu_comm_AffiliatePayments" Module="In-Commerce" Type="0">UGF5bWVudHM=</PHRASE>
+			<PHRASE Label="lu_comm_AffiliatePaymentsText" Module="In-Commerce" Type="0">RGlzcGxheXMgcGF5bWVudHMgc3RhdGlzdGljcw==</PHRASE>
+			<PHRASE Label="lu_comm_AffiliatePaymentType" Module="In-Commerce" Type="0">QWZmaWxpYXRlIFBheW1lbnQgVHlwZQ==</PHRASE>
+			<PHRASE Label="lu_comm_AffiliatePaymentTypeChangedMessage" Module="In-Commerce" Type="0">WW91ciBhZmZpbGlhdGUgcGF5bWVudCB0eXBlIGhhcyBiZWVuIGNoYW5nZWQu</PHRASE>
+			<PHRASE Label="lu_comm_AffiliateRegistration" Module="In-Commerce" Type="0">QWZmaWxpYXRlIFJlZ2lzdHJhdGlvbg==</PHRASE>
+			<PHRASE Label="lu_comm_Affiliates" Module="In-Commerce" Type="0">QWZmaWxpYXRlcw==</PHRASE>
+			<PHRASE Label="lu_comm_AffiliateStat" Module="In-Commerce" Type="0">U3RhdGlzdGljcw==</PHRASE>
+			<PHRASE Label="lu_comm_AffiliateStatistics" Module="In-Commerce" Type="0">QWZmaWxpYXRlIFN0YXRpc3RpY3M=</PHRASE>
+			<PHRASE Label="lu_comm_AffiliateStatText" Module="In-Commerce" Type="0">RGlzcGxheXMgdmlzdGVycyBhbmQgb3JkZXJzIHN0YXRpc3RpY3M=</PHRASE>
+			<PHRASE Label="lu_comm_AffiliateText" Module="In-Commerce" Type="0">QWZmaWxpYXRlcyBzZWN0aW9uIC0gZGlzcGxheXMgc3RhdGlzdGljcywgcGF5bWVudHMsIGFkdmVydGlzaW5nIG1hdGVyaWFscyBhbmQgbW9yZQ==</PHRASE>
+			<PHRASE Label="lu_comm_AffilliateMaterialsCode" Module="In-Commerce" Type="0">SGVyZSBpcyB0aGUgSFRNTCBjb2RlIHdoaWNoIGNyZWF0ZXMgYSBsaW5rIHRvIG91ciBzaXRl</PHRASE>
+			<PHRASE Label="lu_comm_AffilliateMaterialsCopy" Module="In-Commerce" Type="0">WW91IGNvdWxkIGNvcHkgYW5kIHBhc3RlIGl0IG9uIHlvdXIgcGFnZSB0byBjcmVhdGUgYSBsaW5rIGFuZCBzdGFydCByZWZlcmluZyBjdXN0b21lcnMgYW5kIGVhcm5pbmcgYWZmaWxpYXRlIGNvbW1pc3Npb24u</PHRASE>
+			<PHRASE Label="lu_comm_AffilliateMaterialsToRefer" Module="In-Commerce" Type="0">VG8gcmVmZXIgY3VzdG9tZXJzIHRvIG91ciBzaXRlIGFuZCBlYXJuIGFmZmlsaWF0ZSBjb21taXNzaW9uIHBsZWFzZSB1c2UgdGhlIGZvbGxvd2luZyBVUkw=</PHRASE>
+			<PHRASE Label="lu_comm_AgreeTermsAndConditions" Module="In-Commerce" Type="0">SSBhZ3JlZSB0byBhZmZpbGlhdGUgYWdyZWVtZW50IHRlcm1zICZhbXA7IGNvbmRpdGlvbnM=</PHRASE>
+			<PHRASE Label="lu_comm_Amount" Module="In-Commerce" Type="0">QW1vdW50</PHRASE>
+			<PHRASE Label="lu_comm_AmountWithoutVAT" Module="In-Commerce" Type="0">QW1vdW50IFdpdGhvdXQgU2FsZXMgVGF4L1ZBVA==</PHRASE>
+			<PHRASE Label="lu_comm_And" Module="In-Commerce" Type="0">QW5k</PHRASE>
+			<PHRASE Label="lu_comm_Any" Module="In-Commerce" Type="0">QW55</PHRASE>
+			<PHRASE Label="lu_comm_Availability" Module="In-Commerce" Type="0">QXZhaWxhYmlsaXR5</PHRASE>
+			<PHRASE Label="lu_comm_BecomeAnAffiliate" Module="In-Commerce" Type="0">QmVjb21lIEFuIEFmZmlsaWF0ZQ==</PHRASE>
+			<PHRASE Label="lu_comm_BecomeAnAffiliateDescription" Module="In-Commerce" Type="0">UGxlYXNlIGZpbGwgaW4gdGhlIGZvcm0gYmVsb3cgdG8gcmVnaXN0ZXIgYXMgYWZmaWxpYXRlLiBZb3Ugd2lsbCBiZSBub3RpZmllZCB2aWEgZS1tYWlsIHdoZW4geW91ciBhZmZpbGlhdGUgcmVnaXN0cmF0aW9uIGlzIGFwcHJvdmVkLg==</PHRASE>
+			<PHRASE Label="lu_comm_BillingEmailIfDifferent" Module="In-Commerce" Type="0">QmlsbGluZyBFbWFpbCAoaWYgaXQncyBkaWZmZXJlbnQgZnJvbSBzaGlwcGluZyk=</PHRASE>
+			<PHRASE Label="lu_comm_BillingInfo" Module="In-Commerce" Type="0">QmlsbGluZyBJbmZvcm1hdGlvbg==</PHRASE>
+			<PHRASE Label="lu_comm_BillingOptions" Module="In-Commerce" Type="0">QmlsbGluZyBPcHRpb25z</PHRASE>
+			<PHRASE Label="lu_comm_BirthDate" Module="In-Commerce" Type="0">QmlydGggZGF0ZQ==</PHRASE>
+			<PHRASE Label="lu_comm_Both" Module="In-Commerce" Type="0">Qm90aA==</PHRASE>
+			<PHRASE Label="lu_comm_BuyNow" Module="In-Commerce" Type="0">QnV5IE5vdw==</PHRASE>
+			<PHRASE Label="lu_comm_BuyThisProduct" Module="In-Commerce" Type="0">QnV5IFRoaXMgUHJvZHVjdA==</PHRASE>
+			<PHRASE Label="lu_comm_CardNumber" Module="In-Commerce" Type="0">Q2FyZCBOdW1iZXI=</PHRASE>
+			<PHRASE Label="lu_comm_CardType" Module="In-Commerce" Type="0">Q2FyZCBUeXBl</PHRASE>
+			<PHRASE Label="lu_comm_CartChangedAfterLogin" Module="In-Commerce" Type="0">UHJpY2VzIG9mIG9uZSBvciBtb3JlIGl0ZW1zIGluIHlvdXIgc2hvcHBpbmcgY2FydCBoYXZlIGJlZW4gY2hhbmdlZCBkdWUgdG8geW91ciBsb2dpbiwgcGxlYXNlIHJldmlldyBjaGFuZ2VzLg==</PHRASE>
+			<PHRASE Label="lu_comm_Categories" Module="In-Commerce" Type="0">Q2F0ZWdvcmllcw==</PHRASE>
+			<PHRASE Label="lu_comm_ChangeAffiliatePaymentType" Module="In-Commerce" Type="0">Q2hhbmdlIFBheW1lbnQgVHlwZQ==</PHRASE>
+			<PHRASE Label="lu_comm_ChangeAffiliatePaymentTypeDescription" Module="In-Commerce" Type="0">UGxlYXNlIGNvbXBsZXRlIHRoZSBmb3JtIGJlbG93IHRvIGNoYW5nZSB5b3VyIGFmZmlsaWF0ZSBwYXltZW50IHR5cGUuIFRoZSBjaGFuZ2Ugd2lsbCB0YWtlIGVmZmVjdCBzdGFydGluZyBmcm9tIHRoZSBuZXh0IHNjaGVkdWxlZCBhZmZpbGlhdGUgcGF5bWVudC4=</PHRASE>
+			<PHRASE Label="lu_comm_ChangeAffiliatePaymentTypeText" Module="In-Commerce" Type="0">QWZmaWxpYXRlIGNvbW1pc3Npb25zIHBheW1lbnQgb3B0aW9ucw==</PHRASE>
+			<PHRASE Label="lu_comm_ChangePaymentType" Module="In-Commerce" Type="0">Q2hhbmdlIFBheW1lbnQgVHlwZQ==</PHRASE>
+			<PHRASE Label="lu_comm_CheckoutSteps" Module="In-Commerce" Type="0">Q2hlY2tvdXQgU3RlcHM=</PHRASE>
+			<PHRASE Label="lu_comm_ChooseAffiliatePaymentType" Module="In-Commerce" Type="0">Q2hvb3NlIFBheW1lbnQgVHlwZQ==</PHRASE>
+			<PHRASE Label="lu_comm_ChooseAffiliatePlan" Module="In-Commerce" Type="0">Q2hvb3NlIEFmZmlsaWF0ZSBQbGFu</PHRASE>
+			<PHRASE Label="lu_comm_City" Module="In-Commerce" Type="0">Q2l0eQ==</PHRASE>
+			<PHRASE Label="lu_comm_CleanupCart" Module="In-Commerce" Type="0">Q2xlYXIgQ2FydA==</PHRASE>
+			<PHRASE Label="lu_comm_Clear" Module="In-Commerce" Type="0">Q2xlYXI=</PHRASE>
+			<PHRASE Label="lu_comm_ClearCartConfirmation" Module="In-Commerce" Type="0">QXJlIHlvdSBzdXJlIHlvdSB3YW50IHRvIHJlbW92ZSBhbGwgcHJvZHVjdHMgZnJvbSB5b3VyIHNob3BwaW5nIGNhcnQ/</PHRASE>
+			<PHRASE Label="lu_comm_code_expired" Module="In-Commerce" Type="0">Q291cG9uIGNvZGUgaXMgZXhwaXJlZCwgYWxyZWFkeSB1c2VkIG9yIGRpc2FibGVkLg==</PHRASE>
+			<PHRASE Label="lu_comm_ComissionPayments" Module="In-Commerce" Type="0">Q29taXNzaW9uIFBheW1lbnRz</PHRASE>
+			<PHRASE Label="lu_comm_Comments" Module="In-Commerce" Type="0">Q29tbWVudHMvaW5zdHJ1Y3Rpb25z</PHRASE>
+			<PHRASE Label="lu_comm_Company" Module="In-Commerce" Type="0">Q29tcGFueQ==</PHRASE>
+			<PHRASE Label="lu_comm_Confirmation" Module="In-Commerce" Type="0">Q29uZmlybWF0aW9u</PHRASE>
+			<PHRASE Label="lu_comm_Contains" Module="In-Commerce" Type="0">Q29udGFpbnM=</PHRASE>
+			<PHRASE Label="lu_comm_Continue_Shopping" Module="In-Commerce" Type="0">Q29udGludWUgU2hvcHBpbmc=</PHRASE>
+			<PHRASE Label="lu_comm_CouponApplied" Module="In-Commerce" Type="0">Q291cG9uIGhhcyBiZWVuIGFwcGxpZWQu</PHRASE>
+			<PHRASE Label="lu_comm_CouponCode" Module="In-Commerce" Type="0">Q291cG9uIENvZGU=</PHRASE>
+			<PHRASE Label="lu_comm_CouponHasBeenApplied" Module="In-Commerce" Type="0">VGhlIGZvbGxvd2luZyA8aT48c3Ryb25nPmNvdXBvbiBjb2RlPC9zdHJvbmc+PC9pPiBoYXMgYmVlbiBhcHBsaWVk</PHRASE>
+			<PHRASE Label="lu_comm_CouponIsNotEffective" Module="In-Commerce" Type="0">WW91ciBjb3Vwb24gY29kZSBoYXMgbm90IGJlZW4gYXBwbGllZCBiZWNhdXNlIGl0J3Mgbm90IGVmZmVjdGl2ZSBmb3IgYW55IGl0ZW1zIGluIHlvdXIgY2FydCwgb3IgY3VycmVudCBkaXNjb3VudHMgZ2l2ZXMgeW91IGEgYmV0dGVyIHNhdmluZ3MgYW5kIHlvdSBjb3VsZCBzYXZlIHlvdXIgY291cG9uIGZvciBhbm90aGVyIG9yZGVyLg==</PHRASE>
+			<PHRASE Label="lu_comm_CouponRemoved" Module="In-Commerce" Type="0">Q291cG9uIGhhcyBiZWVuIHJlbW92ZWQu</PHRASE>
+			<PHRASE Label="lu_comm_Create" Module="In-Commerce" Type="0">Q3JlYXRl</PHRASE>
+			<PHRASE Label="lu_comm_CurrentAffiliatePaymentType" Module="In-Commerce" Type="0">Q3VycmVudCBQYXltZW50IFR5cGU=</PHRASE>
+			<PHRASE Label="lu_comm_cvv2help" Module="In-Commerce" Type="0">Q1ZWMiBoZWxw</PHRASE>
+			<PHRASE Label="lu_comm_Date" Module="In-Commerce" Type="0">RGF0ZQ==</PHRASE>
+			<PHRASE Label="lu_comm_DeleteAddress" Module="In-Commerce" Type="0">QXJlIHlvdSBzdXJlIHlvdSB3YW50IHRvIGRlbGV0ZSB0aGlzIGFkZHJlc3M/</PHRASE>
+			<PHRASE Label="lu_comm_Description" Module="In-Commerce" Type="0">RGVzY3JpcHRpb24=</PHRASE>
+			<PHRASE Label="lu_comm_Details" Module="In-Commerce" Type="0">RGV0YWlscw==</PHRASE>
+			<PHRASE Label="lu_comm_Discount" Module="In-Commerce" Type="0">RGlzY291bnQ=</PHRASE>
+			<PHRASE Label="lu_comm_DiscountInfo" Module="In-Commerce" Type="0">RGlzY291bnQgSW5mbw==</PHRASE>
+			<PHRASE Label="lu_comm_DoesntContain" Module="In-Commerce" Type="0">RG9lc24ndCBDb250YWlu</PHRASE>
+			<PHRASE Label="lu_comm_DontHaveAddresses" Module="In-Commerce" Type="0">WW91IGhhdmUgbm90IGNyZWF0ZWQgYW55IGFkZHJlc3NlcyB5ZXQu</PHRASE>
+			<PHRASE Label="lu_comm_DontHaveOrders" Module="In-Commerce" Type="0">WW91IGRvbid0IGhhdmUgYW55IG9yZGVycyB5ZXQ=</PHRASE>
+			<PHRASE Label="lu_comm_DontHavePayments" Module="In-Commerce" Type="0">WW91IGRvbid0IGhhdmUgYW55IGFmZmlsYXRlIHBheW1lbnRzIHlldC4=</PHRASE>
+			<PHRASE Label="lu_comm_DontHaveVisitors" Module="In-Commerce" Type="0">WW91IGRvbid0IGhhdmUgYW55IHZpc2l0b3JzIHlldA==</PHRASE>
+			<PHRASE Label="lu_comm_DownloadLink" Module="In-Commerce" Type="0">TGluaw==</PHRASE>
+			<PHRASE Label="lu_comm_DownloadNow" Module="In-Commerce" Type="0">RG93bmxvYWQgTm93</PHRASE>
+			<PHRASE Label="lu_comm_Downloads" Module="In-Commerce" Type="0">RG93bmxvYWRz</PHRASE>
+			<PHRASE Label="lu_comm_DownloadsText" Module="In-Commerce" Type="0">VGhlIGl0ZW1zIGF2YWlsYWJsZSBmb3IgZG93bmxvYWQ=</PHRASE>
+			<PHRASE Label="lu_comm_EditorsPick" Module="In-Commerce" Type="0">RWRpdG9yJ3MgUGljaw==</PHRASE>
+			<PHRASE Label="lu_comm_EditorsPicks" Module="In-Commerce" Type="0">RWRpdG9yJ3MgUGlja3M=</PHRASE>
+			<PHRASE Label="lu_comm_edit_options" Module="In-Commerce" Type="0">RWRpdCBPcHRpb25z</PHRASE>
+			<PHRASE Label="lu_comm_EnterCouponCode" Module="In-Commerce" Type="0">SWYgeW91IGhhdmUgPGk+PHN0cm9uZz5jb3Vwb24gY29kZTwvc3Ryb25nPjwvaT4sIGVudGVyIGl0IGhlcmU=</PHRASE>
+			<PHRASE Label="lu_comm_EnterGiftCertificateCode" Module="In-Commerce" Type="0">SWYgeW91IGhhdmUgPGk+PHN0cm9uZz5naWZ0IGNlcnRpZmljYXRlPC9zdHJvbmc+PC9pPiwgZW50ZXIgaXQgaGVyZQ==</PHRASE>
+			<PHRASE Label="lu_comm_EnterShippingAddress" Module="In-Commerce" Type="0">UGxlYXNlIGVudGVyIHlvdXIgc2hpcHBpbmcgYWRkcmVzcy4gSW5jb21wbGV0ZSBvciBpbmNvcmVjdCBpbmZvcm1hdGlvbiBtYXkgcmVzdWx0IGluIGEgZGVsYXkgb3IgY2FuY2VsbGF0aW9uIG9mIHlvdXIgb3JkZXIu</PHRASE>
+			<PHRASE Label="lu_comm_ErrorAlreadyReviewed" Module="In-Commerce" Type="0">WW91IGhhdmUgYWxyZWFkeSBjb21tZW50ZWQgdGhpcyBwcm9kdWN0IQ==</PHRASE>
+			<PHRASE Label="lu_comm_ErrorInvalidShippingAddress" Module="In-Commerce" Type="0">UGxlYXNlIGVudGVyIHZhbGlkIHNoaXBwaW5nIGFkZHJlc3MgdG8gZ2V0IHNoaXBwaW5nIHJhdGVzIGFuZCBvcHRpb25z</PHRASE>
+			<PHRASE Label="lu_comm_ErrorNoShippingTypes" Module="In-Commerce" Type="0">U29ycnksIGJ1dCBubyBzaGlwcGluZyB0eXBlcyBhcmUgYXZhaWxhYmxlIGZvciBzZWxlY3RlZCBhZGRyZXNzLiBQbGVhc2Ugc2VsZWN0IGRpZmZlcmVudCBhZGRyZXNzLCBvciBjb250YWN0IHNpdGUgYWRtaW5pc3RyYXRvcg==</PHRASE>
+			<PHRASE Label="lu_comm_ExactlyIs" Module="In-Commerce" Type="0">RXhhY3RseSBJcw==</PHRASE>
+			<PHRASE Label="lu_comm_Exp" Module="In-Commerce" Type="0">RXhwLg==</PHRASE>
+			<PHRASE Label="lu_comm_FaxNumber" Module="In-Commerce" Type="0">RmF4IE51bWJlcg==</PHRASE>
+			<PHRASE Label="lu_comm_Featured" Module="In-Commerce" Type="0">RmVhdHVyZWQgSXRlbQ==</PHRASE>
+			<PHRASE Label="lu_comm_FeaturedProducts" Module="In-Commerce" Type="0">RmVhdHVyZWQgUHJvZHVjdHM=</PHRASE>
+			<PHRASE Label="lu_comm_FieldIsRequired" Module="In-Commerce" Type="0">RmllbGQgaXMgcmVxdWlyZWQ=</PHRASE>
+			<PHRASE Label="lu_comm_FileName" Module="In-Commerce" Type="0">RmlsZW5hbWU=</PHRASE>
+			<PHRASE Label="lu_comm_Files" Module="In-Commerce" Type="0">RmlsZXM=</PHRASE>
+			<PHRASE Label="lu_comm_FirstName" Module="In-Commerce" Type="0">Rmlyc3QgbmFtZQ==</PHRASE>
+			<PHRASE Label="lu_comm_FreeShipping" Module="In-Commerce" Type="0">RnJlZQ==</PHRASE>
+			<PHRASE Label="lu_comm_FriendEmail" Module="In-Commerce" Type="0">WW91ciBmcmllbmQgZS1tYWls</PHRASE>
+			<PHRASE Label="lu_comm_FriendName" Module="In-Commerce" Type="0">WW91ciBmcmllbmQgbmFtZQ==</PHRASE>
+			<PHRASE Label="lu_comm_From" Module="In-Commerce" Type="0">RnJvbQ==</PHRASE>
+			<PHRASE Label="lu_comm_FullName" Module="In-Commerce" Type="0">RnVsbCBOYW1l</PHRASE>
+			<PHRASE Label="lu_comm_GiftCertificateApplied" Module="In-Commerce" Type="0">R2lmdCBDZXJ0aWZpY2F0ZSBoYXMgYmVlbiBhcHBsaWVk</PHRASE>
+			<PHRASE Label="LU_COMM_GIFTCERTIFICATEHASBEENAPPLIED" Module="In-Commerce" Type="0">VGhlIGZvbGxvd2luZyA8aT48c3Ryb25nPmdpZnQgY2VydGlmaWNhdGU8L3N0cm9uZz48L2k+IGhhcyBiZWVuIGFwcGxpZWQ=</PHRASE>
+			<PHRASE Label="lu_comm_GiftCertificateIsNotEffective" Module="In-Commerce" Type="0">WW91ciBnaWZ0IGNlcnRpZmljYXRlIGhhcyBub3QgYmVlbiBhcHBsaWVkIGJlY2F1c2UgaXQncyBub3QgZWZmZWN0aXZlIGZvciBhbnkgaXRlbXMgaW4geW91ciBjYXJ0LCBvciBjdXJyZW50IGRpc2NvdW50cyBnaXZlcyB5b3UgYSBiZXR0ZXIgc2F2aW5ncyBhbmQgeW91IGNvdWxkIHNhdmUgeW91ciBnaWZ0IGNlcnRpZmljYXRlIGZvciBhbm90aGVyIG9yZGVyLg==</PHRASE>
+			<PHRASE Label="lu_comm_GiftCertificateRemoved" Module="In-Commerce" Type="0">R2lmdCBDZXJ0aWZpY2F0ZSBoYXMgYmVlbiByZW1vdmVkLg==</PHRASE>
+			<PHRASE Label="lu_comm_Gift_Certificate" Module="In-Commerce" Type="0">R2lmdCBDZXJ0aWZpY2F0ZQ==</PHRASE>
+			<PHRASE Label="lu_comm_GrandTotal" Module="In-Commerce" Type="0">R3JhbmQgVG90YWw=</PHRASE>
+			<PHRASE Label="lu_comm_IAgreeTo" Module="In-Commerce" Type="0">SSBBZ3JlZSB0bw==</PHRASE>
+			<PHRASE Label="lu_comm_Images" Module="In-Commerce" Type="0">QWRkaXRpb25hbCBJbWFnZXM=</PHRASE>
+			<PHRASE Label="lu_comm_ImagesHeader" Module="In-Commerce" Type="0">QURESVRJT05BTCBJTUFHRVM=</PHRASE>
+			<PHRASE Label="lu_comm_insurance_fee" Module="In-Commerce" Type="0">SW5zdXJhbmNlIENvc3Q=</PHRASE>
+			<PHRASE Label="lu_comm_invalid_code" Module="In-Commerce" Type="0">SW52YWxpZCBjb3Vwb24gY29kZSE=</PHRASE>
+			<PHRASE Label="lu_comm_IsNot" Module="In-Commerce" Type="0">SXMgbm90</PHRASE>
+			<PHRASE Label="lu_comm_ItemIsEligibleForDiscount" Module="In-Commerce" Type="0">VGhpcyBpdGVtIGlzIGVsaWdpYmxlIGZvciB0aGUgZm9sbG93aW5nIGRpc2NvdW50</PHRASE>
+			<PHRASE Label="lu_comm_KeywordsTooShort" Module="In-Commerce" Type="0">S2V5d29yZHMgYXJlIHRvbyBzaG9ydA==</PHRASE>
+			<PHRASE Label="lu_comm_Last3Months" Module="In-Commerce" Type="0">TGFzdCAzIG1vbnRocw==</PHRASE>
+			<PHRASE Label="lu_comm_Last6Months" Module="In-Commerce" Type="0">TGFzdCA2IG1vbnRocw==</PHRASE>
+			<PHRASE Label="lu_comm_LastMonth" Module="In-Commerce" Type="0">TGFzdCBtb250aA==</PHRASE>
+			<PHRASE Label="lu_comm_LastName" Module="In-Commerce" Type="0">TGFzdCBuYW1l</PHRASE>
+			<PHRASE Label="lu_comm_LastQuater" Module="In-Commerce" Type="1">TGFzdCBRdWF0ZXI=</PHRASE>
+			<PHRASE Label="lu_comm_Lastweek" Module="In-Commerce" Type="0">TGFzdCB3ZWVr</PHRASE>
+			<PHRASE Label="lu_comm_LastYear" Module="In-Commerce" Type="0">TGFzdCB5ZWFy</PHRASE>
+			<PHRASE Label="lu_comm_Login" Module="In-Commerce" Type="0">TG9naW4=</PHRASE>
+			<PHRASE Label="lu_comm_Logout" Module="In-Commerce" Type="0">TG9nb3V0</PHRASE>
+			<PHRASE Label="lu_comm_ManageAddresses" Module="In-Commerce" Type="0">TWFuYWdlIGFkZHJlc3Nlcw==</PHRASE>
+			<PHRASE Label="lu_comm_Manufacturer" Module="In-Commerce" Type="0">TWFudWZhY3R1cmVy</PHRASE>
+			<PHRASE Label="lu_comm_Manufacturers" Module="In-Commerce" Type="0">TWFudWZhY3R1cmVycw==</PHRASE>
+			<PHRASE Label="lu_comm_ManufAZ" Module="In-Commerce" Type="0">TWFudWZhY3R1cmVyIEEgdG8gWg==</PHRASE>
+			<PHRASE Label="lu_comm_ManufZA" Module="In-Commerce" Type="0">TWFudWZhY3R1cmVyIFogdG8gQQ==</PHRASE>
+			<PHRASE Label="lu_comm_Message" Module="In-Commerce" Type="0">TWVzc2FnZQ==</PHRASE>
+			<PHRASE Label="lu_comm_MoreFiles" Module="In-Commerce" Type="0">TW9yZSBGaWxlcw==</PHRASE>
+			<PHRASE Label="lu_comm_MoreImages" Module="In-Commerce" Type="0">TW9yZSBJbWFnZXM=</PHRASE>
+			<PHRASE Label="lu_comm_MoreLink" Module="In-Commerce" Type="0">bW9yZQ==</PHRASE>
+			<PHRASE Label="lu_comm_MoreOrders" Module="In-Commerce" Type="0">bW9yZSBvcmRlcnM=</PHRASE>
+			<PHRASE Label="lu_comm_msg_outofstock" Module="In-Commerce" Type="0">U29ycnksIGJ1dCB0aGUgcHJvZHVjdCB5b3UgaGF2ZSBzZWxlY3RlZCBpcyBvdXQgb2Ygc3RvY2su</PHRASE>
+			<PHRASE Label="lu_comm_msg_qty_unavailable" Module="In-Commerce" Type="0">U29ycnksIGJ1dCB0aGUgcXVhbnRpdHkgeW91IGhhdmUgc2VsZWN0ZWQgZm9yIG9uZSBvciBtb3JlIHByb2R1Y3RzIGluIHlvdXIgY2FydCBpcyBub3QgY3VycmVudGx5IGF2YWlsYmxlLiBNYXhpbXVtIGF2YWlsYmxlIHF1YW50aXR5IGhhcyBiZWVuIGxlZnQgaW4geW91ciBjYXJ0Lg==</PHRASE>
+			<PHRASE Label="lu_comm_Msg_State_Changed" Module="In-Commerce" Type="0">SXRlbXMgcXVhbnRpdGVzIGFuZC9vciBvcmRlciB0eXBlcyBpbiB5b3UgY2FydCBoYXZlIGJlZW4gdXBkYXRlZC4gUGxlYXNlIHJldmlldyB0aGUgY2hhbmdlcyBiZWxvdyBiZWZvcmUgcHJvY2VlZGluZy4=</PHRASE>
+			<PHRASE Label="lu_comm_MSRP" Module="In-Commerce" Type="0">TVNSUA==</PHRASE>
+			<PHRASE Label="lu_comm_MustAgreeAffiliateTermsError" Module="In-Commerce" Type="0">WW91IGhhdmUgdG8gYWdyZWUgdG8gYWZmaWxpYXRlIHRlcm1zICZhbXA7IGNvbmRpdGlvbnMgdG8gcmVnaXN0ZXIgYXMgYWZmaWxpYXRl</PHRASE>
+			<PHRASE Label="lu_comm_MyAccount" Module="In-Commerce" Type="0">TXkgQWNjb3VudA==</PHRASE>
+			<PHRASE Label="lu_comm_MyAddresses" Module="In-Commerce" Type="0">TXkgQWRkcmVzc2Vz</PHRASE>
+			<PHRASE Label="lu_comm_MyOrders" Module="In-Commerce" Type="0">TXkgT3JkZXJz</PHRASE>
+			<PHRASE Label="lu_comm_Name" Module="In-Commerce" Type="0">TmFtZQ==</PHRASE>
+			<PHRASE Label="lu_comm_NameAZ" Module="In-Commerce" Type="0">VGl0bGUgQSB0byBa</PHRASE>
+			<PHRASE Label="lu_comm_NameOnCard" Module="In-Commerce" Type="0">TmFtZSBvbiB0aGUgQ2FyZA==</PHRASE>
+			<PHRASE Label="lu_comm_NameZA" Module="In-Commerce" Type="0">VGl0bGUgWiB0byBB</PHRASE>
+			<PHRASE Label="lu_comm_New" Module="In-Commerce" Type="0">TmV3</PHRASE>
+			<PHRASE Label="lu_Comm_NewAddress" Module="In-Commerce" Type="0">QWRkIG5ldyBhZGRyZXNz</PHRASE>
+			<PHRASE Label="lu_comm_NewProducts" Module="In-Commerce" Type="0">TmV3IFByb2R1Y3Rz</PHRASE>
+			<PHRASE Label="lu_comm_No" Module="In-Commerce" Type="0">Tm8=</PHRASE>
+			<PHRASE Label="lu_comm_NoCriteriaEntered" Module="In-Commerce" Type="0">Tm8gY3JpdGVyaWEgZW50ZXJlZCBvciBrZXl3b3JkcyBhcmUgdG9vIHNob3J0IQ==</PHRASE>
+			<PHRASE Label="lu_comm_NoFilesForThisProduct" Module="In-Commerce" Type="0">VGhlcmUgaXMgbm8gZmlsZXMgYXZhaWxhYmxlIGZvciB0aGlzIHByb2R1Y3Qu</PHRASE>
+			<PHRASE Label="lu_comm_NoProductsFound" Module="In-Commerce" Type="0">Tm8gcHJvZHVjdHMgZm91bmQgbWF0Y2hpbmcgeW91ciBjcml0ZXJpYQ==</PHRASE>
+			<PHRASE Label="lu_comm_Note" Module="In-Commerce" Type="0">Tm90ZQ==</PHRASE>
+			<PHRASE Label="lu_comm_Ok" Module="In-Commerce" Type="0">T2s=</PHRASE>
+			<PHRASE Label="lu_comm_OldToRecent" Module="In-Commerce" Type="0">T2xkIHRvIFJlY2VudA==</PHRASE>
+			<PHRASE Label="lu_comm_OptionsCombination" Module="In-Commerce" Type="0">T3B0aW9ucyBDb21iaW5hdGlvbg==</PHRASE>
+			<PHRASE Label="lu_comm_OptionsNotAvailable" Module="In-Commerce" Type="0">U2VsZWN0ZWQgb3B0aW9ucyBjb21iaW5hdGlvbiBpcyBjdXJyZW50bHkgbm90IGF2YWlsYWJsZQ==</PHRASE>
+			<PHRASE Label="lu_comm_OptionsRequired" Module="In-Commerce" Type="0">UGxlYXNlIHNlbGVjdCB0aGUgb3B0aW9ucyBtYXJrZWQgd2l0aCA8c3BhbiBjbGFzcz0iZXJyb3IiPio8L3NwYW4+IGJlZm9yZSBwcm9jZWVkaW5n</PHRASE>
+			<PHRASE Label="lu_comm_Or" Module="In-Commerce" Type="0">T3I=</PHRASE>
+			<PHRASE Label="lu_comm_OrderCommissionEarned" Module="In-Commerce" Type="0">Q29tbWlzc2lvbg==</PHRASE>
+			<PHRASE Label="lu_comm_OrderCompleted" Module="In-Commerce" Type="0">T3JkZXIgQ29tcGxldGVk</PHRASE>
+			<PHRASE Label="lu_comm_OrderCount" Module="In-Commerce" Type="0">T3JkZXIgY291bnQ=</PHRASE>
+			<PHRASE Label="lu_comm_OrderNumber" Module="In-Commerce" Type="0">T3JkZXIgIw==</PHRASE>
+			<PHRASE Label="lu_comm_OrderNumberText" Module="In-Commerce" Type="0">T3JkZXIgTnVtYmVy</PHRASE>
+			<PHRASE Label="lu_comm_OrderPreview" Module="In-Commerce" Type="0">T3JkZXIgUHJldmlldw==</PHRASE>
+			<PHRASE Label="lu_comm_Orders" Module="In-Commerce" Type="0">T3JkZXJz</PHRASE>
+			<PHRASE Label="lu_comm_OrdersText" Module="In-Commerce" Type="0">QWxsIG9mIHlvdXIgb3JkZXJz</PHRASE>
+			<PHRASE Label="lu_comm_OrderSuccessfullyPlaced" Module="In-Commerce" Type="0">WW91ciBvcmRlciBoYXMgYmVlbiBzdWNjZXNzZnVsbHkgcGxhY2Vk</PHRASE>
+			<PHRASE Label="lu_comm_OrderTotal" Module="In-Commerce" Type="0">T3JkZXIgVG90YWw=</PHRASE>
+			<PHRASE Label="lu_comm_OrderTotalAmount" Module="In-Commerce" Type="0">T3JkZXIgQW1vdW50</PHRASE>
+			<PHRASE Label="lu_comm_OrEnterAddress" Module="In-Commerce" Type="0">b3IgZW50ZXIgbmV3IGFkZHJlc3MgYmVsb3c=</PHRASE>
+			<PHRASE Label="lu_comm_OtherProducts" Module="In-Commerce" Type="0">cHJvZHVjdHM=</PHRASE>
+			<PHRASE Label="lu_comm_OtherProductsBy" Module="In-Commerce" Type="0">b3RoZXI=</PHRASE>
+			<PHRASE Label="lu_comm_OurPrice" Module="In-Commerce" Type="0">T3VyIFByaWNl</PHRASE>
+			<PHRASE Label="lu_comm_outofstock" Module="In-Commerce" Type="0">T3V0IG9mIHN0b2Nr</PHRASE>
+			<PHRASE Label="lu_comm_PaymentAmount" Module="In-Commerce" Type="0">QW1vdW50</PHRASE>
+			<PHRASE Label="lu_comm_PaymentReference" Module="In-Commerce" Type="0">UGF5bWVudCBSZWZlcmVuY2U=</PHRASE>
+			<PHRASE Label="lu_comm_PaymentType" Module="In-Commerce" Type="0">UGF5bWVudCBUeXBl</PHRASE>
+			<PHRASE Label="lu_comm_PersonalInfo" Module="In-Commerce" Type="0">UGVyc29uYWwgSW5mb3JtYXRpb24=</PHRASE>
+			<PHRASE Label="lu_comm_PersonalInfoText" Module="In-Commerce" Type="0">VGhpcyBzZWN0aW9uIGFsbG93cyB5b3UgdG8gY2hhbmdlIHlvdXIgcGVyc29uYWwgaW5mb3JtYXRpb24gc3VjaCBhcyBOYW1lLCBQYXNzd29yZCBldGMu</PHRASE>
+			<PHRASE Label="lu_comm_PhoneNumber" Module="In-Commerce" Type="0">UGhvbmUgTnVtYmVy</PHRASE>
+			<PHRASE Label="lu_comm_PleaseEnterBillingAddress" Module="In-Commerce" Type="0">UGxlYXNlIGVudGVyIHlvdXIgYmlsbGluZyBhZGRyZXNzLiBJbmNvbXBsZXRlIG9yIGluY29yZWN0IGluZm9ybWF0aW9uIG1heSByZXN1bHQgaW4gYSBkZWxheSBvciBjYW5jZWxsYXRpb24gb2YgeW91ciBvcmRlci4=</PHRASE>
+			<PHRASE Label="lu_comm_Pop" Module="In-Commerce" Type="0">UG9wdWxhcg==</PHRASE>
+			<PHRASE Label="lu_comm_Price" Module="In-Commerce" Type="0">UHJpY2U=</PHRASE>
+			<PHRASE Label="lu_comm_PriceHL" Module="In-Commerce" Type="0">UHJpY2UgSGlnaCB0byBMb3c=</PHRASE>
+			<PHRASE Label="lu_comm_PriceLH" Module="In-Commerce" Type="0">UHJpY2UgTG93IHRvIEhpZ2g=</PHRASE>
+			<PHRASE Label="lu_comm_Pricing" Module="In-Commerce" Type="0">UHJpY2luZw==</PHRASE>
+			<PHRASE Label="lu_comm_ProceedCheckout" Module="In-Commerce" Type="0">UHJvY2VlZCB0byBDaGVja291dA==</PHRASE>
+			<PHRASE Label="lu_comm_ProceedToBilling" Module="In-Commerce" Type="0">UHJvY2VlZCB0byBCaWxsaW5n</PHRASE>
+			<PHRASE Label="lu_comm_ProcessingFee" Module="In-Commerce" Type="0">UHJvY2Vzc2luZyBGZWU=</PHRASE>
+			<PHRASE Label="lu_comm_ProductDescription" Module="In-Commerce" Type="0">UHJvZHVjdCBEZXNjcmlwdGlvbg==</PHRASE>
+			<PHRASE Label="lu_comm_ProductDetails" Module="In-Commerce" Type="0">UHJvZHVjdCBEZXRhaWxz</PHRASE>
+			<PHRASE Label="lu_comm_ProductFiles" Module="In-Commerce" Type="0">RmlsZXM=</PHRASE>
+			<PHRASE Label="lu_comm_Products" Module="In-Commerce" Type="0">UHJvZHVjdHM=</PHRASE>
+			<PHRASE Label="lu_comm_ProductsBy" Module="In-Commerce" Type="0">UHJvZHVjdHMgQnk=</PHRASE>
+			<PHRASE Label="lu_comm_ProductsTotal" Module="In-Commerce" Type="0">UHJvZHVjdHMgVG90YWw=</PHRASE>
+			<PHRASE Label="lu_comm_ProfileAddressWarning" Module="In-Commerce" Type="1">VGhpcyBpcyB5b3VyIHByb2ZpbGUgYWRkcmVzcy4gSXQgd2lsbCBiZSB1cGRhdGVkIGlmIHlvdSBlZGl0IHRoZSBhZGRyZXNzIGJlbG93Lg==</PHRASE>
+			<PHRASE Label="lu_comm_Qty" Module="In-Commerce" Type="0">UXR5</PHRASE>
+			<PHRASE Label="lu_comm_Quantity" Module="In-Commerce" Type="0">UXVhbnRpdHk=</PHRASE>
+			<PHRASE Label="lu_comm_QuantityPricing" Module="In-Commerce" Type="0">UXVhbnRpdHkgUHJpY2luZw==</PHRASE>
+			<PHRASE Label="lu_comm_RateAverage" Module="In-Commerce" Type="0">QXZlcmFnZQ==</PHRASE>
+			<PHRASE Label="lu_comm_RateExcellent" Module="In-Commerce" Type="0">RXhjZWxsZW50</PHRASE>
+			<PHRASE Label="lu_comm_RateFair" Module="In-Commerce" Type="0">RmFpcg==</PHRASE>
+			<PHRASE Label="lu_comm_RateGood" Module="In-Commerce" Type="0">R29vZA==</PHRASE>
+			<PHRASE Label="lu_comm_RatePoor" Module="In-Commerce" Type="0">UG9vcg==</PHRASE>
+			<PHRASE Label="lu_comm_RateProduct" Module="In-Commerce" Type="0">UmF0ZSBQcm9kdWN0</PHRASE>
+			<PHRASE Label="lu_comm_RateThisProduct" Module="In-Commerce" Type="0">UmF0ZSBUaGlzIFByb2R1Y3Q=</PHRASE>
+			<PHRASE Label="lu_comm_RateVeryGood" Module="In-Commerce" Type="0">VmVyeSBHb29k</PHRASE>
+			<PHRASE Label="lu_comm_RecentlyViewed" Module="In-Commerce" Type="0">UmVjZW50bHkgVmlld2VkIEl0ZW1z</PHRASE>
+			<PHRASE Label="lu_comm_RecentOrders" Module="In-Commerce" Type="0">UmVjZW50IE9yZGVycw==</PHRASE>
+			<PHRASE Label="lu_comm_RecentToOld" Module="In-Commerce" Type="0">UmVjZW50IHRvIE9sZA==</PHRASE>
+			<PHRASE Label="lu_comm_Recommend" Module="In-Commerce" Type="0">UmVjb21tZW5k</PHRASE>
+			<PHRASE Label="lu_comm_RecommendThisProduct" Module="In-Commerce" Type="0">UmVjb21tZW5kIFRoaXMgUHJvZHVjdA==</PHRASE>
+			<PHRASE Label="lu_comm_Referer" Module="In-Commerce" Type="0">UmVmZXJlciBVUkw=</PHRASE>
+			<PHRASE Label="lu_comm_RegisterAsAffiliate" Module="In-Commerce" Type="0">UmVnaXN0ZXIgQXMgQWZmaWxpYXRl</PHRASE>
+			<PHRASE Label="lu_comm_Registration" Module="In-Commerce" Type="0">UmVnaXN0cmF0aW9u</PHRASE>
+			<PHRASE Label="lu_comm_RegularPrice" Module="In-Commerce" Type="0">UmVndWxhciBQcmljZQ==</PHRASE>
+			<PHRASE Label="lu_comm_RelatedProducts" Module="In-Commerce" Type="0">UmVsYXRlZCBQcm9kdWN0cw==</PHRASE>
+			<PHRASE Label="lu_comm_Relevance" Module="In-Commerce" Type="0">UmVsZXZhbmNl</PHRASE>
+			<PHRASE Label="lu_comm_RemoveCoupon" Module="In-Commerce" Type="0">UmVtb3Zl</PHRASE>
+			<PHRASE Label="lu_comm_RemoveFromFav" Module="In-Commerce" Type="0">UmVtb3ZlIGZyb20gV2lzaCBMaXN0</PHRASE>
+			<PHRASE Label="lu_comm_RemoveGiftCertificate" Module="In-Commerce" Type="0">UmVtb3Zl</PHRASE>
+			<PHRASE Label="lu_comm_ReviewBy" Module="In-Commerce" Type="0">Q29tbWVudCBieQ==</PHRASE>
+			<PHRASE Label="lu_comm_ReviewProduct" Module="In-Commerce" Type="0">Q29tbWVudCBwcm9kdWN0</PHRASE>
+			<PHRASE Label="lu_comm_Reviews" Module="In-Commerce" Type="0">Q29tbWVudHM=</PHRASE>
+			<PHRASE Label="lu_comm_ReviewThisProduct" Module="In-Commerce" Type="0">Q29tbWVudCB0aGlzIHByb2R1Y3Q=</PHRASE>
+			<PHRASE Label="lu_comm_SearchInResults" Module="In-Commerce" Type="0">U2VhcmNoIEluIFJlc3VsdHM=</PHRASE>
+			<PHRASE Label="lu_comm_SearchResults" Module="In-Commerce" Type="0">U2VhcmNoIFJlc3VsdHM=</PHRASE>
+			<PHRASE Label="lu_comm_Select" Module="In-Commerce" Type="0">U2VsZWN0</PHRASE>
+			<PHRASE Label="lu_comm_SelectAddress" Module="In-Commerce" Type="0">UGxlYXNlIHNlbGVjdCB5b3VyIGFkZHJlc3M=</PHRASE>
+			<PHRASE Label="lu_comm_SelectOptions" Module="In-Commerce" Type="0">U2VsZWN0IE9wdGlvbnM=</PHRASE>
+			<PHRASE Label="lu_comm_SendPassword" Module="In-Commerce" Type="0">U2VuZCBwYXNzd29yZA==</PHRASE>
+			<PHRASE Label="lu_comm_ShipmentInfo" Module="In-Commerce" Type="0">U2hpcG1lbnQgaW5mb3JtYXRpb24=</PHRASE>
+			<PHRASE Label="lu_comm_ShippingCost" Module="In-Commerce" Type="0">U2hpcHBpbmcgY29zdA==</PHRASE>
+			<PHRASE Label="lu_comm_ShippingInfo" Module="In-Commerce" Type="0">U2hpcHBpbmcgSW5mb3JtYXRpb24=</PHRASE>
+			<PHRASE Label="lu_comm_ShippingOptions" Module="In-Commerce" Type="0">U2hpcHBpbmcgT3B0aW9ucw==</PHRASE>
+			<PHRASE Label="lu_comm_ShippingTotal" Module="In-Commerce" Type="0">U2hpcHBpbmcgVG90YWw=</PHRASE>
+			<PHRASE Label="lu_comm_ShippingTracking" Module="In-Commerce" Type="0">VHJhY2tpbmcvUmVmZXJlbmNlIE51bWJlcg==</PHRASE>
+			<PHRASE Label="lu_comm_ShippingTypesLimitationApply" Module="In-Commerce" Type="0">VGhlIHByb2R1Y3RzIGluIHlvdXIgY2FydCBoYXZlIGRpZmZlcmVudCBzaGlwcGluZyBvcHRpb25zLiBUaGUgc2hpcHBpbmcgb3B0aW9ucyBhbGxvd2VkIGZvciBhbGwgdGhlIHByb2R1Y3RzIGluIHlvdXIgY2FydCBhcmUgZGlzcGxheWVkIGJlbG93LiBJZiB5b3UnZCBsaWtlIHRvIG1hbnVhbGx5IGFkanVzdCB0aGUgc2hpcHBpbmcgZm9yIGV2ZXJ5IGdyb3VwIG9mIHByb2R1Y3RzIGNsaWNrIHRoZSBjaGVja2JveCBiZWxvdw==</PHRASE>
+			<PHRASE Label="lu_comm_ShippingTypesLimitationApply_CantSingleShip" Module="In-Commerce" Type="0">dGhlIHByb2R1Y3RzIGluIHlvdXIgc2hvcHBpbmcgY2FydCBjYW4ndCBiZSBzaGlwcGVkIGluIG9uZSBzaGlwbWVudCBiZWNhdXNlIG9mIGRpZmZlcmVudCBzaGlwcGluZyBvcHRpb25zLiBZb3VyIG9yZGVyIHdpbGwgYmUgc3BsaXQgYW5kIHNvbWUgcHJvZHVjdHMgd2lsbCBiZSBzaGlwcGVkIHNlcGFyYXRlbHkuIFBsZWFzZSBzZWxlY3QgdGhlIHNoaXBwaW5nIGZvciBlYWNoIGdyb3VwIG9mIHByb2R1Y3RzIGJlbG93Lg==</PHRASE>
+			<PHRASE Label="lu_comm_Size" Module="In-Commerce" Type="0">U2l6ZQ==</PHRASE>
+			<PHRASE Label="lu_comm_Sort" Module="In-Commerce" Type="0">U29ydA==</PHRASE>
+			<PHRASE Label="lu_comm_SortBy" Module="In-Commerce" Type="0">U29ydCBieQ==</PHRASE>
+			<PHRASE Label="lu_comm_SSNField" Module="In-Commerce" Type="0">U1NOL1RheCBJZC9WQVQgTnVtYmVy</PHRASE>
+			<PHRASE Label="lu_comm_Status" Module="In-Commerce" Type="0">U3RhdHVz</PHRASE>
+			<PHRASE Label="lu_comm_SubCategories" Module="In-Commerce" Type="0">U3ViLUNhdGVnb3JpZXM=</PHRASE>
+			<PHRASE Label="lu_comm_Subscribe" Module="In-Commerce" Type="0">U3Vic2NyaWJl</PHRASE>
+			<PHRASE Label="lu_comm_Subtotal" Module="In-Commerce" Type="0">U3VidG90YWw=</PHRASE>
+			<PHRASE Label="lu_comm_TermsAndConditions" Module="In-Commerce" Type="0">dGVybXMgJmFtcDsgY29uZGl0aW9ucw==</PHRASE>
+			<PHRASE Label="lu_comm_TermsAndConditionsLink" Module="In-Commerce" Type="0">VGVybXMgQW5kIENvbmRpdGlvbnM=</PHRASE>
+			<PHRASE Label="lu_comm_TermsAndConditionsText" Module="In-Commerce" Type="0">QWZmaWxpYXRlIGFncmVlbWVudCwgdGVybXMgJmFtcDsgY29uZGl0aW9ucw==</PHRASE>
+			<PHRASE Label="lu_comm_ThankYou" Module="In-Commerce" Type="0">VGhhbmsgWW91</PHRASE>
+			<PHRASE Label="lu_comm_ThankYouForBecomingAffiliate" Module="In-Commerce" Type="0">VGhhbmsgeW91IGZvciByZWdpc3RlcmluZyBhcyBhZmZpbGlhdGUuIFlvdSB3aWxsIGJlIG5vdGlmaWVkIHZpYSBlLW1haWwgd2hlbiB5b3VyIHJlZ2lzdHJhdGlvbiBpcyBhcHByb3ZlZC4=</PHRASE>
+			<PHRASE Label="lu_comm_To" Module="In-Commerce" Type="0">VG8=</PHRASE>
+			<PHRASE Label="lu_comm_Today" Module="In-Commerce" Type="0">VG9kYXk=</PHRASE>
+			<PHRASE Label="lu_comm_TopSeller" Module="In-Commerce" Type="0">VG9wIFNlbGxlcg==</PHRASE>
+			<PHRASE Label="lu_comm_TopSellers" Module="In-Commerce" Type="0">VG9wIFNlbGxlcnM=</PHRASE>
+			<PHRASE Label="lu_comm_Total" Module="In-Commerce" Type="0">VG90YWw=</PHRASE>
+			<PHRASE Label="lu_comm_TotalCommissionEarned" Module="In-Commerce" Type="0">Q29tbWlzc2lvbiBFYXJuZWQ=</PHRASE>
+			<PHRASE Label="lu_comm_TotalOrderAmount" Module="In-Commerce" Type="0">T3JkZXIgVG90YWwgQW1vdW50</PHRASE>
+			<PHRASE Label="lu_comm_TotalOrders" Module="In-Commerce" Type="0">T3JkZXJz</PHRASE>
+			<PHRASE Label="lu_comm_TotalSavings" Module="In-Commerce" Type="0">VG90YWwgU2F2aW5ncw==</PHRASE>
+			<PHRASE Label="lu_comm_TotalVisitors" Module="In-Commerce" Type="0">VmlzaXRvcnM=</PHRASE>
+			<PHRASE Label="lu_comm_TryRecomendedProductd" Module="In-Commerce" Type="0">WW91IG1heSBhbHNvIHdpc2ggdG8gdHJ5IG91ciByZWNvbW1lbmRlZCBwcm9kdWN0cw==</PHRASE>
+			<PHRASE Label="lu_comm_TryRecommendedProducts" Module="In-Commerce" Type="0">WW91IG1heSBhbHNvIHdpc2ggdG8gdHJ5IG91ciByZWNvbW1lbmRlZCBwcm9kdWN0cw==</PHRASE>
+			<PHRASE Label="lu_comm_Unsubscribe" Module="In-Commerce" Type="0">VW5zdWJzY3JpYmU=</PHRASE>
+			<PHRASE Label="lu_comm_Update" Module="In-Commerce" Type="0">VXBkYXRl</PHRASE>
+			<PHRASE Label="lu_comm_UpdateAddress" Module="In-Commerce" Type="0">VXBkYXRlIEFkZHJlc3M=</PHRASE>
+			<PHRASE Label="lu_comm_UpdateCart" Module="In-Commerce" Type="0">VXBkYXRlIENhcnQ=</PHRASE>
+			<PHRASE Label="lu_comm_UpdateCartItem" Module="In-Commerce" Type="0">VXBkYXRlIE9wdGlvbnM=</PHRASE>
+			<PHRASE Label="lu_comm_UpdateShipping" Module="In-Commerce" Type="0">VXBkYXRlIFNoaXBwaW5n</PHRASE>
+			<PHRASE Label="lu_comm_VAT" Module="In-Commerce" Type="0">U2FsZXMgVGF4L1ZBVA==</PHRASE>
+			<PHRASE Label="lu_comm_Version" Module="In-Commerce" Type="0">VmVyc2lvbg==</PHRASE>
+			<PHRASE Label="lu_comm_ViewRelatedProducts" Module="In-Commerce" Type="0">VmlldyBSZWxhdGVkIFByb2R1Y3Rz</PHRASE>
+			<PHRASE Label="lu_comm_ViewReviews" Module="In-Commerce" Type="0">VmlldyBjb21tZW50cw==</PHRASE>
+			<PHRASE Label="lu_comm_Welcome" Module="In-Commerce" Type="0">V2VsY29tZQ==</PHRASE>
+			<PHRASE Label="lu_comm_WishList" Module="In-Commerce" Type="0">V2lzaCBMaXN0</PHRASE>
+			<PHRASE Label="lu_comm_WishListText" Module="In-Commerce" Type="0">VGhlIGl0ZW1zIHlvdSBoYXZlIGFkZGVkIHRvIHRoZSB3aXNoIGxpc3Q=</PHRASE>
+			<PHRASE Label="lu_comm_Yes" Module="In-Commerce" Type="0">WWVz</PHRASE>
+			<PHRASE Label="lu_comm_Yesterday" Module="In-Commerce" Type="0">WWVzdGVyZGF5</PHRASE>
+			<PHRASE Label="lu_comm_YouHaveBackorderedItems" Module="In-Commerce" Type="0">WW91IGhhdmUgb25lIG9yIG1vcmUgYmFja29yZGVyZWQgaXRlbXMgb24geW91ciBzaG9wcGluZyBjYXJ0LiBQbGVhc2UsIHNlbGVjdCBvbmUgb2YgdGhlIGZvbGxvd2luZyBzaGlwbWVudCBvcHRpb24gdGhhdCBtaWd0aCBhZmZlY3QgeW91ciBzaGlwbWVudCBjb3N0</PHRASE>
+			<PHRASE Label="lu_comm_YourCart" Module="In-Commerce" Type="0">WW91ciBTaG9wcGluZyBDYXJ0</PHRASE>
+			<PHRASE Label="lu_comm_YourCartIsEmpty" Module="In-Commerce" Type="0">WW91ciBzaG9wcGluZyBjYXJ0IGlzIGVtcHR5</PHRASE>
+			<PHRASE Label="lu_comm_YourDownloadListEmpty" Module="In-Commerce" Type="0">WW91IGhhdmUgbm8gZG93bmxvYWRhYmxlIHByb2R1Y3RzIHB1cmNoYXNlZCB5ZXQu</PHRASE>
+			<PHRASE Label="lu_comm_YourDownloads" Module="In-Commerce" Type="0">WW91ciBEb3dubG9hZHM=</PHRASE>
+			<PHRASE Label="lu_comm_YourEmail" Module="In-Commerce" Type="0">WW91ciBlLW1haWw=</PHRASE>
+			<PHRASE Label="lu_comm_YourName" Module="In-Commerce" Type="0">WW91ciBuYW1l</PHRASE>
+			<PHRASE Label="lu_comm_YourPrice" Module="In-Commerce" Type="0">WW91ciBQcmljZQ==</PHRASE>
+			<PHRASE Label="lu_comm_YourReviewText" Module="In-Commerce" Type="0">RW50ZXIgeW91ciBjb21tZW50</PHRASE>
+			<PHRASE Label="lu_comm_YourWishList" Module="In-Commerce" Type="0">WW91ciBXaXNoIExpc3Q=</PHRASE>
+			<PHRASE Label="lu_comm_YourWishListEmpty" Module="In-Commerce" Type="0">WW91ciB3aXNoIGxpc3QgaXMgZW1wdHk=</PHRASE>
+			<PHRASE Label="lu_comm_ZipCode" Module="In-Commerce" Type="0">WmlwIGNvZGU=</PHRASE>
+			<PHRASE Label="lu_comm_ZoomImage" Module="In-Commerce" Type="0">Wm9vbSBJbWFnZQ==</PHRASE>
+			<PHRASE Label="lu_ContactInfo" Module="In-Commerce" Type="0">Q29udGFjdCBJbmZvcm1hdGlvbg==</PHRASE>
+			<PHRASE Label="lu_ContactInformation" Module="In-Commerce" Type="0">Q29udGFjdCBpbmZvcm1hdGlvbg==</PHRASE>
+			<PHRASE Label="lu_currentaffiliatepaymenttype" Module="In-Commerce" Type="0">UGF5bWVudCB0eXBl</PHRASE>
+			<PHRASE Label="lu_CustomerLogin" Module="In-Commerce" Type="0">Q3VzdG9tZXIgTG9naW4=</PHRASE>
+			<PHRASE Label="lu_cvv2_help" Module="In-Commerce" Type="0">VGhyZWUtZGlnaXQgbnVtYmVyIHByaW50ZWQgaW4gdGhlIHNpZ25hdHVyZSBzcGFjZSBvbiB0aGUgYmFjayBvZiBWSVNBLCBNYXN0ZXJDYXJkIGFuZCBEaXNjb3Zlci4gRm91ci1kaWdpdCBudW1iZXIgb24gdGhlIGZyb250IG9mIEFtZXJpY2FuIEV4cHJlc3M=</PHRASE>
+			<PHRASE Label="lu_DailyDeals" Module="In-Commerce" Type="0">RGFpbHkgRGVhbHM=</PHRASE>
+			<PHRASE Label="lu_description_Affiliate" Module="In-Commerce" Type="0">WW91ciBBZmZpbGlhdGUgQWNjb3VudCBJbmZvcm1hdGlvbg==</PHRASE>
+			<PHRASE Label="lu_description_MyAddresses" Module="In-Commerce" Type="0">TWFuYWdlIHlvdXIgc2hpcHBpbmcgYW5kIGJpbGxpbmcgYWRkcmVzc2VzIGhlcmU=</PHRASE>
+			<PHRASE Label="lu_description_MyDownloads" Module="In-Commerce" Type="0">UHVyY2hhc2VkIERvd25sb2Fkcw==</PHRASE>
+			<PHRASE Label="lu_description_MyOrders" Module="In-Commerce" Type="0">TGlzdCBvZiBwbGFjZWQgT3JkZXJz</PHRASE>
+			<PHRASE Label="lu_donthaveorders" Module="In-Commerce" Type="0">Tm8gb3JkZXJz</PHRASE>
+			<PHRASE Label="lu_donthavepayments" Module="In-Commerce" Type="0">Tm8gcGF5bWVudHM=</PHRASE>
+			<PHRASE Label="lu_donthavevisitors" Module="In-Commerce" Type="0">Tm8gdmlzaXRvcnM=</PHRASE>
+			<PHRASE Label="lu_EnterBillingAddress" Module="In-Commerce" Type="0">RW50ZXIgQmlsbGluZyBJbmZvcm1hdGlvbg==</PHRASE>
+			<PHRASE Label="lu_EnterShippingAddress" Module="In-Commerce" Type="0">U2hpcHBpbmcgQWRkcmVzcw==</PHRASE>
+			<PHRASE Label="lu_Fax" Module="In-Commerce" Type="0">RmF4</PHRASE>
+			<PHRASE Label="lu_ferror_rate_duplicate" Module="In-Commerce" Type="0">WW91IGhhdmUgYWxyZWFkeSByYXRlZCB0aGlzIHByb2R1Y3Qh</PHRASE>
+			<PHRASE Label="lu_field_descriptionex" Module="In-Commerce" Type="0">RGVzY3JpcHRpb24gZXhjZXJwdA==</PHRASE>
+			<PHRASE Label="lu_field_manufacturer" Module="In-Commerce" Type="2">TWFudWZhY3R1cmVy</PHRASE>
+			<PHRASE Label="lu_field_newproduct" Module="In-Commerce" Type="0">SXRlbSBJcyBhIE5ldyBQcm9kdWN0</PHRASE>
+			<PHRASE Label="lu_field_popproduct" Module="In-Commerce" Type="0">SXRlbSBJcyBhIFBvcHVsYXIgUHJvZHVjdA==</PHRASE>
+			<PHRASE Label="lu_field_price" Module="In-Commerce" Type="0">UHJpY2U=</PHRASE>
+			<PHRASE Label="lu_field_productid" Module="In-Commerce" Type="0">UHJvZHVjdCBJRA==</PHRASE>
+			<PHRASE Label="lu_field_producttitle" Module="In-Commerce" Type="0">VGl0bGU=</PHRASE>
+			<PHRASE Label="lu_field_sku" Module="In-Commerce" Type="0">U0tV</PHRASE>
+			<PHRASE Label="lu_fld_addedon" Module="In-Commerce" Type="0">QWRkZWQgb24=</PHRASE>
+			<PHRASE Label="lu_fld_AffiliateComments" Module="In-Commerce" Type="0">Q29tbWVudHM=</PHRASE>
+			<PHRASE Label="lu_fld_AffiliatePaymentType" Module="In-Commerce" Type="0">UGF5bWVudCB0eXBl</PHRASE>
+			<PHRASE Label="lu_fld_DownloadLink" Module="In-Commerce" Type="0">RG93bmxvYWQgTGluaw==</PHRASE>
+			<PHRASE Label="lu_fld_LastUsedAsBilling" Module="In-Commerce" Type="0">RGVmYXVsdCBCaWxsaW5nIEFkZHJlc3M=</PHRASE>
+			<PHRASE Label="lu_fld_LastUsedAsShipping" Module="In-Commerce" Type="0">RGVmYXVsdCBTaGlwcGluZyBBZGRyZXNz</PHRASE>
+			<PHRASE Label="lu_fld_manufacturer" Module="In-Commerce" Type="0">TWFudWZhY3R1cmVy</PHRASE>
+			<PHRASE Label="lu_fld_MSRP" Module="In-Commerce" Type="0">TVNSUA==</PHRASE>
+			<PHRASE Label="lu_fld_OurPrice" Module="In-Commerce" Type="0">T3VyIFByaWNl</PHRASE>
+			<PHRASE Label="lu_fld_RegisterAsAffiliate" Module="In-Commerce" Type="0">QmVjb21lIGFuIEFmZmlsaWF0ZQ==</PHRASE>
+			<PHRASE Label="lu_fld_ReturnTotal" Module="In-Commerce" Type="0">UmV0dXJucw==</PHRASE>
+			<PHRASE Label="lu_fld_SKU" Module="In-Commerce" Type="0">U0tV</PHRASE>
+			<PHRASE Label="lu_fld_SSNField" Module="In-Commerce" Type="0">U29jaWFsIFNlY3VyaXR5ICM=</PHRASE>
+			<PHRASE Label="lu_fld_YouSave" Module="In-Commerce" Type="0">WW91IFNhdmU=</PHRASE>
+			<PHRASE Label="lu_hint_OrEnterAddress" Module="In-Commerce" Type="0">b3IgZW50ZXIgbmV3IGFkZHJlc3M=</PHRASE>
+			<PHRASE Label="lu_hint_profileaddresswarning" Module="In-Commerce" Type="0">UHJvZmlsZSBhZGRyZXNz</PHRASE>
+			<PHRASE Label="lu_IfForgotPass" Module="In-Commerce" Type="0">SWYgeW91IGZvcmdvdCB5b3VyIHBhc3N3b3JkIGNsaWNr</PHRASE>
+			<PHRASE Label="lu_Items" Module="In-Commerce" Type="0">SXRlbXM=</PHRASE>
+			<PHRASE Label="lu_kg" Module="In-Commerce" Type="0">a2c=</PHRASE>
+			<PHRASE Label="lu_LastUsedAsBilling" Module="In-Commerce" Type="0">RGVmYXVsdCBCaWxsaW5nIEFkZHJlc3M=</PHRASE>
+			<PHRASE Label="lu_LastUsedAsShipping" Module="In-Commerce" Type="0">RGVmYXVsdCBTaGlwcGluZyBBZGRyZXNz</PHRASE>
+			<PHRASE Label="lu_Materials" Module="In-Commerce" Type="0">TWF0ZXJpYWxz</PHRASE>
+			<PHRASE Label="lu_min_qty_error" Module="In-Commerce" Type="0">T25lIG9yIG1vcmUgcHJvZHVjdCBpbiB5b3VyIGNhcnQgcmVxdWlyZXMgbWluaW11bSBxdWFudGl0eSBmb3IgcHVyY2hhc2UuIFlvdXIgY2FydCBoYXMgYmVlbiBhZGp1c3RlZCBhY2NvcmRpbmdseQ==</PHRASE>
+			<PHRASE Label="lu_more_products" Module="In-Commerce" Type="0">bW9yZQ==</PHRASE>
+			<PHRASE Label="lu_MultipleShippingTypes" Module="In-Commerce" Type="0">TXVsdGlwbGUgU2hpcHBpbmcgVHlwZXM=</PHRASE>
+			<PHRASE Label="lu_MyAddresses" Module="In-Commerce" Type="0">TXkgQWRkcmVzc2Vz</PHRASE>
+			<PHRASE Label="lu_MyDownloads" Module="In-Commerce" Type="0">TXkgRG93bmxvYWRz</PHRASE>
+			<PHRASE Label="lu_MyOrders" Module="In-Commerce" Type="0">TXkgT3JkZXJz</PHRASE>
+			<PHRASE Label="lu_noorders" Module="In-Commerce" Type="0">Tm8gb3JkZXJz</PHRASE>
+			<PHRASE Label="lu_NoProducts" Module="In-Commerce" Type="0">Tm8gUHJvZHVjdHM=</PHRASE>
+			<PHRASE Label="lu_NotAvailable" Module="In-Commerce" Type="0">bi9h</PHRASE>
+			<PHRASE Label="lu_opt_newaddress" Module="In-Commerce" Type="0">QWRkIG5ldyBhZGRyZXNz</PHRASE>
+			<PHRASE Label="lu_order_CompleteOrder" Module="In-Commerce" Type="0">UGxhY2UgT3JkZXI=</PHRASE>
+			<PHRASE Label="lu_otherproductsby" Module="In-Commerce" Type="0">T3RoZXIgcHJvZHVjdHMgYnk=</PHRASE>
+			<PHRASE Label="lu_ounces" Module="In-Commerce" Type="0">b3VuY2Vz</PHRASE>
+			<PHRASE Label="lu_paymentamount" Module="In-Commerce" Type="0">UGF5bWVudCBhbW91bnQ=</PHRASE>
+			<PHRASE Label="lu_paymentreference" Module="In-Commerce" Type="0">UGF5bWVudCByZWZlcmVuY2U=</PHRASE>
+			<PHRASE Label="lu_Payments" Module="In-Commerce" Type="0">UGF5bWVudHM=</PHRASE>
+			<PHRASE Label="lu_PermName_Product.Add_desc" Module="In-Commerce" Type="1">QWRkIFByb2R1Y3Q=</PHRASE>
+			<PHRASE Label="lu_PermName_Product.Delete_desc" Module="In-Commerce" Type="1">RGVsZXRlIFByb2R1Y3Q=</PHRASE>
+			<PHRASE Label="lu_PermName_Product.Modify_desc" Module="In-Commerce" Type="1">TW9kaWZ5IFByb2R1Y3Q=</PHRASE>
+			<PHRASE Label="lu_PermName_Product.Rate_desc" Module="In-Commerce" Type="1">UmF0ZSBQcm9kdWN0</PHRASE>
+			<PHRASE Label="lu_PermName_Product.Review_desc" Module="In-Commerce" Type="1">Q29tbWVudCBQcm9kdWN0</PHRASE>
+			<PHRASE Label="lu_PermName_Product.Review_Pending_desc" Module="In-Commerce" Type="1">Q29tbWVudCBQcm9kdWN0IFBlbmRpbmc=</PHRASE>
+			<PHRASE Label="lu_PermName_Product.View_desc" Module="In-Commerce" Type="1">VmlldyBQcm9kdWN0</PHRASE>
+			<PHRASE Label="lu_PleaseLogin" Module="In-Commerce" Type="0">UGxlYXNlIExvZ2lu</PHRASE>
+			<PHRASE Label="lu_pounds" Module="In-Commerce" Type="0">cG91bmRz</PHRASE>
+			<PHRASE Label="lu_ProductsUpdated" Module="In-Commerce" Type="0">UHJvZHVjdHMgdXBkYXRlZA==</PHRASE>
+			<PHRASE Label="lu_recommend_default_text" Module="In-Commerce" Type="0">SSB0aG91Z2h0IHlvdSBtaWdodCBiZSBpbnRlcmVzdGVkIGluIHRoaXMgaXRlbS4=</PHRASE>
+			<PHRASE Label="lu_recommend_product_confirm_text" Module="In-Commerce" Type="0">VGhhbmsgeW91IGZvciByZWNvbW1lbmRpbmcgdGhpcyBwcm9kdWN0LiBUaGUgZW1haWwgbWVzc2FnZSBoYXMgYmVlbiBzZW50IG91dC4=</PHRASE>
+			<PHRASE Label="lu_Recurring" Module="In-Commerce" Type="0">UmVjdXJyaW5n</PHRASE>
+			<PHRASE Label="lu_recurring_cancel" Module="In-Commerce" Type="0">Q2FuY2VsIFJlY3VycmluZyBPcmRlcg==</PHRASE>
+			<PHRASE Label="lu_recurring_charge_advance" Module="In-Commerce" Type="0">IGRheShzKSBpbiBhZHZhbmNlLg==</PHRASE>
+			<PHRASE Label="lu_recurring_next_charge" Module="In-Commerce" Type="0">SXQgd2lsbCBiZSBjaGFyZ2UgZm9yIHRoZSBzYW1lIHRvdGFsIGFtb3VudCBvbiA=</PHRASE>
+			<PHRASE Label="lu_recurring_notice" Module="In-Commerce" Type="0">VGhpcyBpcyBhIHJlY3VycmluZyBvcmRlci4=</PHRASE>
+			<PHRASE Label="lu_refererlink" Module="In-Commerce" Type="0">UmVmZXJyZXIgbGluaw==</PHRASE>
+			<PHRASE Label="lu_RegisterConfirmPending" Module="In-Commerce" Type="0">UmVnaXN0cmF0aW9uIENvbmZpcm1hdGlvbg==</PHRASE>
+			<PHRASE Label="lu_ReturningCustomers" Module="In-Commerce" Type="0">UmV0dXJuaW5nIGN1c3RvbWVycw==</PHRASE>
+			<PHRASE Label="lu_SameAsShipping" Module="In-Commerce" Type="0">U2FtZSBBcyBTaGlwcGluZyBBZGRyZXNz</PHRASE>
+			<PHRASE Label="lu_section_BillingInfo" Module="In-Commerce" Type="0">QmlsbGluZyBJbmZvcm1hdGlvbg==</PHRASE>
+			<PHRASE Label="lu_section_CostSummary" Module="In-Commerce" Type="0">Q29zdCBTdW1tYXJ5</PHRASE>
+			<PHRASE Label="lu_section_Files" Module="In-Commerce" Type="0">RmlsZXM=</PHRASE>
+			<PHRASE Label="lu_section_OrderTotal" Module="In-Commerce" Type="0">T3JkZXIgVG90YWw=</PHRASE>
+			<PHRASE Label="lu_section_ShippingInfo" Module="In-Commerce" Type="0">U2hpcHBpbmcgSW5mb3JtYXRpb24=</PHRASE>
+			<PHRASE Label="lu_shipping_Company" Module="In-Commerce" Type="0">Q29tcGFueQ==</PHRASE>
+			<PHRASE Label="lu_ship_all_available" Module="In-Commerce" Type="0">QWxsIGF2YWlsYWJsZSBpdGVtcw==</PHRASE>
+			<PHRASE Label="lu_ship_all_backordered" Module="In-Commerce" Type="0">QWxsIGJhY2tvcmRlcmVkIGl0ZW1z</PHRASE>
+			<PHRASE Label="lu_ship_backordered" Module="In-Commerce" Type="0">QmFja29yZGVyZWQ=</PHRASE>
+			<PHRASE Label="lu_ship_ItemsNumber" Module="In-Commerce" Type="0">TnVtYmVyIG9mIEl0ZW1z</PHRASE>
+			<PHRASE Label="lu_ship_Shipment" Module="In-Commerce" Type="0">U2hpcG1lbnQ=</PHRASE>
+			<PHRASE Label="lu_ship_ShippingType" Module="In-Commerce" Type="0">U2hpcHBpbmcgVHlwZQ==</PHRASE>
+			<PHRASE Label="lu_ship_ShippingWeight" Module="In-Commerce" Type="0">U2hpcHBpbmcgV2VpZ2h0</PHRASE>
+			<PHRASE Label="lu_ShoppingCart" Module="In-Commerce" Type="0">U2hvcHBpbmcgQ2FydA==</PHRASE>
+			<PHRASE Label="lu_SortProductsBy" Module="In-Commerce" Type="0">U29ydCBQcm9kdWN0cyBCeQ==</PHRASE>
+			<PHRASE Label="lu_SuggestRegister" Module="In-Commerce" Type="0">WW91IG1heSBmaWxsIGluIHRoZSBmb3JtIGJlbG93IHRvIHJlZ2lzdGVyLiBSZWdpc3RlcmluZyB3aWxsIGFsbG93IHlvdSB0byB1c2UgTXkgQWNjb3VudCBmZWF0dXJlcyBhbmQgc2ltcGxpZmllZCBjaGVja291dCBwcm9jZXNzIHRoZSBuZXh0IHRpbWUgeW91IHBsYWNlIGFuIG9yZGVyLg==</PHRASE>
+			<PHRASE Label="lu_TermsAndConditionsLink" Module="In-Commerce" Type="0">VGVybXMgYW5kIENvbmRpdGlvbnM=</PHRASE>
+			<PHRASE Label="lu_TermsAndConditionsText" Module="In-Commerce" Type="0">QWZmaWxpYXRlIGFncmVlbWVudCwgdGVybXMgJmFtcDthbXA7IGNvbmRpdGlvbnM=</PHRASE>
+			<PHRASE Label="lu_text_AddProductReviewConfirm" Module="In-Commerce" Type="0">VGhhbmsgeW91IGZvciBjb21tZW50aW5nIHRoaXMgcHJvZHVjdC4=</PHRASE>
+			<PHRASE Label="lu_text_AddProductReviewPendingConfirm" Module="In-Commerce" Type="0">VGhhbmsgeW91IGZvciBjb21tZW50aW5nIHRoaXMgcHJvZHVjdCAtIGl0J3MgcGVuZGluZyBmb3IgYWRtaW5pc3RyYXRpdmUgYXBwcm92YWwu</PHRASE>
+			<PHRASE Label="lu_text_ConfirmPasswordReset" Module="In-Commerce" Type="0">UGxlYXNlIGNvbmZpcm0gdGhhdCB5b3Ugd2FudCB0byByZXNldCB5b3VyIHBhc3N3b3JkLg==</PHRASE>
+			<PHRASE Label="lu_text_nofilesforthisproduct" Module="In-Commerce" Type="0">Tm8gZmlsZXMgYXZhaWxhYmxlLg==</PHRASE>
+			<PHRASE Label="lu_text_NoProductReviewPermission" Module="In-Commerce" Type="0">Tm8gcGVybWlzc2lvbnMgdG8gY29tbWVudCB0aGlzIHByb2R1Y3Qu</PHRASE>
+			<PHRASE Label="lu_text_WeAcceptCreditCards" Module="In-Commerce" Type="0">V2UgQWNjZXB0IENyZWRpdCBDYXJkcw==</PHRASE>
+			<PHRASE Label="lu_thankyouforbecomingaffiliate" Module="In-Commerce" Type="0">VGhhbmsgeW91IGZvciBiZWNvbWluZyBvdXIgYWZmaWxpYXRlLiBZb3UnbGwgcmVjZWl2aW5nIG1vbnRobHkgdXBkYXRlcyBieSBlbWFpbC4=</PHRASE>
+			<PHRASE Label="lu_title_AddProductReviewConfirm" Module="In-Commerce" Type="0">UHJvZHVjdCBDb21tZW50IEFkZGVk</PHRASE>
+			<PHRASE Label="lu_title_Affiliate" Module="In-Commerce" Type="0">QWZmaWxpYXRlIFByb2dyYW0=</PHRASE>
+			<PHRASE Label="lu_title_affiliatepaymenttype" Module="In-Commerce" Type="0">UGF5bWVuIFR5cGU=</PHRASE>
+			<PHRASE Label="lu_title_affiliatepaymenttypechanged" Module="In-Commerce" Type="0">UGF5bWVudCBUeXBlIENoYW5nZWQ=</PHRASE>
+			<PHRASE Label="lu_title_AffiliateRegistration" Module="In-Commerce" Type="0">QmVjb21lIGFuIEFmZmlsaWF0ZQ==</PHRASE>
+			<PHRASE Label="lu_title_affiliatestatistics" Module="In-Commerce" Type="0">QWZmaWxpYXRlIFN0YXRpc3RpY3M=</PHRASE>
+			<PHRASE Label="lu_title_affiliatestatisticsorders" Module="In-Commerce" Type="0">T3JkZXJzIFN0YXRpc3RpY3M=</PHRASE>
+			<PHRASE Label="lu_title_affiliatestatisticsvisits" Module="In-Commerce" Type="0">VmlzaXRvciBTdGF0aXN0aWNz</PHRASE>
+			<PHRASE Label="lu_title_cancelrecurring" Module="In-Commerce" Type="0">Q2FuY2VsIFJlb2NjdXJpbmcgQmlsbGluZw==</PHRASE>
+			<PHRASE Label="lu_title_CartIndicator" Module="In-Commerce" Type="0">U2hvcHBpbmcgQ2FydA==</PHRASE>
+			<PHRASE Label="lu_title_CheckoutSteps" Module="In-Commerce" Type="0">Q2hlY2tvdXQgU3RlcHM=</PHRASE>
+			<PHRASE Label="lu_title_comissionpayments" Module="In-Commerce" Type="0">Q29taXNzaW9uIFBheW1lbnRz</PHRASE>
+			<PHRASE Label="lu_title_ConfirmPasswordReset" Module="In-Commerce" Type="0">Q29uZmlybSBwYXNzd29yZCByZXNldA==</PHRASE>
+			<PHRASE Label="lu_title_CreditCards" Module="In-Commerce" Type="0">Q3JlZGl0IENhcmRz</PHRASE>
+			<PHRASE Label="lu_title_DailyDealsProducts" Module="In-Commerce" Type="0">RGFpbHkgRGVhbHM=</PHRASE>
+			<PHRASE Label="lu_title_FeaturedProducts" Module="In-Commerce" Type="0">RmVhdHVyZWQgUHJvZHVjdHM=</PHRASE>
+			<PHRASE Label="lu_title_MyDownloads" Module="In-Commerce" Type="0">TXkgRG93bmxvYWRz</PHRASE>
+			<PHRASE Label="lu_title_MyOrders" Module="In-Commerce" Type="0">TXkgT3JkZXJz</PHRASE>
+			<PHRASE Label="lu_title_NewProducts" Module="In-Commerce" Type="0">TmV3IFByb2R1Y3Rz</PHRASE>
+			<PHRASE Label="lu_title_OrderPreview" Module="In-Commerce" Type="0">T3JkZXIgUHJldmlldw==</PHRASE>
+			<PHRASE Label="lu_title_PickProducts" Module="In-Commerce" Type="0">RWRpdG9yJ3MgUGljayBQcm9kdWN0cw==</PHRASE>
+			<PHRASE Label="lu_title_PopularManufacturers" Module="In-Commerce" Type="0">UG9wdWxhciBCcmFuZHM=</PHRASE>
+			<PHRASE Label="lu_title_ProductDetails" Module="In-Commerce" Type="0">UHJvZHVjdCBEZXRhaWxz</PHRASE>
+			<PHRASE Label="lu_title_ProductFiles" Module="In-Commerce" Type="0">UHJvZHVjdCBGaWxlcw==</PHRASE>
+			<PHRASE Label="lu_title_Products" Module="In-Commerce" Type="0">UHJvZHVjdHM=</PHRASE>
+			<PHRASE Label="lu_title_productsbymanufacturer" Module="In-Commerce" Type="0">UHJvZHVjdHMgYnkgTWFudWZhY3R1cmVy</PHRASE>
+			<PHRASE Label="lu_title_ProductSearchResults" Module="In-Commerce" Type="0">UHJvZHVjdCBTZWFyY2ggUmVzdWx0cw==</PHRASE>
+			<PHRASE Label="lu_title_RecentlyViewedProducts" Module="In-Commerce" Type="0">UmVjZW50bHkgVmlld2Vk</PHRASE>
+			<PHRASE Label="lu_title_RegistrationCompleted" Module="In-Commerce" Type="0">U29ycnkuIE5ldyB1c2VyIHJlZ2lzdHJhdGlvbiBoYXMgYmVlbiBkaXNhYmxlZC4=</PHRASE>
+			<PHRASE Label="lu_title_RegistrationDisabled" Module="In-Commerce" Type="0">UmVnaXN0cmF0aW9uIERpc2FibGVk</PHRASE>
+			<PHRASE Label="lu_title_RelatedProducts" Module="In-Commerce" Type="0">UmVsYXRlZCBQcm9kdWN0cw==</PHRASE>
+			<PHRASE Label="lu_title_ReviewThisProduct" Module="In-Commerce" Type="0">Q29tbWVudCB0aGlzIHByb2R1Y3Q=</PHRASE>
+			<PHRASE Label="lu_title_ShippingInformation" Module="In-Commerce" Type="1">U2hpcHBpbmcgSW5mb3JtYXRpb24=</PHRASE>
+			<PHRASE Label="lu_title_ShippingOptions" Module="In-Commerce" Type="0">U2hpcHBpbmcgT3B0aW9ucw==</PHRASE>
+			<PHRASE Label="lu_title_ShoppingCart" Module="In-Commerce" Type="0">U2hvcHBpbmcgQ2FydA==</PHRASE>
+			<PHRASE Label="lu_title_SpecialsProducts" Module="In-Commerce" Type="0">U3BlY2lhbCBQcm9kdWN0cw==</PHRASE>
+			<PHRASE Label="lu_title_suggestuserregistration" Module="In-Commerce" Type="0">Tm90IGEgTWVtYmVyPw==</PHRASE>
+			<PHRASE Label="lu_title_TopSellerProducts" Module="In-Commerce" Type="0">VG9wIFNlbGxlcnM=</PHRASE>
+			<PHRASE Label="lu_title_TopSellers" Module="In-Commerce" Type="0">VG9wIFNlbGxlcnM=</PHRASE>
+			<PHRASE Label="lu_title_WishList" Module="In-Commerce" Type="0">WW91ciBXaXNoIExpc3Q=</PHRASE>
+			<PHRASE Label="lu_total" Module="In-Commerce" Type="0">VG90YWw=</PHRASE>
+			<PHRASE Label="lu_totalcommissionearned" Module="In-Commerce" Type="0">VG90YWwgY29tbWlzc2lvbnM=</PHRASE>
+			<PHRASE Label="lu_totalorderamount" Module="In-Commerce" Type="0">VG90YWwgb3JkZXJzIGFtb3VudA==</PHRASE>
+			<PHRASE Label="lu_totalorders" Module="In-Commerce" Type="0">VG90YWwgb3JkZXJz</PHRASE>
+			<PHRASE Label="lu_TotalProducts" Module="In-Commerce" Type="0">VG90YWwgcHJvZHVjdHM=</PHRASE>
+			<PHRASE Label="lu_totalvisitors" Module="In-Commerce" Type="0">VG90YWwgdmlzaXRvcnM=</PHRASE>
+			<PHRASE Label="lu_WhatIsThis" Module="In-Commerce" Type="0">V2hhdCBpcyB0aGlzPw==</PHRASE>
+			<PHRASE Label="lu_YourCart" Module="In-Commerce" Type="0">U2hvcHBpbmcgQ2FydA==</PHRASE>
+			<PHRASE Label="lu_YourCurrency" Module="In-Commerce" Type="0">Q3VycmVuY3k=</PHRASE>
+		</PHRASES>
+		<EVENTS>
+			<EVENT MessageType="text" Event="AFFILIATE.PAYMENT" Type="0">WC1Qcmlvcml0eTogMQpYLU1TTWFpbC1Qcmlvcml0eTogSGlnaApYLU1haWxlcjogSW4tUG9ydGFsClN1YmplY3Q6IEFmZmlsaWF0ZSBjb21taXNzaW9uIHBheW1lbnQgaGFzIGJlZW4gaXNzdWVkCgpZb3VyIGFmZmlsaWF0ZSBjb21taXNzaW9uIHBheW1lbnQgaGFzIGJlZW4gaXNzdWVkLCBwbGVhc2UgbG9naW4gdG8gWW91ciBBY2NvdW50LCBBZmZpbGlhdGUgUGF5bWVudHMgc2VjdGlvbiB0byBjaGVjayB0aGUgZGV0YWlscy4=</EVENT>
+			<EVENT MessageType="text" Event="AFFILIATE.PAYMENT" Type="1">WC1Qcmlvcml0eTogMQpYLU1TTWFpbC1Qcmlvcml0eTogSGlnaApYLU1haWxlcjogSW4tUG9ydGFsClN1YmplY3Q6IEFmZmlsaWF0ZSBjb21taXNzaW9uIHBheW1lbnQgaXNzdWVkCgpBZmZpbGlhdGUgY29tbWlzc2lvbiBwYXltZW50IGhhcyBiZWVuIGlzc3VlZC4=</EVENT>
+			<EVENT MessageType="text" Event="AFFILIATE.PAYMENT.TYPE.CHANGED" Type="1">WC1Qcmlvcml0eTogMQpYLU1TTWFpbC1Qcmlvcml0eTogSGlnaApYLU1haWxlcjogSW4tUG9ydGFsClN1YmplY3Q6IEFmZmlsaWF0ZSBwYXltZW50IHR5cGUgY2hhbmdlZAoKQWZmaWxpYXRlIHBheW1lbnQgdHlwZSBjaGFuZ2Vk</EVENT>
+			<EVENT MessageType="text" Event="AFFILIATE.REGISTER" Type="0">WC1Qcmlvcml0eTogMQpYLU1TTWFpbC1Qcmlvcml0eTogSGlnaApYLU1haWxlcjogSW4tUG9ydGFsClN1YmplY3Q6IEFmZmlsaWF0ZSByZWdpc3RyYXRpb24KCkhlbGxvLA0KDQpUaGFuayB5b3UgZm9yIHJlZ2lzdGVyaW5nIGFzIGFmZmlsaWF0ZS4gWW91IHdpbGwgYmUgbm90aWZpZWQgdmlhIGUtbWFpbCB3aGVuIHlvdXIgcmVnaXN0cmF0aW9uIGlzIGFwcHJvdmVkLg==</EVENT>
+			<EVENT MessageType="text" Event="AFFILIATE.REGISTER" Type="1">WC1Qcmlvcml0eTogMQpYLU1TTWFpbC1Qcmlvcml0eTogSGlnaApYLU1haWxlcjogSW4tUG9ydGFsClN1YmplY3Q6IEFmZmlsaWF0ZSByZWdpc3RlcmVkCgpOZXcgYWZmaWxpYXRlIHVzZXIgaGFzIHJlZ2lzdGVyZWQuIFBsZWFzZSBwcm9jZWVkIHRvIEFkbWluaXN0cmF0aXZlIENvbnNvbGUgdG8gcmV2aWV3IHRoZSByZWdpc3RyYXRpb24u</EVENT>
+			<EVENT MessageType="text" Event="AFFILIATE.REGISTRATION.APPROVED" Type="0">WC1Qcmlvcml0eTogMQpYLU1TTWFpbC1Qcmlvcml0eTogSGlnaApYLU1haWxlcjogSW4tUG9ydGFsClN1YmplY3Q6IEFmZmlsaWF0ZSByZWdpc3RyYXRpb24gYXBwcm92ZWQgCgpBZmZpbGlhdGUgcmVnaXN0cmF0aW9uIGFwcHJvdmVkIA==</EVENT>
+			<EVENT MessageType="text" Event="AFFILIATE.REGISTRATION.APPROVED" Type="1">WC1Qcmlvcml0eTogMQpYLU1TTWFpbC1Qcmlvcml0eTogSGlnaApYLU1haWxlcjogSW4tUG9ydGFsClN1YmplY3Q6IEFmZmlsaWF0ZSByZWdpc3RyYXRpb24gYXBwcm92ZWQgCgpBZmZpbGlhdGUgcmVnaXN0cmF0aW9uIGFwcHJvdmVkIA==</EVENT>
+			<EVENT MessageType="text" Event="AFFILIATE.REGISTRATION.DENIED" Type="0">WC1Qcmlvcml0eTogMQpYLU1TTWFpbC1Qcmlvcml0eTogSGlnaApYLU1haWxlcjogSW4tUG9ydGFsClN1YmplY3Q6IEFmZmlsaWF0ZSByZWdpc3RyYXRpb24gZGVuaWVkCgpBZmZpbGlhdGUgcmVnaXN0cmF0aW9uIGRlbmllZA==</EVENT>
+			<EVENT MessageType="text" Event="AFFILIATE.REGISTRATION.DENIED" Type="1">WC1Qcmlvcml0eTogMQpYLU1TTWFpbC1Qcmlvcml0eTogSGlnaApYLU1haWxlcjogSW4tUG9ydGFsClN1YmplY3Q6IEFmZmlsaWF0ZSByZWdpc3RyYXRpb24gZGVuaWVkCgpBZmZpbGlhdGUgcmVnaXN0cmF0aW9uIGRlbmllZA==</EVENT>
+			<EVENT MessageType="text" Event="BACKORDER.ADD" Type="0">WC1Qcmlvcml0eTogMQpYLU1TTWFpbC1Qcmlvcml0eTogSGlnaApYLU1haWxlcjogSW4tUG9ydGFsClN1YmplY3Q6IEJhY2tvcmRlciBhZGRlZAoKRGVhciA8aW5wMjpvcmRfRmllbGQgbmFtZT0iQmlsbGluZ1RvIi8+LA0KDQpZb3VyIGJhY2tvcmRlciBudW1iZXIgPGlucDI6b3JkX0ZpZWxkIG5hbWU9Ik9yZGVyTnVtYmVyIi8+IGhhcyBiZWVuIGFjY2VwdGVkLiBZb3Ugd2lsbCBiZSBub3RpZmllZCB3aGVuIHRoZSBvcmRlciBpcyBwcm9jZXNzZWQu</EVENT>
+			<EVENT MessageType="text" Event="BACKORDER.ADD" Type="1">WC1Qcmlvcml0eTogMQpYLU1TTWFpbC1Qcmlvcml0eTogSGlnaApYLU1haWxlcjogSW4tUG9ydGFsClN1YmplY3Q6IEJhY2tvcmRlciBhZGRlZAoKTmV3IGJhY2tvcmRlciBudW1iZXIgPGlucDI6b3JkX0ZpZWxkIG5hbWU9Ik9yZGVyTnVtYmVyIi8+IGhhcyBiZWVuIGFkZGVkLiBQbGVhc2UgcHJvY2VlZCB0byBhZG1pbmlzdHJhdGl2ZSBjb25zb2xlIHRvIHJldmlldyB0aGUgb3JkZXIu</EVENT>
+			<EVENT MessageType="text" Event="BACKORDER.FULLFILL" Type="0">WC1Qcmlvcml0eTogMQpYLU1TTWFpbC1Qcmlvcml0eTogSGlnaApYLU1haWxlcjogSW4tUG9ydGFsClN1YmplY3Q6IEJhY2tvcmRlciBmdWxsZmlsbGVkCgpEZWFyIDxpbnAyOm9yZC4taW52X0ZpZWxkIG5hbWU9IkJpbGxpbmdUbyIvPiwNCg0KWW91ciBiYWNrb3JkZXIgbnVtYmVyIDxpbnAyOm9yZC4taW52X0ZpZWxkIG5hbWU9Ik9yZGVyTnVtYmVyIi8+IGhhcyBiZWVuIGZ1bGxmaWxsZWQu</EVENT>
+			<EVENT MessageType="text" Event="BACKORDER.PROCESS" Type="0">WC1Qcmlvcml0eTogMQpYLU1TTWFpbC1Qcmlvcml0eTogSGlnaApYLU1haWxlcjogSW4tUG9ydGFsClN1YmplY3Q6IEJhY2tvcmRlciBwcm9jZXNzZWQKCkRlYXIgPGlucDI6b3JkLi1pbnZfRmllbGQgbmFtZT0iQmlsbGluZ1RvIi8+LA0KDQpZb3VyIGJhY2tvcmRlciBudW1iZXIgPGlucDI6b3JkLi1pbnZfRmllbGQgbmFtZT0iT3JkZXJOdW1iZXIiLz4gaGFzIGJlZW4gcHJvY2Vzc2VkLg==</EVENT>
+			<EVENT MessageType="text" Event="ORDER.APPROVE" Type="0">WC1Qcmlvcml0eTogMQpYLU1TTWFpbC1Qcmlvcml0eTogSGlnaApYLU1haWxlcjogSW4tUG9ydGFsClN1YmplY3Q6IE9yZGVyIGFwcHJvdmVkCgpEZWFyIDxpbnAyOm9yZC4taW52X0ZpZWxkIG5hbWU9IkJpbGxpbmdUbyIvPiwNCg0KWW91ciBvcmRlciBudW1iZXIgPGlucDI6b3JkLi1pbnZfRmllbGQgbmFtZT0iT3JkZXJOdW1iZXIiLz4gaGFzIGJlZW4gYXBwcm92ZWQuDQoNCllvdSBjYW4gdXNlIGNvdXBvbnM6DQoNCjxpbnAyOm1fZ2V0IHZhcj0ib3JkZXJfY291cG9ucyIvPg==</EVENT>
+			<EVENT MessageType="text" Event="ORDER.DENY" Type="0">WC1Qcmlvcml0eTogMQpYLU1TTWFpbC1Qcmlvcml0eTogSGlnaApYLU1haWxlcjogSW4tUG9ydGFsClN1YmplY3Q6IE9yZGVyIGRlbmllZAoKRGVhciA8aW5wMjpvcmQuLWludl9GaWVsZCBuYW1lPSJCaWxsaW5nVG8iLz4sDQoNClNvcnJ5LCBidXQgeW91ciBvcmRlciBudW1iZXIgPGlucDI6b3JkLi1pbnZfRmllbGQgbmFtZT0iT3JkZXJOdW1iZXIiLz4gaGFzIGJlZW4gZGVuaWVkLg==</EVENT>
+			<EVENT MessageType="text" Event="ORDER.RECURRING.DENIED" Type="0">U3ViamVjdDogUmVjdXJyaW5nIE9yZGVyIERlbmllZAoKRGVhciA8aW5wMjpvcmQucmVjdXJyaW5nX0ZpZWxkIG5hbWU9IkJpbGxpbmdUbyIvPiwNCg0KU29ycnksIGJ1dCB5b3VyIHJlY3VycmluZyBvcmRlciBudW1iZXIgPGlucDI6b3JkLnJlY3VycmluZ19GaWVsZCBuYW1lPSJPcmRlck51bWJlciIvPiBoYXMgYmVlbiBkZW5pZWQuIA0KDQpQbGVhc2UgY29udGFjdCBzaXRlIGFkbWluaXN0cmF0b3IgYXQgPGlucDI6bV9HZXRDb25maWcgdmFyPSJTbXRwX0FkbWluTWFpbEZyb20iLz4=</EVENT>
+			<EVENT MessageType="text" Event="ORDER.RECURRING.DENIED" Type="1">U3ViamVjdDogUmVjdXJyaW5nIE9yZGVyIERlbmllZAoKUmVjdXJyaW5nIG9yZGVyIG51bWJlciA8aW5wMjpvcmQucmVjdXJyaW5nX0ZpZWxkIG5hbWU9Ik9yZGVyTnVtYmVyIi8+IGhhcyBiZWVuIGRlbmllZC4gUGxlYXNlIHByb2NlZWQgdG8gYWRtaW5pc3RyYXRpdmUgY29uc29sZSB0byByZXZpZXcgdGhlIG9yZGVyLg==</EVENT>
+			<EVENT MessageType="text" Event="ORDER.RECURRING.PROCESSED" Type="0">U3ViamVjdDogUmVjdXJyaW5nIE9yZGVyIFN1Y2Nlc3NmdWxseSBQcm9jZXNzZWQKCkRlYXIgPGlucDI6b3JkLnJlY3VycmluZ19GaWVsZCBuYW1lPSJCaWxsaW5nVG8iLz4sDQoNCllvdXIgcmVjdXJyaW5nIG9yZGVyIG51bWJlciA8aW5wMjpvcmQucmVjdXJyaW5nX0ZpZWxkIG5hbWU9Ik9yZGVyTnVtYmVyIi8+IGhhcyBiZWVuIHN1Y2Nlc3NmdWxseSBwcm9jZXNzZWQuIA0KDQpObyBmdXJ0aGVyIGFjdGlvbiBpcyByZXF1aXJlZCBhdCB0aGlzIHRpbWUu</EVENT>
+			<EVENT MessageType="text" Event="ORDER.RECURRING.PROCESSED" Type="1">U3ViamVjdDogUmVjdXJyaW5nIE9yZGVyIFN1Y2Nlc3NmdWxseSBQcm9jZXNzZWQKClJlY3VycmluZyBvcmRlciBudW1iZXIgPGlucDI6b3JkLnJlY3VycmluZ19GaWVsZCBuYW1lPSJPcmRlck51bWJlciIvPiBoYXMgYmVlbiBzdWNjZXNzZnVsbHkgcHJvY2Vzc2VkLiANCg0KTm8gZnVydGhlciBhY3Rpb24gaXMgcmVxdWlyZWQgYXQgdGhpcyB0aW1lLg0K</EVENT>
+			<EVENT MessageType="text" Event="ORDER.SHIP" Type="0">WC1Qcmlvcml0eTogMQpYLU1TTWFpbC1Qcmlvcml0eTogSGlnaApYLU1haWxlcjogSW4tUG9ydGFsClN1YmplY3Q6IE9yZGVyIHNoaXBwZWQKCkRlYXIgPGlucDI6b3JkLi1pbnZfRmllbGQgbmFtZT0iU2hpcHBpbmdUbyIvPiwNCg0KWW91ciBvcmRlciBudW1iZXIgPGlucDI6b3JkLi1pbnZfRmllbGQgbmFtZT0iT3JkZXJOdW1iZXIiLz4gaGFzIGJlZW4gc2hpcHBlZC4=</EVENT>
+			<EVENT MessageType="html" Event="ORDER.SUBMIT" Type="0">WC1Qcmlvcml0eTogMQpYLU1TTWFpbC1Qcmlvcml0eTogSGlnaApYLU1haWxlcjogSW4tUG9ydGFsClN1YmplY3Q6IFRoYW5rIHlvdSBmb3IgeW91ciBPcmRlciAoPGlucDI6b3JkX0ZpZWxkIG5hbWU9Ik9yZGVyTnVtYmVyIiAvPikhCgo8aW5wMjptX0RlZmluZUVsZW1lbnQgbmFtZT0ib3JkZXJpdGVtX2VsZW0iPg0KPGlucDI6RmllbGQgbmFtZT0iUHJvZHVjdE5hbWUiIHBhZD0iMzQiLz4gKHF0eSA8aW5wMjpGaWVsZCBuYW1lPSJRdWFudGl0eSIvPikgPGlucDI6RmllbGQgbmFtZT0iRXh0ZW5kZWRQcmljZSIgY3VycmVuY3k9InNlbGVjdGVkIi8+IDwvaW5wMjptX0RlZmluZUVsZW1lbnQ+DQoNCjxwcmUgc3R5bGU9ImZvbnQtc2l6ZTogMTJweDsgY29sb3I6ICMwMDAiPg0KRGVhciA8aW5wMjpvcmRfRmllbGQgbmFtZT0iQmlsbGluZ1RvIiAvPiwNCg0KVGhhbmsgeW91IGZvciB5b3VyIHB1cmNoYXNlIQ0KDQo8aW5wMjptX2lmIGNoZWNrPSJvcmRfVXNpbmdDcmVkaXRDYXJkIj4NClBsZWFzZSBhbGxvdyAyNCBob3VycyBmb3IgdXMgdG8gY29uZmlybSBhbmQgcHJvY2VzcyB5b3VyIG9yZGVyLg0KPGlucDI6bV9lbHNlIC8+DQpQbGVhc2Ugc2VuZCBhIGNoZWNrIG9yIGEgbW9uZXkgb3JkZXIgaW4gdGhlIGFtb3VudCBvZiA8aW5wMjpvcmRfRmllbGQgZmllbGQ9IlRvdGFsQW1vdW50IiBjdXJyZW5jeT0ic2VsZWN0ZWQiLz4gdG86DQo8YnI+DQpBZGRyZXNzDQo8YnI+DQpBbGwgY2hlY2tzIG11c3QgYmUgZHJhd24gaW4gVS5TLiBmdW5kcyBmcm9tIGEgVS5TLiBiYW5rLg0KUGxlYXNlIGF0dGFjaCBhIHByaW50b3V0IG9mIHRoaXMgcmVjZWlwdCB3aXRoIHlvdXIgY2hlY2sgYW5kDQp3cml0ZSBkb3duIHlvdXIgb3JkZXIgbnVtYmVyLiAgWW91ciBvcmRlciB3aWxsIGJlIGFwcHJvdmVkDQp3aXRoaW4gOCBidXNpbmVzcyBkYXlzIGFmdGVyIHRoZSBkYXkgd2UgcmVjZWl2ZSB5b3VyIGNoZWNrLA0Kb3Igd2l0aGluIDIgYnVzaW5lc3MgZGF5cyBhZnRlciB3ZSByZWNlaXZlIGEgbW9uZXkgb3JkZXIgb3INCmJhbmsgZHJhZnQuDQo8L2lucDI6bV9pZj4NCg0KDQpCZWxvdyBhcmUgdGhlIGRldGFpbHMgb2YgeW91ciBvcmRlcjoNCg0KT3JkZXIgQ29udGVudHM6DQotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KPGlucDI6b3JkX1ByaW50Q2FydCBpdGVtX3JlbmRlcl9hcz0ib3JkZXJpdGVtX2VsZW0iIGhlYWRlcl9yZW5kZXJfYXM9Imh0bWw6IiBmb290ZXJfcmVuZGVyX2FzPSJodG1sOiIgZW1wdHlfY2FydF9yZW5kZXJfYXM9Imh0bWw6IiBwZXJfcGFnZT0iLTEiLz4gDQotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KU3ViIFRvdGFsOiAgIDxpbnAyOm9yZF9GaWVsZCBmaWVsZD0iU3VidG90YWxXaXRoRGlzY291bnQiIGN1cnJlbmN5PSJzZWxlY3RlZCIvPg0KVGF4ZXM6ICAgICAgIDxpbnAyOm9yZF9GaWVsZCBuYW1lPSJWQVQiIGN1cnJlbmN5PSJzZWxlY3RlZCIvPg0KVG90YWw6ICAgICAgIDxpbnAyOm9yZF9GaWVsZCBmaWVsZD0iVG90YWxBbW91bnQiIGN1cnJlbmN5PSJzZWxlY3RlZCIvPiA8YnI+DQoNCkJpbGxpbmcgSW5mb3JtYXRpb246DQotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KQW1vdW50IEJpbGxlZDogICAgPGlucDI6b3JkX0ZpZWxkIGZpZWxkPSJUb3RhbEFtb3VudCIgY3VycmVuY3k9InNlbGVjdGVkIi8+PGlucDI6bV9pZiBjaGVjaz0ib3JkX1VzaW5nQ3JlZGl0Q2FyZCI+DQpQYXltZW50IFR5cGU6ICAgICA8aW5wMjpvcmRfRmllbGQgbmFtZT0iUGF5bWVudFR5cGUiIC8+DQpDcmVkaXQgQ2FyZDogICAgICA8aW5wMjpvcmRfRmllbGQgbmFtZT0iUGF5bWVudEFjY291bnQiIG1hc2tlZD0ibWFza2VkIi8+PGlucDI6bV9lbHNlIC8+DQpQYXltZW50IFR5cGU6ICAgICA8aW5wMjpvcmRfRmllbGQgbmFtZT0iUGF5bWVudFR5cGUiIC8+IDwvaW5wMjptX2lmPjxicj4NCg0KQ29udGFjdCBJbmZvcm1hdGlvbjoNCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0NCk5hbWU6ICAgICAgICAgICAgIDxpbnAyOm9yZF9GaWVsZCBmaWVsZD0iQmlsbGluZ1RvIi8+IDxpbnAyOm1faWYgY2hlY2s9Im9yZF9GaWVsZCIgbmFtZT0iQmlsbGluZ0VtYWlsIj4NCkUtbWFpbDogICAgICAgICAgIDxpbnAyOm9yZF9GaWVsZCBmaWVsZD0iQmlsbGluZ0VtYWlsIi8+IDxpbnAyOm1fZWxzZSAvPg0KRS1tYWlsOiAgICAgICAgICAgPGlucDI6dV9GaWVsZCBmaWVsZD0iRW1haWwiLz4gPC9pbnAyOm1faWY+DQpDb21wYW55L09yZ2FuaXphdGlvbjogICAgPGlucDI6b3JkX0ZpZWxkIGZpZWxkPSJCaWxsaW5nQ29tcGFueSIvPg0KUGhvbmU6ICAgICAgICAgICAgPGlucDI6b3JkX0ZpZWxkIGZpZWxkPSJCaWxsaW5nUGhvbmUiLz4NCkZheDogICAgICAgICAgICAgIDxpbnAyOm9yZF9GaWVsZCBmaWVsZD0iQmlsbGluZ0ZheCIvPg0KQWRkcmVzcyBMaW5lIDE6ICAgPGlucDI6b3JkX0ZpZWxkIGZpZWxkPSJCaWxsaW5nQWRkcmVzczEiLz4NCkFkZHJlc3MgTGluZSAyOiAgIDxpbnAyOm9yZF9GaWVsZCBmaWVsZD0iQmlsbGluZ0FkZHJlc3MyIi8+DQpDaXR5OiAgICAgICAgICAgICA8aW5wMjpvcmRfRmllbGQgZmllbGQ9IkJpbGxpbmdDaXR5Ii8+DQpTdGF0ZTogICAgICAgICAgICA8aW5wMjpvcmRfRmllbGQgZmllbGQ9IkJpbGxpbmdTdGF0ZSIvPiANClpJUCBDb2RlOiAgICAgICAgIDxpbnAyOm9yZF9GaWVsZCBmaWVsZD0iQmlsbGluZ1ppcCIvPg0KQ291bnRyeTogICAgICAgICAgPGlucDI6b3JkX0ZpZWxkIGZpZWxkPSJCaWxsaW5nQ291bnRyeSIvPg0KPC9wcmU+</EVENT>
+			<EVENT MessageType="html" Event="ORDER.SUBMIT" Type="1">WC1Qcmlvcml0eTogMQpYLU1TTWFpbC1Qcmlvcml0eTogSGlnaApYLU1haWxlcjogSW4tUG9ydGFsClN1YmplY3Q6IE9yZGVyIFN1Ym1pdHRlZCAoPGlucDI6b3JkX0ZpZWxkIG5hbWU9Ik9yZGVyTnVtYmVyIi8+KQoKPGlucDI6bV9EZWZpbmVFbGVtZW50IG5hbWU9Im9yZGVyaXRlbV9lbGVtIj4NCjxpbnAyOkZpZWxkIG5hbWU9IlByb2R1Y3ROYW1lIiBwYWQ9IjM0Ii8+IChxdHkgPGlucDI6RmllbGQgbmFtZT0iUXVhbnRpdHkiLz4pIDxpbnAyOkZpZWxkIG5hbWU9IkV4dGVuZGVkUHJpY2UiIGN1cnJlbmN5PSJzZWxlY3RlZCIvPiA8L2lucDI6bV9EZWZpbmVFbGVtZW50Pg0KDQo8cHJlIHN0eWxlPSJmb250LXNpemU6IDEycHg7IGNvbG9yOiAjMDAwIj4NCkEgbmV3IG9yZGVyIGhhcyBiZWVuIHBsYWNlZC4gQmVsb3cgaXMgdGhlIHJlY2VpcHQgdGhhdCBoYXMgYmVlbiBzZW50IHRvIHRoZSBjdXN0b21lci4NClBsZWFzZSBwcm9jZWVkIHRvIGFkbWluaXN0cmF0aW9uIHNlY3Rpb24gdG8gYXBwcm92ZSB0aGlzIG9yZGVyLg0KDQpPcmRlciBOdW1iZXI6IDxpbnAyOm9yZF9GaWVsZCBuYW1lPSJPcmRlck51bWJlciIgLz4NCkRhdGUvVGltZTogPGlucDI6b3JkX0ZpZWxkIG5hbWU9Ik9yZGVyRGF0ZSIgLz4NCg0KRGVhciA8aW5wMjpvcmRfRmllbGQgbmFtZT0iQmlsbGluZ1RvIiAvPiwNCg0KVGhhbmsgeW91IGZvciB5b3VyIHB1cmNoYXNlIQ0KDQo8aW5wMjptX2lmIGNoZWNrPSJvcmRfVXNpbmdDcmVkaXRDYXJkIj4NClBsZWFzZSBhbGxvdyAyNCBob3VycyBmb3IgdXMgdG8gY29uZmlybSBhbmQgcHJvY2VzcyB5b3VyIG9yZGVyLg0KPGlucDI6bV9lbHNlIC8+DQpQbGVhc2Ugc2VuZCBhIGNoZWNrIG9yIGEgbW9uZXkgb3JkZXIgaW4gdGhlIGFtb3VudCBvZiA8aW5wMjpvcmRfRmllbGQgZmllbGQ9IlRvdGFsQW1vdW50IiBjdXJyZW5jeT0ic2VsZWN0ZWQiLz4gdG86DQo8YnI+DQpBZGRyZXNzDQo8YnI+DQpBbGwgY2hlY2tzIG11c3QgYmUgZHJhd24gaW4gVS5TLiBmdW5kcyBmcm9tIGEgVS5TLiBiYW5rLg0KUGxlYXNlIGF0dGFjaCBhIHByaW50b3V0IG9mIHRoaXMgcmVjZWlwdCB3aXRoIHlvdXIgY2hlY2sgYW5kDQp3cml0ZSBkb3duIHlvdXIgb3JkZXIgbnVtYmVyLiAgWW91ciBvcmRlciB3aWxsIGJlIGFwcHJvdmVkDQp3aXRoaW4gOCBidXNpbmVzcyBkYXlzIGFmdGVyIHRoZSBkYXkgd2UgcmVjZWl2ZSB5b3VyIGNoZWNrLA0Kb3Igd2l0aGluIDIgYnVzaW5lc3MgZGF5cyBhZnRlciB3ZSByZWNlaXZlIGEgbW9uZXkgb3JkZXIgb3INCmJhbmsgZHJhZnQuDQo8L2lucDI6bV9pZj4NCg0KDQpCZWxvdyBhcmUgdGhlIGRldGFpbHMgb2YgeW91ciBvcmRlcjoNCg0KT3JkZXIgQ29udGVudHM6DQotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KPGlucDI6b3JkX1ByaW50Q2FydCBpdGVtX3JlbmRlcl9hcz0ib3JkZXJpdGVtX2VsZW0iIGhlYWRlcl9yZW5kZXJfYXM9Imh0bWw6IiBmb290ZXJfcmVuZGVyX2FzPSJodG1sOiIgZW1wdHlfY2FydF9yZW5kZXJfYXM9Imh0bWw6IiBwZXJfcGFnZT0iLTEiLz4gDQotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KU3ViIFRvdGFsOiAgIDxpbnAyOm9yZF9GaWVsZCBmaWVsZD0iU3VidG90YWxXaXRoRGlzY291bnQiIGN1cnJlbmN5PSJzZWxlY3RlZCIvPg0KVGF4ZXM6ICAgICAgIDxpbnAyOm9yZF9GaWVsZCBuYW1lPSJWQVQiIGN1cnJlbmN5PSJzZWxlY3RlZCIvPjxici8+DQpUb3RhbDogICAgICAgPGlucDI6b3JkX0ZpZWxkIGZpZWxkPSJUb3RhbEFtb3VudCIgY3VycmVuY3k9InNlbGVjdGVkIi8+IDxicj4NCg0KQmlsbGluZyBJbmZvcm1hdGlvbjoNCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tDQpBbW91bnQgQmlsbGVkOiAgICA8aW5wMjpvcmRfRmllbGQgZmllbGQ9IlRvdGFsQW1vdW50IiBjdXJyZW5jeT0ic2VsZWN0ZWQiLz48aW5wMjptX2lmIGNoZWNrPSJvcmRfVXNpbmdDcmVkaXRDYXJkIj4NClBheW1lbnQgVHlwZTogICAgIDxpbnAyOm9yZF9GaWVsZCBuYW1lPSJQYXltZW50VHlwZSIgLz4NCkNyZWRpdCBDYXJkOiAgICAgIDxpbnAyOm9yZF9GaWVsZCBuYW1lPSJQYXltZW50QWNjb3VudCIgbWFza2VkPSJtYXNrZWQiLz48aW5wMjptX2Vsc2UgLz4NClBheW1lbnQgVHlwZTogICAgIDxpbnAyOm9yZF9GaWVsZCBuYW1lPSJQYXltZW50VHlwZSIgLz4gPC9pbnAyOm1faWY+PGJyLz4NCg0KQ29udGFjdCBJbmZvcm1hdGlvbjoNCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KTmFtZTogICAgICAgICAgICAgPGlucDI6b3JkX0ZpZWxkIGZpZWxkPSJCaWxsaW5nVG8iLz48YnIvPiA8aW5wMjptX2lmIGNoZWNrPSJvcmRfRmllbGQiIG5hbWU9IkJpbGxpbmdFbWFpbCI+DQpFLW1haWw6ICAgICAgICAgICA8aW5wMjpvcmRfRmllbGQgZmllbGQ9IkJpbGxpbmdFbWFpbCIvPjxici8+IDxpbnAyOm1fZWxzZSAvPg0KRS1tYWlsOiAgICAgICAgICAgPGlucDI6dV9GaWVsZCBmaWVsZD0iRW1haWwiLz48YnIvPiA8L2lucDI6bV9pZj4NCkNvbXBhbnkvT3JnYW5pemF0aW9uOiAgICA8aW5wMjpvcmRfRmllbGQgZmllbGQ9IkJpbGxpbmdDb21wYW55Ii8+PGJyLz4NClBob25lOiAgICAgICAgICAgIDxpbnAyOm9yZF9GaWVsZCBmaWVsZD0iQmlsbGluZ1Bob25lIi8+PGJyLz4NCkZheDogICAgICAgICAgICAgIDxpbnAyOm9yZF9GaWVsZCBmaWVsZD0iQmlsbGluZ0ZheCIvPjxici8+DQpBZGRyZXNzIExpbmUgMTogICA8aW5wMjpvcmRfRmllbGQgZmllbGQ9IkJpbGxpbmdBZGRyZXNzMSIvPjxici8+DQpBZGRyZXNzIExpbmUgMjogICA8aW5wMjpvcmRfRmllbGQgZmllbGQ9IkJpbGxpbmdBZGRyZXNzMiIvPjxici8+DQpDaXR5OiAgICAgICAgICAgICA8aW5wMjpvcmRfRmllbGQgZmllbGQ9IkJpbGxpbmdDaXR5Ii8+PGJyLz4NClN0YXRlOiAgICAgICAgICAgIDxpbnAyOm9yZF9GaWVsZCBmaWVsZD0iQmlsbGluZ1N0YXRlIi8+PGJyLz4NClpJUCBDb2RlOiAgICAgICAgIDxpbnAyOm9yZF9GaWVsZCBmaWVsZD0iQmlsbGluZ1ppcCIvPjxici8+DQpDb3VudHJ5OiAgICAgICAgICA8aW5wMjpvcmRfRmllbGQgZmllbGQ9IkJpbGxpbmdDb3VudHJ5Ii8+PGJyLz4NCjwvcHJlPg==</EVENT>
+			<EVENT MessageType="html" Event="PRODUCT.SUGGEST" Type="0">WC1Qcmlvcml0eTogMQpYLU1TTWFpbC1Qcmlvcml0eTogSGlnaApYLU1haWxlcjogSW4tUG9ydGFsClN1YmplY3Q6IFlvdXIgZnJpZW5kIGhhcyByZWNvbW1lbmRlZCB0aGlzIGl0ZW0gZm9yIHlvdQoKRGVhciA8aW5wMjptX3BhcmFtIG5hbWU9InRvX25hbWUiIC8+LDxicj4NCjxicj4NCjxpbnAyOm1fcGFyYW0gbmFtZT0iZnJvbV9uYW1lIiAvPiB0aGlua3MgdGhhdCB0aGlzIGl0ZW0gaW4gb3VyIG9ubGluZSBzdG9yZSBtaWdodCBiZSBvZiBpbnRlcmVzdCB0byB5b3UuIDxpbnAyOm1fcGFyYW0gbmFtZT0iZnJvbV9uYW1lIiAvPiB3cml0ZXM6PGJyPg0KLS0tLTxicj4NCjxibG9ja3F1b3RlPg0KPGlucDI6bV9wYXJhbSBuYW1lPSJtZXNzYWdlX3RleHQiLz4NCjwvYmxvY2txdW90ZT4NCi0tLS08YnI+DQo8YnI+DQpUbyBzZWUgdGhlIGl0ZW0gZGV0YWlscywgcGxlYXNlIDxhIGhyZWY9IjxpbnAyOnBfUHJvZHVjdExpbmsgdGVtcGxhdGU9ImluLWNvbW1lcmNlL3Byb2R1Y3QvZGV0YWlscyIvPiI+Y2xpY2sgaGVyZTwvYT4uPGJyPg0KPGJyPg0KU2luY2VyZWx5LDxicj4NCjxpbnAyOmNvbmZfQ29uZmlnVmFsdWUgbmFtZT0iU2l0ZV9OYW1lIi8+IG9ubGluZSBzdG9yZSBBZG1pbmlzdHJhdGlvbjxicj4NCjxicj4NCjxzcGFuIHN0eWxlPSJmb250LXNpemU6IHNtYWxsOyBjb2xvcjogIzU1NSI+DQpUaGlzIGVtYWlsIHdhcyBnZW5lcmF0ZWQgYmVjYXVzZSBzb21lb25lIHdobyBrbm93cyB5b3VyIGVtYWlsIGFkZHJlc3MgaGFzIGNob3NlbiB0byBub3RpZnkgeW91IGFib3V0IG9uZSBvZiBvdXIgcHJvZHVjdHMuIFRoaXMgaXMgYW4gYXV0b21hdGljIGZlYXR1cmUgb2Ygb3VyIG9ubGluZSBzdG9yZS4gWW91ciBlbWFpbCBhZGRyZXNzIGhhcyBub3QgYmVlbiByZWNvcmRlZCwgYW5kIHlvdSBoYXZlIG5vdCBiZWVuIHN1YnNjcmliZWQgdG8gYW55IG1haWxpbmcgbGlzdHMuIFdlIGFwb2xvZ2l6ZSBmb3IgYW55IGluY29udmVuaWVuY2UgdGhpcyBtZXNzYWdlIG1pZ2h0IGhhdmUgY2F1c2VkLg0KPC9zbWFsbD4=</EVENT>
+			<EVENT MessageType="html" Event="PRODUCT.SUGGEST" Type="1">WC1Qcmlvcml0eTogMQpYLU1TTWFpbC1Qcmlvcml0eTogSGlnaApYLU1haWxlcjogSW4tUG9ydGFsClN1YmplY3Q6IFByb2R1Y3Qgc3VnZ2VzdGVkIHRvIGEgZnJpZW5kCgpBIHByb2R1Y3QgZnJvbSBoYXMgYmVlbiBzdWdnZXN0ZWQuPGJyPg0KPGJyPg0KU3VnZ2VzdGVkIHByb2R1Y3QgZGV0YWlsczogPGEgaHJlZj0iPGlucDI6cF9Qcm9kdWN0TGluayB0ZW1wbGF0ZT0iaW4tY29tbWVyY2UvcHJvZHVjdC9kZXRhaWxzIi8+Ij48aW5wMjpwX0ZpZWxkIG5hbWU9Ik5hbWUiLz48L2E+PGJyPg0K</EVENT>
+			<EVENT MessageType="html" Event="SITE.SUGGEST" Type="0">WC1Qcmlvcml0eTogMQpYLU1haWxlcjogSW4tUG9ydGFsClN1YmplY3Q6IFlvdXIgZnJpZW5kIGhhcyByZWNvbW1lbmRlZCB0aGlzIHNpdGUgdG8geW91CgpZb3VyIGZyaWVuZCB0aG91Z2h0IHlvdSBtaWdodCBmaW5kIHRoaXMgc2l0ZSBpbnRlcmVzdGluZy4gUGxlYXNlIHZpc2l0IDxhIGhyZWY9IjxpbnAyOm1fQmFzZVVSTCAvPiI+PGlucDI6bV9CYXNlVVJMIC8+PC9hPg0KDQo=</EVENT>
+			<EVENT MessageType="text" Event="SITE.SUGGEST" Type="1">WC1Qcmlvcml0eTogMQpYLU1TTWFpbC1Qcmlvcml0eTogSGlnaApYLU1haWxlcjogSW4tUG9ydGFsClN1YmplY3Q6IFNpdGUgaGFzIGJlZW4gc3VnZ2VzdGVkCgpZb3VyIHNpdGUgaGFzIGJlZW4gc3VnZ2VzdGVkLg==</EVENT>
+			<EVENT MessageType="text" Event="USER.GIFTCERTIFICATE" Type="0">WC1Qcmlvcml0eTogMQpYLU1TTWFpbC1Qcmlvcml0eTogSGlnaApYLU1haWxlcjogSW4tUG9ydGFsClN1YmplY3Q6IEdpZnQgQ2VydGlmaWNhdGUgSW5zaWRlCgpEZWFyIDxpbnAyOm1fcGFyYW0gbmFtZT0idG9fbmFtZSIvPiwNCg0KUGxlYXNlIGFjY2VwdCB0aGlzIGdpZnQgY2VydGlmaWNhdGUgZm9yIHRoZSBhbW91bnQgb2YgPGlucDI6bV9wYXJhbSBuYW1lPSJhbW91bnQiLz4gLg0KDQpDZXJ0aWZpY2F0ZSBjb2RlIGlzOiA8aW5wMjptX3BhcmFtIG5hbWU9ImdpZmNlcnRfaWQiLz4gYW5kIGNhbiBiZSB1c2VkIGZvciBhbnkgcHVyY2hhc2Ugb24gb3VyIHdlYnNpdGUuDQoNCjxpbnAyOm1fcGFyYW0gbmFtZT0ibWVzc2FnZSIvPg0KDQoNClRoYW5rIHlvdSBmb3Igc2hvcHBpbmcgd2l0aCB1cyENCg0KDQoNCg0K</EVENT>
+			<EVENT MessageType="text" Event="USER.GIFTCERTIFICATE" Type="1">WC1Qcmlvcml0eTogMQpYLU1TTWFpbC1Qcmlvcml0eTogSGlnaApYLU1haWxlcjogSW4tUG9ydGFsClN1YmplY3Q6IEdpZnQgQ2VydGlmaWNhdGUgLSBFbWFpbCBDb25maXJtYXRpb24KClRoaXMgaXMgYSBjb25maXJtYXRpb24gZW1haWwhDQoNCkdpZnQgQ2VydGlmaWNhdGUgIjxpbnAyOm1fcGFyYW0gbmFtZT0iZ2lmY2VydF9pZCIvPiIgaGFzIGJlZW4gc3VjY2Vzc2Z1bGx5IGVtYWlsZWQgdG8gPGlucDI6bV9wYXJhbSBuYW1lPSJ0b19uYW1lIi8+ICg8aW5wMjptX3BhcmFtIG5hbWU9InRvX2VtYWlsIi8+KSAu</EVENT>
+		</EVENTS>
+	</LANGUAGE>
+</LANGUAGES>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/install/english.lang
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.12
\ No newline at end of property
Index: branches/5.1.x/in-commerce/install/install_data.sql
===================================================================
--- branches/5.1.x/in-commerce/install/install_data.sql	(nonexistent)
+++ branches/5.1.x/in-commerce/install/install_data.sql	(revision 12131)
@@ -0,0 +1,587 @@
+INSERT INTO ConfigurationAdmin VALUES ('Comm_AllowOrderingInNonPrimaryCurrency', 'la_Text_Currencies', 'la_AllowOrderingInNonPrimaryCurrency', 'checkbox', NULL, NULL, 20.01, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_ExchangeRateSource', 'la_Text_Currencies', 'la_ExchangeRateSource', 'select', NULL, '2=la_FederalReserveBank,3=la_EuropeanCentralBank,1=la_BankOfLatvia', 20.02, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_DefaultCouponDuration', 'la_Text_Coupons', 'la_conf_DefaultCouponDuration', 'text', NULL, NULL, 30.01, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_RequireLoginBeforeCheckout', 'la_Text_Orders', 'la_orders_RequireLogin', 'checkbox', NULL, NULL, 10.01, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_Process_Backorders_Auto', 'la_Text_Orders', 'la_ProcessBackorderingAuto', 'checkbox', NULL, NULL, 10.04, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_Next_Order_Number', 'la_Text_Orders', 'la_orders_NextOrderNumber', 'text', NULL, NULL, 10.05, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_Enable_Backordering', 'la_Text_Orders', 'la_EnableBackordering', 'checkbox', NULL, NULL, 10.03, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_Order_Number_Format_P', 'la_Text_Orders', 'la_OrderMainNumberDigits', 'text', NULL, NULL, 10.06, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_Order_Number_Format_S', 'la_Text_Orders', 'la_OrderSecNumberDigits', 'text', NULL, NULL, 10.07, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_Allow_Order_Different_Types', 'la_Text_Orders', 'la_AllowOrderDifferentTypes', 'checkbox', NULL, NULL, 10.02, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_Perpage_Products_Short', 'la_Text_Products', 'la_Perpage_Products_Shortlist', 'text', NULL, NULL, 10.04, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_Perpage_Products', 'la_Text_Products', 'la_Perpage_Products', 'text', NULL, NULL, 10.03, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_Perpage_Reviews', 'la_Text_Reviews', 'la_config_PerpageReviews', 'text', NULL, NULL, 20.01, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_Perpage_Manufacturers', 'la_Text_Manufacturers', 'la_Perpage_Manufacturers', 'text', NULL, NULL, 30.01, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_Perpage_Manufacturers_Short', 'la_Text_Manufacturers', 'la_Perpage_Manufacturers_Short', 'text', NULL, NULL, 30.02, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_AddressLine1', 'la_Text_StoreAddress', 'la_AddressLine1', 'text', NULL, NULL, 20.01, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_AddressLine2', 'la_Text_StoreAddress', 'la_AddressLine2', 'text', NULL, NULL, 20.02, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_City', 'la_Text_StoreAddress', 'la_City', 'text', NULL, NULL, 20.03, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_State', 'la_Text_StoreAddress', 'la_State', 'text', NULL, '', 20.06, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_ZIP', 'la_Text_StoreAddress', 'la_ZIP', 'text', NULL, NULL, 20.04, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_Country', 'la_Text_StoreAddress', 'la_Country', 'select', NULL, '0=lu_none,<SQL>SELECT DestName AS OptionName, DestAbbr AS OptionValue FROM <PREFIX>StdDestinations WHERE DestParentId IS NULL Order BY OptionName</SQL>', 20.05, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_Shipping_AddressLine1', 'la_Text_ShippingAddress', 'la_AddressLine1', 'text', NULL, NULL, 30.01, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_Shipping_AddressLine2', 'la_Text_ShippingAddress', 'la_AddressLine2', 'text', NULL, NULL, 30.02, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_Shipping_City', 'la_Text_ShippingAddress', 'la_City', 'text', NULL, NULL, 30.03, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_Shipping_State', 'la_Text_ShippingAddress', 'la_State', 'text', NULL, NULL, 30.06, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_Shipping_ZIP', 'la_Text_ShippingAddress', 'la_ZIP', 'text', NULL, NULL, 30.04, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_Shipping_Country', 'la_Text_ShippingAddress', 'la_Country', 'select', NULL, '0=lu_none,<SQL>SELECT DestName AS OptionName, DestAbbr AS OptionValue FROM <PREFIX>StdDestinations WHERE DestParentId IS NULL Order BY OptionName</SQL>', 30.05, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_CompanyName', 'la_Text_ContactsGeneral', 'la_text_CompanyName', 'text', NULL, NULL, 10.01, 0, 0);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_StoreName', 'la_Text_ContactsGeneral', 'la_text_StoreName', 'text', NULL, NULL, 10.02, 0, 0);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_Contacts_Name', 'la_Text_ContactsGeneral', 'la_text_ContactName', 'text', NULL , NULL , 10.03, 0, 0);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_Contacts_Phone', 'la_Text_ContactsGeneral', 'la_text_Phone', 'text', NULL, NULL, 10.04, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_Contacts_Fax', 'la_Text_ContactsGeneral', 'la_text_Fax', 'text', NULL, NULL, 10.05, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_Contacts_Email', 'la_Text_ContactsGeneral', 'la_text_Email', 'text', NULL, NULL, 10.06, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_Contacts_Additional', 'la_Text_ContactsGeneral', 'la_text_Additional', 'textarea', NULL, NULL, 10.07, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('product_RatingDelay_Interval', 'la_Text_Products', 'la_prompt_DupRating', 'select', '', '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year', 10.1, 2, 1);
+INSERT INTO ConfigurationAdmin VALUES ('product_RatingDelay_Value', 'la_Text_Products', 'la_prompt_DupRating', 'text', '', '', 10.1, 1, 1);
+INSERT INTO ConfigurationAdmin VALUES ('product_ReviewDelay_Interval', 'la_Text_Reviews', 'la_prompt_DupReviews', 'select', '', '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year', 20.02, 2, 1);
+INSERT INTO ConfigurationAdmin VALUES ('product_ReviewDelay_Value', 'la_Text_Reviews', 'la_prompt_DupReviews', 'text', '', '', 20.02, 1, 1);
+INSERT INTO ConfigurationAdmin VALUES ('ShowProductImagesInOrders', 'la_Text_Products', 'la_config_ShowProductImagesInOrders', 'checkbox', NULL, NULL, 10.11, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('product_OrderProductsByDir', 'la_Text_Products', 'la_conf_OrderProductsBy', 'select', NULL, 'ASC=la_common_Ascending,DESC=la_common_Descending', 10.01, 2, 1);
+INSERT INTO ConfigurationAdmin VALUES ('product_OrderProductsBy', 'la_Text_Products', 'la_conf_OrderProductsBy', 'select', NULL, '=la_none,Name=la_fld_Title,SKU=la_fld_SKU,Manufacturer=la_fld_Manufacturer,Price=la_fld_Price,CreatedOn=la_fld_CreatedOn,Modified=la_fld_Modified,Qty=la_fld_Qty,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 11) AND (IsSystem = 0)</SQL>', 10.01, 1, 1);
+INSERT INTO ConfigurationAdmin VALUES ('product_OrderProductsThenBy', 'la_Text_Products', 'la_conf_ThenBy', 'select', NULL, '=la_none,Name=la_fld_Title,SKU=la_fld_SKU,Manufacturer=la_fld_Manufacturer,Price=la_fld_Price,CreatedOn=la_fld_CreatedOn,Modified=la_fld_Modified,Qty=la_fld_Qty,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 11) AND (IsSystem = 0)</SQL>', 10.02, 1, 1);
+INSERT INTO ConfigurationAdmin VALUES ('product_OrderProductsThenByDir', 'la_Text_Products', 'la_conf_ThenBy', 'select', NULL, 'ASC=la_common_Ascending,DESC=la_common_Descending', 10.02, 2, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Product_NewDays', 'la_Text_Products', 'la_conf_DaysToBeNew', 'text', NULL, NULL, 10.05, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Product_MinPopRating', 'la_Text_Products', 'la_fld_Product_MinPopRating', 'text', NULL, NULL, 10.06, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Product_MinPopVotes', 'la_Text_Products', 'la_fld_Product_MinPopVotes', 'text', NULL, NULL, 10.07, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Product_MaxHotNumber', 'la_Text_Products', 'la_fld_Product_MaxHotNumber', 'text', NULL, NULL, 10.08, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('products_EditorPicksAboveRegular', 'la_Text_Products', 'la_conf_EditorPicksAboveRegular', 'checkbox', NULL, NULL, 10.09, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('p_CategoryTemplate', 'la_section_Templates', 'la_fld_CategoryTemplate', 'text', '', '', 40.01, 0, 0);
+INSERT INTO ConfigurationAdmin VALUES ('p_ItemTemplate', 'la_section_Templates', 'la_fld_ItemTemplate', 'text', '', '', 40.02, 0, 0);
+INSERT INTO ConfigurationAdmin VALUES ('p_MaxImageCount', 'la_section_ImageSettings', 'la_config_MaxImageCount', 'text', '', '', 50.01, 0, 0);
+INSERT INTO ConfigurationAdmin VALUES ('p_ThumbnailImageWidth', 'la_section_ImageSettings', 'la_config_ThumbnailImageWidth', 'text', '', '', 50.02, 0, 0);
+INSERT INTO ConfigurationAdmin VALUES ('p_ThumbnailImageHeight', 'la_section_ImageSettings', 'la_config_ThumbnailImageHeight', 'text', '', '', 50.03, 0, 0);
+INSERT INTO ConfigurationAdmin VALUES ('p_FullImageWidth', 'la_section_ImageSettings', 'la_config_FullImageWidth', 'text', '', '', 50.04, 0, 0);
+INSERT INTO ConfigurationAdmin VALUES ('p_FullImageHeight', 'la_section_ImageSettings', 'la_config_FullImageHeight', 'text', '', '', 50.05, 0, 0);
+
+INSERT INTO ConfigurationAdmin VALUES ('Search_ShowMultiple_products', 'la_config_ShowMultiple', 'la_Text_MultipleShow', 'text', NULL, NULL, 0, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Keyword_products', 'la_config_SearchRel_DefaultKeyword', 'la_text_keyword', 'text', NULL, NULL, 0, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Pop_products', 'la_config_DefaultPop', 'la_text_popularity', 'text', NULL, NULL, 0, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Rating_products', 'la_config_DefaultRating', 'la_prompt_Rating', 'text', NULL, NULL, 0, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Increase_products', 'la_config_DefaultIncreaseImportance', 'la_text_increase_importance', 'text', NULL, NULL, 0, 0, 1);
+
+INSERT INTO ConfigurationAdmin VALUES ('Comm_AffiliateStorageMethod', 'la_Text_Affiliates', 'la_prompt_affiliate_storage_method', 'radio', NULL, '1=la_opt_Session,2=la_opt_PermanentCookie', 40.02, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_AffiliateCookieDuration', 'la_Text_Affiliates', 'la_prompt_affiliate_cookie_duration', 'text', NULL, '', 40.03, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_RegisterAsAffiliate', 'la_Text_Affiliates', 'la_prompt_register_as_affiliate', 'checkbox', NULL, '', 40.01, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_RecurringChargeInverval', 'la_Text_Orders', 'la_RecurringChargeInverval', 'text', NULL, NULL, 10.08, 0, 0);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_AutoProcessRecurringOrders', 'la_Text_Orders', 'la_AutoProcessRecurringOrders', 'checkbox', NULL, NULL, 10.09, 0, 0);
+
+INSERT INTO ConfigurationAdmin VALUES ('MaxAddresses', 'la_Text_Orders', 'la_MaxAddresses', 'text', NULL, NULL, 10.10, 0, 0);
+INSERT INTO ConfigurationAdmin VALUES ('Comm_PriceBracketCalculation', 'la_Text_PricingCalculation', 'la_prompt_PriceBracketCalculation', 'radio', NULL , '1=la_opt_PriceCalculationByPrimary,2=la_opt_PriceCalculationByOptimal', '50', '0', '1');
+
+INSERT INTO ConfigurationAdmin VALUES ('Comm_MaskProcessedCreditCards', 'la_Text_Orders', 'la_MaskProcessedCreditCards', 'checkbox', NULL , NULL , '10.11', '0', '0');
+
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Allow_Order_Different_Types', '1', 'In-Commerce', 'in-commerce:general');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Order_Number_Format_P', '6', 'In-Commerce', 'in-commerce:general');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Order_Number_Format_S', '3', 'In-Commerce', 'in-commerce:general');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Perpage_Products_Short', '3', 'In-Commerce', 'in-commerce:output');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_AllowOrderingInNonPrimaryCurrency', '1', 'In-Commerce', 'in-commerce:general');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_ExchangeRateSource', '3', 'In-Commerce', 'in-commerce:general');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_DefaultCouponDuration', '14', 'In-Commerce', 'in-commerce:general');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_RequireLoginBeforeCheckout', '0', 'In-Commerce', 'in-commerce:general');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Enable_Backordering', '1', 'In-Commerce', 'in-commerce:general');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Next_Order_Number', '1', 'In-Commerce', 'in-commerce:general');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Perpage_Products', '10', 'In-Commerce', 'in-commerce:output');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Perpage_Reviews', '10', 'In-Commerce', 'in-commerce:output');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Perpage_Manufacturers', '10', 'In-Commerce', 'in-commerce:output');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Perpage_Manufacturers_Short', '3', 'In-Commerce', 'in-commerce:output');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_AddressLine1', '', 'In-Commerce', 'in-commerce:contacts');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_AddressLine2', '', 'In-Commerce', 'in-commerce:contacts');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_City', '', 'In-Commerce', 'in-commerce:contacts');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_State', '', 'In-Commerce', 'in-commerce:contacts');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_ZIP', '', 'In-Commerce', 'in-commerce:contacts');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Country', '', 'In-Commerce', 'in-commerce:contacts');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_CompanyName', '', 'In-Commerce', 'in-commerce:contacts');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_StoreName', '', 'In-Commerce', 'in-commerce:contacts');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Shipping_AddressLine1', '', 'In-Commerce', 'in-commerce:contacts');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Shipping_AddressLine2', '', 'In-Commerce', 'in-commerce:contacts');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Shipping_City', '', 'In-Commerce', 'in-commerce:contacts');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Shipping_State', '', 'In-Commerce', 'in-commerce:contacts');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Shipping_ZIP', '', 'In-Commerce', 'in-commerce:contacts');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Shipping_Country', '', 'In-Commerce', 'in-commerce:contacts');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Contacts_Name', '' , 'In-Commerce', 'in-commerce:contacts');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Contacts_Phone', '', 'In-Commerce', 'in-commerce:contacts');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Contacts_Fax', '', 'In-Commerce', 'in-commerce:contacts');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Contacts_Email', '', 'In-Commerce', 'in-commerce:contacts');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Contacts_Additional', '', 'In-Commerce', 'in-commerce:contacts');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Process_Backorders_Auto', '1', 'In-Commerce', 'in-commerce:general');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'product_OrderProductsBy', 'Name', 'In-Commerce', 'in-commerce:output');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Product_NewDays', '7', 'In-Commerce', 'in-commerce:output');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Product_MaxHotNumber', '5', 'In-Commerce', 'in-commerce:output');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Product_MinPopVotes', '1', 'In-Commerce', 'in-commerce:output');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Product_MinPopRating', '4', 'In-Commerce', 'in-commerce:output');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'product_ReviewDelay_Value', '30', 'In-Commerce', 'in-commerce:output');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'product_ReviewDelay_Interval', '86400', 'In-Commerce', 'in-commerce:output');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'product_RatingDelay_Value', '30', 'In-Commerce', 'in-commerce:output');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'product_RatingDelay_Interval', '86400', 'In-Commerce', 'in-commerce:output');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'ShowProductImagesInOrders', '0', 'In-Commerce', 'in-commerce:output');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'product_OrderProductsByDir', 'ASC', 'In-Commerce', 'in-commerce:output');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'product_OrderProductsThenBy', 'Price', 'In-Commerce', 'in-commerce:output');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'product_OrderProductsThenByDir', 'ASC', 'In-Commerce', 'in-commerce:output');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'products_EditorPicksAboveRegular', '1', 'In-Commerce', 'in-commerce:output');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'p_CategoryTemplate', '/in-commerce/designs/section', 'In-Commerce', 'in-commerce:output');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'p_ItemTemplate', 'in-commerce/designs/detail', 'In-Commerce', 'in-commerce:output');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'p_MaxImageCount', 5, 'In-Commerce', 'in-commerce:output');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'p_ThumbnailImageWidth', 120, 'In-Commerce', 'in-commerce:output');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'p_ThumbnailImageHeight', 120, 'In-Commerce', 'in-commerce:output');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'p_FullImageWidth', 450, 'In-Commerce', 'in-commerce:output');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'p_FullImageHeight', 450, 'In-Commerce', 'in-commerce:output');
+
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Search_ShowMultiple_products', '1', 'In-Commerce', 'in-commerce:search');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SearchRel_Keyword_products', '70', 'In-Commerce', 'in-commerce:search');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SearchRel_Pop_products', '10', 'In-Commerce', 'in-commerce:search');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SearchRel_Rating_products', '10', 'In-Commerce', 'in-commerce:search');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SearchRel_Increase_products', '30', 'In-Commerce', 'in-commerce:search');
+
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_AffiliateStorageMethod', '1', 'In-Commerce', 'in-commerce:general');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_AffiliateCookieDuration', '30', 'In-Commerce', 'in-commerce:general');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_RegisterAsAffiliate', '0', 'In-Commerce', 'in-commerce:general');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_RecurringChargeInverval', '1', 'In-Commerce', 'in-commerce:general');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_AutoProcessRecurringOrders', '1', 'In-Commerce', 'in-commerce:general');
+
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'MaxAddresses', '0', 'In-Commerce', 'in-commerce:general');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_PriceBracketCalculation', '1', 'In-Commerce', 'in-commerce:general');
+
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_MaskProcessedCreditCards', '0', 'In-Commerce', 'in-commerce:general');
+
+INSERT INTO Currencies VALUES (6, 'AFA', '', 0, 'la_AFA', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (7, 'ALL', '', 0, 'la_ALL', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (8, 'DZD', '', 0, 'la_DZD', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (9, 'ADP', '', 0, 'la_ADP', 1, 1124019233, 0, 0, 0);
+INSERT INTO Currencies VALUES (10, 'AOA', '', 0, 'la_AOA', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (11, 'ARS', '', 0, 'la_ARS', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (12, 'AMD', '', 0, 'la_AMD', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (13, 'AWG', '', 0, 'la_AWG', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (14, 'AZM', '', 0, 'la_AZM', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (15, 'BSD', '', 0, 'la_BSD', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (16, 'BHD', '', 0, 'la_BHD', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (17, 'BDT', '', 0, 'la_BDT', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (18, 'BBD', '', 0, 'la_BBD', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (19, 'BYR', '', 0, 'la_BYR', 0.46440677966102, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (20, 'BZD', '', 0, 'la_BZD', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (21, 'BMD', '', 0, 'la_BMD', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (22, 'BTN', '', 0, 'la_BTN', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (23, 'INR', '', 0, 'la_INR', 0.022962112514351, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (24, 'BOV', '', 0, 'la_BOV', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (25, 'BOB', '', 0, 'la_BOB', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (26, 'BAM', '', 0, 'la_BAM', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (27, 'BWP', '', 0, 'la_BWP', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (28, 'BRL', '', 0, 'la_BRL', 0.42331625957753, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (29, 'BND', '', 0, 'la_BND', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (30, 'BGL', '', 0, 'la_BGL', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (31, 'BGN', '', 0, 'la_BGN', 0.60754639807761, 1120650640, 0, 0, 0);
+INSERT INTO Currencies VALUES (32, 'BIF', '', 0, 'la_BIF', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (33, 'KHR', '', 0, 'la_KHR', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (34, 'CAD', '', 0, 'la_CAD', 0.80579100834068, 1120657409, 0, 0, 0);
+INSERT INTO Currencies VALUES (35, 'CVE', '', 0, 'la_CVE', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (36, 'KYD', '', 0, 'la_KYD', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (37, 'XAF', '', 0, 'la_XAF', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (38, 'CLF', '', 0, 'la_CLF', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (39, 'CLP', '', 0, 'la_CLP', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (40, 'CNY', '', 0, 'la_CNY', 0.12082358922217, 1120650640, 0, 0, 0);
+INSERT INTO Currencies VALUES (41, 'COP', '', 0, 'la_COP', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (42, 'KMF', '', 0, 'la_KMF', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (43, 'CDF', '', 0, 'la_CDF', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (44, 'CRC', '', 0, 'la_CRC', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (45, 'HRK', '', 0, 'la_HRK', 0.16222968545216, 1120650640, 0, 0, 0);
+INSERT INTO Currencies VALUES (46, 'CUP', '', 0, 'la_CUP', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (47, 'CYP', '', 0, 'la_CYP', 2.0723753051971, 1120650640, 0, 0, 0);
+INSERT INTO Currencies VALUES (48, 'CZK', '', 0, 'la_CZK', 0.039512535745162, 1120650640, 0, 0, 0);
+INSERT INTO Currencies VALUES (49, 'DKK', '', 0, 'la_DKK', 0.15944343065693, 1120650640, 0, 0, 0);
+INSERT INTO Currencies VALUES (50, 'DJF', '', 0, 'la_DJF', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (51, 'DOP', '', 0, 'la_DOP', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (52, 'TPE', '', 0, 'la_TPE', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (53, 'ECV', '', 0, 'la_ECV', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (54, 'ECS', '', 0, 'la_ECS', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (55, 'EGP', '', 0, 'la_EGP', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (56, 'SVC', '', 0, 'la_SVC', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (57, 'ERN', '', 0, 'la_ERN', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (58, 'EEK', '', 0, 'la_EEK', 0.075946211956591, 1120650640, 0, 0, 0);
+INSERT INTO Currencies VALUES (59, 'ETB', '', 0, 'la_ETB', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (60, 'FKP', '', 0, 'la_FKP', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (61, 'FJD', '', 0, 'la_FJD', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (62, 'GMD', '', 0, 'la_GMD', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (63, 'GEL', '', 0, 'la_GEL', 1, 1124019233, 0, 0, 0);
+INSERT INTO Currencies VALUES (64, 'GHC', '', 0, 'la_GHC', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (65, 'GIP', '', 0, 'la_GIP', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (66, 'GTQ', '', 0, 'la_GTQ', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (67, 'GNF', '', 0, 'la_GNF', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (68, 'GWP', '', 0, 'la_GWP', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (69, 'GYD', '', 0, 'la_GYD', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (70, 'HTG', '', 0, 'la_HTG', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (71, 'HNL', '', 0, 'la_HNL', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (72, 'HKD', '', 0, 'la_HKD', 0.1286359158665, 1120650640, 0, 0, 0);
+INSERT INTO Currencies VALUES (73, 'HUF', '', 0, 'la_HUF', 0.0048070388349515, 1120650640, 0, 0, 0);
+INSERT INTO Currencies VALUES (74, 'ISK', '', 0, 'la_ISK', 0.015143366891806, 1120650640, 0, 0, 0);
+INSERT INTO Currencies VALUES (75, 'IDR', '', 0, 'la_IDR', 0.00010126584435926, 1120650640, 0, 0, 0);
+INSERT INTO Currencies VALUES (76, 'IRR', '', 0, 'la_IRR', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (77, 'IQD', '', 0, 'la_IQD', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (78, 'ILS', '', 0, 'la_ILS', 0.21864406779661, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (79, 'JMD', '', 0, 'la_JMD', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (80, 'JPY', '', 0, 'la_JPY', 0.0089325716003909, 1120650640, 0, 0, 0);
+INSERT INTO Currencies VALUES (81, 'JOD', '', 0, 'la_JOD', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (82, 'KZT', '', 0, 'la_KZT', 7.3559322033898, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (83, 'KES', '', 0, 'la_KES', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (84, 'AUD', '', 0, 'la_AUD', 0.74088160109733, 1120650640, 1, 0, 0);
+INSERT INTO Currencies VALUES (85, 'KPW', '', 0, 'la_KPW', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (86, 'KRW', '', 0, 'la_KRW', 0.00095066281590758, 1120650640, 0, 0, 0);
+INSERT INTO Currencies VALUES (87, 'KWD', '', 0, 'la_KWD', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (88, 'KGS', '', 0, 'la_KGS', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (89, 'LAK', '', 0, 'la_LAK', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (90, 'LVL', '', 0, 'la_LVL', 1.7697169946847, 1124019016, 0, 0, 0);
+INSERT INTO Currencies VALUES (91, 'LBP', '', 0, 'la_LBP', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (92, 'LSL', '', 0, 'la_LSL', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (93, 'LRD', '', 0, 'la_LRD', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (94, 'LYD', '', 0, 'la_LYD', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (95, 'CHF', '', 0, 'la_CHF', 0.76560788608981, 1120650640, 0, 0, 0);
+INSERT INTO Currencies VALUES (96, 'LTL', '', 0, 'la_LTL', 0.34415546802595, 1120650640, 0, 0, 0);
+INSERT INTO Currencies VALUES (97, 'MOP', '', 0, 'la_MOP', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (98, 'MKD', '', 0, 'la_MKD', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (99, 'MGF', '', 0, 'la_MGF', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (100, 'MWK', '', 0, 'la_MWK', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (101, 'MYR', '', 0, 'la_MYR', 0.2631019594819, 1120650640, 0, 0, 0);
+INSERT INTO Currencies VALUES (102, 'MVR', '', 0, 'la_MVR', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (103, 'MTL', '', 0, 'la_MTL', 2.7679944095038, 1120650640, 0, 0, 0);
+INSERT INTO Currencies VALUES (104, 'EUR', '&euro;&nbsp;', 0, 'la_EUR', 1.2319, 1124019016, 1, 0, 0);
+INSERT INTO Currencies VALUES (105, 'MRO', '', 0, 'la_MRO', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (106, 'MUR', '', 0, 'la_MUR', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (107, 'MXN', '', 0, 'la_MXN', 0.092980009298001, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (108, 'MXV', '', 0, 'la_MXV', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (109, 'MDL', '', 0, 'la_MDL', 0.079830508474576, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (110, 'MNT', '', 0, 'la_MNT', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (111, 'XCD', '', 0, 'la_XCD', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (112, 'MZM', '', 0, 'la_MZM', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (113, 'MMK', '', 0, 'la_MMK', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (114, 'ZAR', '', 0, 'la_ZAR', 0.14487399875645, 1120650640, 0, 0, 0);
+INSERT INTO Currencies VALUES (115, 'NAD', '', 0, 'la_NAD', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (116, 'NPR', '', 0, 'la_NPR', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (117, 'ANG', '', 0, 'la_ANG', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (118, 'XPF', '', 0, 'la_XPF', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (119, 'NZD', '', 0, 'la_NZD', 0.67409802586794, 1120650640, 0, 0, 0);
+INSERT INTO Currencies VALUES (120, 'NIO', '', 0, 'la_NIO', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (121, 'NGN', '', 0, 'la_NGN', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (122, 'NOK', '', 0, 'la_NOK', 0.15015163002274, 1120650640, 0, 0, 0);
+INSERT INTO Currencies VALUES (123, 'OMR', '', 0, 'la_OMR', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (124, 'PKR', '', 0, 'la_PKR', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (125, 'PAB', '', 0, 'la_PAB', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (126, 'PGK', '', 0, 'la_PGK', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (127, 'PYG', '', 0, 'la_PYG', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (128, 'PEN', '', 0, 'la_PEN', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (129, 'PHP', '', 0, 'la_PHP', 0.017769769111138, 1120650640, 0, 0, 0);
+INSERT INTO Currencies VALUES (130, 'PLN', '', 0, 'la_PLN', 0.29408270844161, 1120650640, 0, 0, 0);
+INSERT INTO Currencies VALUES (131, 'USD', '$&nbsp;', 0, 'la_USD', 1, 1124019100, 1, 1, 0);
+INSERT INTO Currencies VALUES (132, 'QAR', '', 0, 'la_QAR', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (133, 'ROL', '', 0, 'la_ROL', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (134, 'RUB', NULL, 0, 'la_RUB', 0.0347, 1123850285, 0, 0, 0);
+INSERT INTO Currencies VALUES (136, 'RWF', '', 0, 'la_RWF', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (137, 'SHP', '', 0, 'la_SHP', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (138, 'WST', '', 0, 'la_WST', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (139, 'STD', '', 0, 'la_STD', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (140, 'SAR', '', 0, 'la_SAR', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (141, 'SCR', '', 0, 'la_SCR', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (142, 'SLL', '', 0, 'la_SLL', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (143, 'SGD', '', 0, 'la_SGD', 0.58838383838384, 1120650640, 0, 0, 0);
+INSERT INTO Currencies VALUES (144, 'SKK', '', 0, 'la_SKK', 0.031050431147113, 1120650640, 0, 0, 0);
+INSERT INTO Currencies VALUES (145, 'SIT', '', 0, 'la_SIT', 0.0049628299365185, 1120650640, 0, 0, 0);
+INSERT INTO Currencies VALUES (146, 'SBD', '', 0, 'la_SBD', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (147, 'SOS', '', 0, 'la_SOS', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (148, 'LKR', '', 0, 'la_LKR', 0.0099920063948841, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (149, 'SDD', '', 0, 'la_SDD', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (150, 'SRG', '', 0, 'la_SRG', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (151, 'SZL', '', 0, 'la_SZL', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (152, 'SEK', '', 0, 'la_SEK', 0.12594327624216, 1120650640, 0, 0, 0);
+INSERT INTO Currencies VALUES (153, 'SYP', '', 0, 'la_SYP', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (154, 'TWD', '', 0, 'la_TWD', 0.031298904538341, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (155, 'TJS', '', 0, 'la_TJS', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (156, 'TZS', '', 0, 'la_TZS', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (157, 'THB', '', 0, 'la_THB', 0.024061474911918, 1120650640, 0, 0, 0);
+INSERT INTO Currencies VALUES (158, 'XOF', '', 0, 'la_XOF', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (159, 'NZD', '', 0, 'la_NZD', 0.67409802586794, 1120650640, 0, 0, 0);
+INSERT INTO Currencies VALUES (160, 'TOP', '', 0, 'la_TOP', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (161, 'TTD', '', 0, 'la_TTD', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (162, 'TND', '', 0, 'la_TND', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (163, 'TRL', '', 0, 'la_TRL', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (164, 'TMM', '', 0, 'la_TMM', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (165, 'UGX', '', 0, 'la_UGX', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (166, 'UAH', '', 0, 'la_UAH', 0.19830508474576, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (167, 'AED', '', 0, 'la_AED', 0.2728813559322, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (168, 'GBP', NULL, 0, 'la_GBP', 1.7543367535248, 1120657409, 1, 0, 0);
+INSERT INTO Currencies VALUES (169, 'USS', '', 0, 'la_USS', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (170, 'USN', '', 0, 'la_USN', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (171, 'UYU', '', 0, 'la_UYU', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (172, 'UZS', '', 0, 'la_UZS', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (173, 'VUV', '', 0, 'la_VUV', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (174, 'VEB', '', 0, 'la_VEB', 0.00046628741956542, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (175, 'VND', '', 0, 'la_VND', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (176, 'MAD', '', 0, 'la_MAD', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (177, 'YER', '', 0, 'la_YER', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (178, 'YUM', '', 0, 'la_YUM', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (179, 'ZMK', '', 0, 'la_ZMK', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (180, 'ZWD', '', 0, 'la_ZWD', 1, 1120641028, 0, 0, 0);
+INSERT INTO Currencies VALUES (181, 'AFN', '', 0, 'la_AFN', 0.02, 1120641028, 0, 0, 0);
+
+INSERT INTO CustomField VALUES (DEFAULT, 11, 'Features', 'la_Features', 1, 'la_Text_CustomFields', 'la_Features', 'textarea', 'rows="5" cols="70"', '', 0, 1, 0, 0);
+INSERT INTO CustomField VALUES (DEFAULT, 11, 'Availability', 'la_Availability', 1, 'la_Text_CustomFields', 'la_Availability', 'text', 'size="70"', '', 0, 1, 0, 0);
+INSERT INTO CustomField VALUES (DEFAULT, 1, 'p_ItemTemplate', 'p_ItemTemplate', 0, 'la_title_SystemCF', 'p_ItemTemplate', 'text', NULL, '', 0, 0, 1, 0);
+INSERT INTO CustomField VALUES (DEFAULT, 6, 'shipping_addr_block', 'la_fld_BlockShippingAddress', 0, 'la_section_StoreSettings', 'la_fld_BlockShippingAddress', 'checkbox', '1=+Block', '', 0, 1, 1, 0);
+
+INSERT INTO Events VALUES (DEFAULT, 'ORDER.SUBMIT', NULL, 2, 0, 'In-Commerce', 'la_event_prod_order.submit', 1);
+INSERT INTO Events VALUES (DEFAULT, 'ORDER.SUBMIT', NULL, 2, 0, 'In-Commerce', 'la_event_prod_order.submit', 0);
+INSERT INTO Events VALUES (DEFAULT, 'ORDER.APPROVE', NULL, 1, 0, 'In-Commerce', 'la_event_prod_order.approve', 0);
+INSERT INTO Events VALUES (DEFAULT, 'ORDER.DENY', NULL, 1, 0, 'In-Commerce', 'la_event_prod_order.deny', 0);
+INSERT INTO Events VALUES (DEFAULT, 'ORDER.SHIP', NULL, 1, 0, 'In-Commerce', 'la_event_prod_order.ship', 0);
+INSERT INTO Events VALUES (DEFAULT, 'BACKORDER.ADD', NULL, 2, 0, 'In-Commerce', 'la_event_prod_backorder.add', 1);
+INSERT INTO Events VALUES (DEFAULT, 'BACKORDER.ADD', NULL, 2, 0, 'In-Commerce', 'la_event_prod_backorder.add', 0);
+INSERT INTO Events VALUES (DEFAULT, 'BACKORDER.FULLFILL', NULL, 1, 0, 'In-Commerce', 'la_event_prod_backorder.fullfill', 0);
+INSERT INTO Events VALUES (DEFAULT, 'BACKORDER.PROCESS', NULL, 1, 0, 'In-Commerce', 'la_event_prod_backorder.process', 0);
+INSERT INTO Events VALUES (DEFAULT, 'SITE.SUGGEST', NULL, 1, 0, 'In-Commerce', 'la_event_user.suggest_site', 0);
+INSERT INTO Events VALUES (DEFAULT, 'SITE.SUGGEST', NULL, 2, 0, 'In-Commerce', 'la_event_user.suggest_site', 1);
+INSERT INTO Events VALUES (DEFAULT, 'PRODUCT.SUGGEST', NULL, 1, 0, 'In-Commerce', 'la_event_user.suggest_product', 0);
+INSERT INTO Events VALUES (DEFAULT, 'PRODUCT.SUGGEST', NULL, 2, 0, 'In-Commerce', 'la_event_user.suggest_product', 1);
+INSERT INTO Events VALUES (DEFAULT, 'AFFILIATE.REGISTER', NULL, 2, 0, 'In-Commerce', 'la_event_prod_affiliate.register', 0);
+INSERT INTO Events VALUES (DEFAULT, 'AFFILIATE.REGISTER', NULL, 2, 0, 'In-Commerce', 'la_event_prod_affiliate.register', 1);
+INSERT INTO Events VALUES (DEFAULT, 'AFFILIATE.PAYMENT', NULL, 1, 0, 'In-Commerce', 'la_event_prod_affiliate.payment', 0);
+INSERT INTO Events VALUES (DEFAULT, 'AFFILIATE.PAYMENT', NULL, 1, 0, 'In-Commerce', 'la_event_prod_affiliate.payment', 1);
+INSERT INTO Events VALUES (DEFAULT, 'AFFILIATE.REGISTRATION.APPROVED', NULL, 1, 0, 'In-Commerce', 'la_event_prod_affiliate.registration_approved', 0);
+INSERT INTO Events VALUES (DEFAULT, 'AFFILIATE.REGISTRATION.APPROVED', NULL, 0, 0, 'In-Commerce', 'la_event_prod_affiliate.registration_approved', 1);
+INSERT INTO Events VALUES (DEFAULT, 'AFFILIATE.REGISTRATION.DENIED', NULL, 1, 0, 'In-Commerce', 'la_event_prod_affiliate.registration_denied', 0);
+INSERT INTO Events VALUES (DEFAULT, 'AFFILIATE.REGISTRATION.DENIED', NULL, 0, 0, 'In-Commerce', 'la_event_prod_affiliate.registration_denied', 1);
+INSERT INTO Events VALUES (DEFAULT, 'AFFILIATE.PAYMENT.TYPE.CHANGED', NULL, 1, 0, 'In-Commerce', 'la_event_prod_affiliate.payment_type_changed', 0);
+INSERT INTO Events VALUES (DEFAULT, 'AFFILIATE.PAYMENT.TYPE.CHANGED', NULL, 1, 0, 'In-Commerce', 'la_event_prod_affiliate.payment_type_changed', 1);
+INSERT INTO Events VALUES (DEFAULT, 'ORDER.RECURRING.PROCESSED', NULL, 1, 0, 'In-Commerce', 'la_RecurringOrderProcessed', '0');
+INSERT INTO Events VALUES (DEFAULT, 'ORDER.RECURRING.PROCESSED', NULL, 1, 0, 'In-Commerce', 'la_RecurringOrderProcessed', '1');
+INSERT INTO Events VALUES (DEFAULT, 'ORDER.RECURRING.DENIED', NULL, 1, 0, 'In-Commerce', 'la_RecurringOrderDenied', '0');
+INSERT INTO Events VALUES (DEFAULT, 'ORDER.RECURRING.DENIED', NULL, 1, 0, 'In-Commerce', 'la_RecurringOrderDenied', '1');
+INSERT INTO Events VALUES (DEFAULT, 'USER.GIFTCERTIFICATE', NULL, 1, 0, 'In-Commerce', 'la_event_user.giftcertificate', 0);
+INSERT INTO Events VALUES (DEFAULT, 'USER.GIFTCERTIFICATE', NULL, 1, 0, 'In-Commerce', 'la_event_user.giftcertificate', 1);
+
+INSERT INTO GatewayConfigFields VALUES (1, 'submit_url', 'Gateway URL', 'text', '', 2);
+INSERT INTO GatewayConfigFields VALUES (2, 'user_account', 'Authorize.net User Name', 'text', '', 2);
+INSERT INTO GatewayConfigFields VALUES (4, 'transaction_key', 'Authorize.net Transaction Key', 'text', '', 2);
+INSERT INTO GatewayConfigFields VALUES (9, 'business_account', 'Username', 'text', '', 4);
+INSERT INTO GatewayConfigFields VALUES (10, 'submit_url', 'Gateway URL', 'text', '', 4);
+INSERT INTO GatewayConfigFields VALUES (11, 'currency_code', 'Payment Currency Code', 'text', '', 4);
+INSERT INTO GatewayConfigFields VALUES (12, 'shipping_control', 'Shipping Control', 'select', '3=la_CreditDirect,4=la_CreditPreAuthorize', 2);
+INSERT INTO GatewayConfigFields VALUES (13, 'encapsulate_char', 'Encapsulate Char', 'text', '', 2);
+INSERT INTO GatewayConfigFields VALUES (14, 'shipping_control', 'Shipping Control', 'select', '3=la_CreditDirect,4=la_CreditPreAuthorize', 4);
+
+INSERT INTO GatewayConfigValues VALUES (36, 12, 3, '4');
+INSERT INTO GatewayConfigValues VALUES (35, 1, 3, 'https://secure.authorize.net/gateway/transact.dll');
+INSERT INTO GatewayConfigValues VALUES (34, 2, 3, '');
+INSERT INTO GatewayConfigValues VALUES (33, 4, 3, '');
+INSERT INTO GatewayConfigValues VALUES (32, 9, 4, '');
+INSERT INTO GatewayConfigValues VALUES (31, 10, 4, 'https://www.paypal.com/cgi-bin/webscr');
+INSERT INTO GatewayConfigValues VALUES (37, 11, 4, 'USD');
+INSERT INTO GatewayConfigValues VALUES (38, 13, 3, '|');
+INSERT INTO GatewayConfigValues VALUES (39, 14, 4, '4');
+
+INSERT INTO Gateways VALUES (1, 'None', 'kGWBase', 'gw_base.php', 0);
+INSERT INTO Gateways VALUES (2, 'Credit Card (Authorize.Net)', 'kGWAuthorizeNet', 'authorizenet.php', 1);
+INSERT INTO Gateways VALUES (3, 'Credit Card (Manual Processing)', 'kGWBase', 'gw_base.php', 1);
+INSERT INTO Gateways VALUES (4, 'PayPal', 'kGWPayPal', 'paypal.php', 0);
+
+INSERT INTO ItemTypes VALUES (11, 'In-Commerce', 'p', 'Products', 'Name', 'CreatedById', NULL, NULL, '', 0, '', 'ProductsItem', 'Product');
+INSERT INTO ItemTypes VALUES (13, 'In-Commerce', 'ord', 'Orders', 'OrderNumber', '', NULL, NULL, '', 0, '', 'OrdersItem', 'Order');
+
+INSERT INTO PaymentTypes VALUES (1, 'Credit Card (manual)', 'Credit Card', 'Please enter your credit card details.', NULL, 1, 0, 1, 1, 3, DEFAULT, DEFAULT, ',15,');
+INSERT INTO PaymentTypes VALUES (4, 'PayPal', 'PayPal', 'You will be redirected to PayPal site to make the payment after confirming your order on the next checkout step.', NULL, 0, 0, 0, 1, 4, DEFAULT, DEFAULT, ',15,');
+INSERT INTO PaymentTypes VALUES (2, 'Check/MO', 'Check or Money Order', NULL, NULL, 0, 0, 0, 1, 1, 1, DEFAULT, ',15,');
+INSERT INTO PaymentTypes VALUES (3, 'Authorize.Net', 'Credit Card', 'Please enter your Credit Card details below. Your credit card will not be charged until you confirm your purchase on the next(last) step of checkout process.', NULL, 0, 0, 0, 1, 2, DEFAULT, DEFAULT, ',15,');
+
+INSERT INTO PaymentTypeCurrencies VALUES (DEFAULT, 4, 131);
+INSERT INTO PaymentTypeCurrencies VALUES (DEFAULT, 2, 131);
+INSERT INTO PaymentTypeCurrencies VALUES (DEFAULT, 3, 131);
+INSERT INTO PaymentTypeCurrencies VALUES (DEFAULT, 1, 131);
+
+INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.RATE', 'lu_PermName_Product.Rate_desc', 'lu_PermName_Product.Rate_error', 'In-Commerce');
+INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.REVIEW', 'lu_PermName_Product.Review_desc', 'lu_PermName_Product.Review_error', 'In-Commerce');
+INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.REVIEW.PENDING', 'lu_PermName_Product.Review_Pending_desc', ' lu_PermName_Product.Review_Pending_error', 'In-Commerce');
+INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.ADD', 'lu_PermName_Product.Add_desc', 'lu_PermName_Product.Add_error', 'In-Commerce');
+INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.DELETE', 'lu_PermName_Product.Delete_desc', 'lu_PermName_Product.Delete_error', 'In-Commerce');
+INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.MODIFY', 'lu_PermName_Product.Modify_desc', 'lu_PermName_Product.Modify_desc', 'In-Commerce');
+INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.VIEW', 'lu_PermName_Product.View_desc', 'lu_PermName_Product.View_error', 'In-Commerce');
+
+INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.VIEW', 14, 1, 0, {ProductCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.VIEW', 14, 1, 0, {ProductCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.RATE', 13, 1, 0, {ProductCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.REVIEW', 13, 1, 0, {ProductCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.REVIEW.PENDING', 13, 1, 0, {ProductCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.VIEW', 13, 1, 0, {ProductCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'FAVORITES', 13, 1, 0, {ProductCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.VIEW', 13, 1, 0, {ProductCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.VIEW', 12, 1, 0, {ProductCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.VIEW', 12, 1, 0, {ProductCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.VIEW', 11, 1, 0, {ProductCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.ADD', 11, 1, 0, {ProductCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.DELETE', 11, 1, 0, {ProductCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.MODIFY', 11, 1, 0, {ProductCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.VIEW', 11, 1, 0, {ProductCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:products.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:setting_folder.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.delete', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.advanced:approve', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.advanced:deny', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.advanced:archive', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.advanced:place', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.advanced:process', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.advanced:ship', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.advanced:reset_to_pending', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:discounts.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:discounts.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:discounts.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:discounts.delete', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:discounts.advanced:approve', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:discounts.advanced:decline', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:coupons.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:coupons.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:coupons.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:coupons.delete', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:coupons.advanced:approve', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:coupons.advanced:decline', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:manufacturers.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:manufacturers.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:manufacturers.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:manufacturers.delete', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:currencies.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:currencies.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:currencies.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:currencies.delete', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:currencies.advanced:move_up', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:currencies.advanced:move_down', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:currencies.advanced:update_rate', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:currencies.advanced:set_primary', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping.delete', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping.advanced:approve', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping.advanced:decline', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping_quote_engines.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping_quote_engines.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping_quote_engines.advanced:approve', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping_quote_engines.advanced:decline', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:payment_types.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:payment_types.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:payment_types.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:payment_types.delete', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:taxes.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:taxes.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:taxes.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:taxes.delete', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliates.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliates.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliates.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliates.delete', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliates.advanced:approve', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliates.advanced:decline', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_plans.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_plans.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_plans.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_plans.delete', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_plans.advanced:approve', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_plans.advanced:decline', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_plans.advanced:set_primary', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_payment_types.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_payment_types.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_payment_types.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_payment_types.delete', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_payment_types.advanced:approve', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_payment_types.advanced:decline', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_payment_types.advanced:set_primary', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_payment_types.advanced:move_up', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_payment_types.advanced:move_down', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:general.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:general.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:output.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:output.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:search.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:search.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:incommerce_configemail.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:incommerce_configemail.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:contacts.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:contacts.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:configuration_custom.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:configuration_custom.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:configuration_custom.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:configuration_custom.delete', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:paymentlog.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:downloadlog.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:downloadlog.delete', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:gift-certificates.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:gift-certificates.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:gift-certificates.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:gift-certificates.delete', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:gift-certificates.advanced:approve', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:gift-certificates.advanced:decline', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:reports.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:reports.add', 11, 1, 1, 0);
+
+INSERT INTO SearchConfig VALUES ('Products', 'OrgId', 0, 0, 'lu_fielddesc_prod_orgid', 'lu_field_orgid', 'In-Commerce', 'la_Text_Products', 19, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Products', 'NewItem', 0, 1, 'lu_fielddesc_prod_newitem', 'lu_field_newproduct', 'In-Commerce', 'la_Text_Products', 18, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Products', 'PopItem', 0, 1, 'lu_fielddesc_prod_popitem', 'lu_field_popproduct', 'In-Commerce', 'la_Text_Products', 17, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Products', 'HotItem', 0, 1, 'lu_fielddesc_prod_topseller', 'lu_field_topseller', 'In-Commerce', 'la_Text_Products', 16, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Products', 'EditorsPick', 0, 1, 'lu_fielddesc_prod_editorspick', 'lu_field_editorspick', 'In-Commerce', 'la_Text_Products', 14, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Products', 'CachedReviewsQty', 0, 0, 'lu_fielddesc_prod_cachedreviewsqty', 'lu_field_cachedreviewsqty', 'In-Commerce', 'la_Text_Products', 9, DEFAULT, 0, 'range', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Products', 'CachedVotesQty', 0, 0, 'lu_fielddesc_prod_cachedvotesqty', 'lu_field_cachedvotesqty', 'In-Commerce', 'la_Text_Products', 8, DEFAULT, 0, 'range', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Products', 'ProductId', 0, 0, 'lu_fielddesc_prod_productid', 'lu_field_productid', 'In-Commerce', 'la_Text_Products', 0, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Products', 'Name', 1, 1, 'lu_fielddesc_prod_producttitle', 'lu_field_producttitle', 'In-Commerce', 'la_Text_Products', 1, DEFAULT, 3, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Products', 'Description', 1, 1, 'lu_fielddesc_prod_description', 'lu_field_description', 'In-Commerce', 'la_Text_Products', 2, DEFAULT, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Products', 'CreatedOn', 0, 1, 'lu_fielddesc_prod_createdon', 'lu_field_createdon', 'In-Commerce', 'la_Text_Products', 4, DEFAULT, 0, 'date', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Products', 'Modified', 0, 1, 'lu_fielddesc_prod_modified', 'lu_field_modified', 'In-Commerce', 'la_Text_Products', 5, DEFAULT, 0, 'date', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Products', 'Hits', 0, 1, 'lu_fielddesc_prod_qtysold', 'lu_field_qtysold', 'In-Commerce', 'la_Text_Products', 6, DEFAULT, 0, 'range', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Products', 'CachedRating', 0, 0, 'lu_fielddesc_prod_cachedrating', 'lu_field_cachedrating', 'In-Commerce', 'la_Text_Products', 7, DEFAULT, 0, 'range', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('CustomField', 'Features', 1, 0, 'la_Features', 'la_Features', 'In-Commerce', 'la_Text_CustomFields', 0, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Products', 'SKU', 1, 1, 'lu_fielddesc_prod_sku', 'lu_field_sku', 'In-Commerce', 'la_Text_Products', 0, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Products', 'DescriptionExcerpt', 1, 0, 'lu_fielddesc_prod_descriptionex', 'lu_field_descriptionex', 'In-Commerce', 'la_Text_Products', 2, DEFAULT, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Products', 'ManufacturerId', 1, 1, 'lu_fielddesc_prod_manufacturer', 'lu_field_manufacturer', 'In-Commerce', 'la_Text_Products', 3, DEFAULT, 2, 'text', 'Manufacturers.Name', '{ForeignTable}.ManufacturerId={LocalTable}.ManufacturerId', NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('Products', 'Price', 1, 1, 'lu_fielddesc_prod_price', 'lu_field_price', 'In-Commerce', 'la_Text_Products', 23, DEFAULT, 2, 'range', 'CALC:MIN( IF({PREFIX}ProductsDiscounts.Type = 1, {PREFIX}ProductsPricing.Price - {PREFIX}ProductsDiscounts.Amount, IF({PREFIX}ProductsDiscounts.Type = 2, ({PREFIX}ProductsPricing.Price * (1-{PREFIX}ProductsDiscounts.Amount/100)), {PREFIX}ProductsPricing.Price ) ) )', '{PREFIX}ProductsPricing ON {PREFIX}ProductsPricing.ProductId = {PREFIX}Products.ProductId AND {PREFIX}ProductsPricing.IsPrimary = 1 LEFT JOIN {PREFIX}ProductsDiscountItems ON {PREFIX}ProductsDiscountItems.ItemResourceId = {PREFIX}Products.ResourceId LEFT JOIN {PREFIX}ProductsDiscounts ON {PREFIX}ProductsDiscounts.DiscountId = {PREFIX}ProductsDiscountItems.DiscountId AND {PREFIX}ProductsDiscounts.Status = 1 AND {PREFIX}ProductsDiscountItems.ItemType = 1 AND ( {PREFIX}ProductsDiscounts.GroupId IN ({USER_GROUPS},NULL) AND ( ({PREFIX}ProductsDiscounts.Start IS NULL OR {PREFIX}ProductsDiscounts.Start < UNIX_TIMESTAMP()) AND ({PREFIX}ProductsDiscounts.Start IS NULL OR {PREFIX}ProductsDiscounts.End > UNIX_TIMESTAMP()) ) )', NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('CustomField', 'Availability', 0, 0, 'la_Availability', 'la_Availability', 'In-Commerce', 'la_Text_CustomFields', 0, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+
+INSERT INTO ShippingQuoteEngines VALUES (1, 'Intershipper.com', 0, 0, 0, 'a:21:{s:12:"AccountLogin";N;s:15:"AccountPassword";s:0:"";s:10:"UPSEnabled";i:1;s:10:"UPSAccount";N;s:11:"UPSInvoiced";N;s:10:"FDXEnabled";i:1;s:10:"FDXAccount";N;s:10:"DHLEnabled";i:1;s:10:"DHLAccount";N;s:11:"DHLInvoiced";i:0;s:10:"USPEnabled";i:1;s:10:"USPAccount";N;s:11:"USPInvoiced";i:0;s:10:"ARBEnabled";i:1;s:10:"ARBAccount";N;s:11:"ARBInvoiced";N;s:10:"1DYEnabled";i:1;s:10:"2DYEnabled";i:1;s:10:"3DYEnabled";i:1;s:10:"GNDEnabled";i:1;s:10:"ShipMethod";s:3:"DRP";}', 'Intershipper');
+INSERT INTO ShippingQuoteEngines VALUES ( DEFAULT, 'USPS.com', 0, 0, 0, 'a:21:{s:12:"AccountLogin";s:0:"";s:15:"AccountPassword";N;s:10:"UPSEnabled";N;s:10:"UPSAccount";s:0:"";s:11:"UPSInvoiced";N;s:10:"FDXEnabled";N;s:10:"FDXAccount";s:0:"";s:10:"DHLEnabled";N;s:10:"DHLAccount";s:0:"";s:11:"DHLInvoiced";N;s:10:"USPEnabled";N;s:10:"USPAccount";s:0:"";s:11:"USPInvoiced";N;s:10:"ARBEnabled";N;s:10:"ARBAccount";s:0:"";s:11:"ARBInvoiced";N;s:10:"1DYEnabled";N;s:10:"2DYEnabled";N;s:10:"3DYEnabled";N;s:10:"GNDEnabled";N;s:10:"ShipMethod";N;}', 'USPS' ) ;
+
+INSERT INTO StylesheetSelectors VALUES (27, 1, 'Block Header', 'td.block-header', 'a:6:{s:5:"color";s:7:"#FFFFFF";s:9:"font-size";s:4:"14px";s:11:"font-weight";s:4:"bold";s:16:"background-color";s:7:"#80B0C7";s:6:"border";s:4:"none";s:7:"padding";s:3:"5px";}', 'Block Header', 1, '', 0);
+INSERT INTO StylesheetSelectors VALUES (167, 1, 'Calendar''s selected days', '.calendar tbody .selected', 'a:0:{}', '', 1, 'font-weight: bold;\r\nbackground-color: #9ED7ED;\r\nborder: 1px solid #83B2C5;', 0);
+INSERT INTO StylesheetSelectors VALUES (39, 1, 'Main Left Column', '.main-column-left', 'a:1:{s:11:"padding-top";s:4:"10px";}', 'Main Left Column', 1, 'width:200px;', 0);
+INSERT INTO StylesheetSelectors VALUES (90, 1, 'Toolbar Bottom', 'td.toolbar-bottom', 'a:0:{}', 'Bottom toolbar ', 1, '', 0);
+INSERT INTO StylesheetSelectors VALUES (166, 1, 'Calendar''s weekends', '.calendar .weekend', 'a:0:{}', '', 1, 'color: #990000;', 0);
+INSERT INTO StylesheetSelectors VALUES (29, 1, 'Featured Item Block Header', '.featured-block-header', 'a:0:{}', 'Featured Item Block Header', 2, '', 27);
+INSERT INTO StylesheetSelectors VALUES (36, 1, 'Actions Block header', '.actions-block-header', 'a:2:{s:5:"color";s:7:"#0200AF";s:16:"background-color";s:7:"#89E867";}', 'Actions block appears on the inner pages like product details', 2, '', 27);
+INSERT INTO StylesheetSelectors VALUES (28, 1, 'Categories Block Header', '.categories-block-header', 'a:0:{}', 'Categories Block Header', 2, '', 27);
+INSERT INTO StylesheetSelectors VALUES (150, 1, 'Editors Pick Block', '.pick-products-block', 'a:0:{}', 'Editor Picks Block', 2, '', 30);
+INSERT INTO StylesheetSelectors VALUES (149, 1, 'New Products Block Header', '.new-products-block-header', 'a:2:{s:16:"background-color";s:7:"#23BC06";s:6:"border";s:14:"1px solid #aaa";}', 'New Products Block Header', 2, '', 27);
+INSERT INTO StylesheetSelectors VALUES (152, 1, 'Toolbar Link', 'a.toolbar', 'a:2:{s:5:"color";s:7:"#003399";s:15:"text-decoration";s:9:"underline";}', 'Toolbar Link', 1, '', 0);
+INSERT INTO StylesheetSelectors VALUES (168, 1, 'Calendar''s highlighted day', '.calendar tbody .hilite', 'a:0:{}', '', 1, 'background-color: #f6f6f6;\r\nborder: 1px solid #83B2C5 !important;', 0);
+INSERT INTO StylesheetSelectors VALUES (162, 1, 'Calendar''s top and bottom titles', '.calendar .title', 'a:0:{}', '', 1, 'color: #00309C;\r\nbackground-color: #98CEE4;\r\nborder: 1px solid #83B2C5;\r\nborder-top: 0px;\r\npadding: 1px;', 0);
+INSERT INTO StylesheetSelectors VALUES (163, 1, 'Calendar''s control buttons', '.calendar .calendar_button', 'a:0:{}', '', 1, 'color: black;\r\nfont-size: 12px;\r\nbackground-color: #eeeeee;', 0);
+INSERT INTO StylesheetSelectors VALUES (30, 1, 'Block without a border', '.block-no-border', 'a:2:{s:6:"border";s:4:"none";s:13:"margin-bottom";s:4:"10px";}', 'Block without a border', 1, '', 0);
+INSERT INTO StylesheetSelectors VALUES (164, 1, 'Calendar''s day names', '.calendar thead .name', 'a:0:{}', '', 1, 'background-color: #DEEEF6;\r\nborder-bottom: 1px solid #000000;', 0);
+INSERT INTO StylesheetSelectors VALUES (165, 1, 'Calendar''s days', '.calendar tbody .day', 'a:0:{}', '', 1, 'text-align: right;\r\npadding: 2px 4px 2px 2px;\r\nwidth: 2em;\r\nborder: 1px solid #fefefe;', 0);
+INSERT INTO StylesheetSelectors VALUES (154, 1, 'Category Link', 'a.subcat', 'a:3:{s:5:"color";s:7:"#003399";s:11:"font-weight";s:4:"bold";s:15:"text-decoration";s:9:"underline";}', 'Category Link', 1, '', 0);
+INSERT INTO StylesheetSelectors VALUES (40, 1, 'Main Center Column', '.main-column-center', 'a:1:{s:11:"padding-top";s:4:"10px";}', 'Main Center Column', 1, '', 0);
+INSERT INTO StylesheetSelectors VALUES (37, 1, 'Actions Block', '.actions-block', 'a:0:{}', '', 2, '', 34);
+INSERT INTO StylesheetSelectors VALUES (151, 1, 'Editor Picks Block Header', '.pick-products-block-header', 'a:3:{s:5:"color";s:7:"#34871F";s:16:"background-color";s:7:"#89E867";s:6:"border";s:14:"1px solid #aaa";}', 'Editor Picks Block Header', 2, '', 27);
+INSERT INTO StylesheetSelectors VALUES (38, 1, 'Categories Block', '.categories-block', 'a:0:{}', '', 2, '', 34);
+INSERT INTO StylesheetSelectors VALUES (32, 1, 'Button', '.button', 'a:7:{s:4:"font";s:37:"Verdana, Arial, Helvetica, sans-serif";s:5:"color";s:7:"#003399";s:11:"font-weight";s:4:"bold";s:16:"background-color";s:7:"#99CCFF";s:6:"border";s:17:"1px solid #FFFFFF";s:7:"padding";s:15:"1px 4px 1px 4px";s:5:"width";s:4:"auto";}', 'Button class used in all templates', 1, 'border-bottom-color: #003399;\r\nborder-right-color: #003399;\r\noverflow: visible;', 0);
+INSERT INTO StylesheetSelectors VALUES (34, 1, 'Block with border (side block)', '.block', 'a:3:{s:16:"background-color";s:7:"#FFFFFF";s:6:"border";s:17:"1px solid #999999";s:13:"margin-bottom";s:4:"10px";}', 'Block with border (side block)', 1, '', 0);
+INSERT INTO StylesheetSelectors VALUES (153, 1, 'Toolbar Link Mouseover (hover)', 'a.toolbar:hover', 'a:1:{s:5:"color";s:7:"#FFFFFF";}', 'Toolbar Link Mouseover (hover)', 1, '', 0);
+INSERT INTO StylesheetSelectors VALUES (41, 1, 'Main Right Column', '.main-column-right', 'a:1:{s:11:"padding-top";s:4:"10px";}', 'Main Right Column', 1, 'width:210px;', 0);
+INSERT INTO StylesheetSelectors VALUES (156, 1, 'Category Link Mouseover (hover)', 'a.subcat:hover', 'a:1:{s:5:"color";s:7:"#2FEF0E";}', 'Category Link Mouseover (hover)', 1, '', 0);
+INSERT INTO StylesheetSelectors VALUES (148, 1, 'New Products Block', '.new-products-block', 'a:0:{}', 'New Products Block', 2, '', 30);
+INSERT INTO StylesheetSelectors VALUES (157, 1, 'Link', 'a', 'a:2:{s:5:"color";s:7:"#003399";s:15:"text-decoration";s:9:"underline";}', 'Link', 1, '', 0);
+INSERT INTO StylesheetSelectors VALUES (33, 1, 'Page Body', 'body', 'a:3:{s:9:"font-size";s:5:"small";s:16:"background-color";s:7:"#FFFFFF";s:6:"margin";s:4:"15px";}', 'Page Body', 1, 'width: auto;', 0);
+INSERT INTO StylesheetSelectors VALUES (158, 1, 'Link Mouseover (hover)', 'a:hover', 'a:1:{s:5:"color";s:7:"#2FEF0E";}', 'Link Mouseover (hover)', 1, '', 0);
+INSERT INTO StylesheetSelectors VALUES (35, 1, 'Toolbar Top', 'td.toolbar', 'a:8:{s:5:"color";s:7:"#3C7D9B";s:9:"font-size";s:5:"small";s:10:"background";s:41:"url(incommerce/bg1.gif) repeat-x left top";s:16:"background-color";s:7:"#99CCFF";s:10:"margin-top";s:3:"7px";s:12:"margin-right";s:4:"20px";s:13:"margin-bottom";s:3:"7px";s:11:"margin-left";s:4:"20px";}', 'Top toolbar', 1, '', 0);
+INSERT INTO StylesheetSelectors VALUES (31, 1, 'Featured Item Block', '.featured-block', 'a:0:{}', 'Featured Item Block', 2, '', 30);
+
+INSERT INTO Stylesheets VALUES (1, 'OnlineStore', 'This is default stylesheet supplied with OnlineStore theme', '.my_selector {\r\n    background-color: #000000;\r\n}', 1124387197, 1);
+
+DELETE FROM Cache WHERE VarName = 'config_files';
+
+INSERT INTO ImportScripts VALUES (DEFAULT, 'Products from CSV file [In-Commerce]', '', 'p', 'In-Commerce', '', 'CSV', '1');
+
+INSERT INTO Modules VALUES ('In-Commerce', 'in-commerce/', 'p', '0.0.0', 1, 4, 'in-commerce/', 2, 1054738405);

Property changes on: branches/5.1.x/in-commerce/install/install_data.sql
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.9
\ No newline at end of property
Index: branches/5.1.x/in-commerce/install/upgrades.php
===================================================================
--- branches/5.1.x/in-commerce/install/upgrades.php	(nonexistent)
+++ branches/5.1.x/in-commerce/install/upgrades.php	(revision 12131)
@@ -0,0 +1,90 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+	$upgrade_class = 'InCommerceUpgrades';
+
+	/**
+	 * Class, that holds all upgrade scripts for "Core" module
+	 *
+	 */
+	class InCommerceUpgrades extends kHelper {
+
+		/**
+		 * Install toolkit instance
+		 *
+		 * @var kInstallToolkit
+		 */
+		var $_toolkit = null;
+
+		/**
+		 * Sets common instance of installator toolkit
+		 *
+		 * @param kInstallToolkit $instance
+		 */
+		function setToolkit(&$instance)
+		{
+			$this->_toolkit =& $instance;
+		}
+
+		/**
+		 * Changes table structure, where multilingual fields of TEXT type are present
+		 *
+		 * @param string $mode when called mode {before, after)
+		 */
+		function Upgrade_5_0_0($mode)
+		{
+			if ($mode == 'after') {
+				// update icon
+				$root_category = $this->Application->findModule('Name', 'In-Commerce', 'RootCat');
+
+				$sql = 'UPDATE ' . $this->Application->getUnitOption('c', 'TableName') . '
+						SET UseMenuIconUrl = 1, MenuIconUrl = "in-commerce/img/menu_products.gif"
+						WHERE ' . $this->Application->getUnitOption('c', 'IDField') . ' = ' . $root_category;
+				$this->Conn->Query($sql);
+
+				$this->_updateDetailTemplate('p', 'in-commerce/product/details', 'in-commerce/designs/detail');
+
+				// copy store name to company name				
+				$store_name = $this->Application->ConfigValue('Comm_StoreName');
+				
+				$sql = 'UPDATE ' . TABLE_PREFIX . 'ConfigurationValues
+						SET VariableValue = ' . $this->Conn->qstr($store_name) . '
+						WHERE VariableName = "Comm_CompanyName"';
+				$this->Conn->Query($sql);
+			}
+		}
+
+		/**
+		 * Replaces deprecated detail template design with new one
+		 *
+		 * @param string $prefix
+		 * @param string $from_template
+		 * @param string $to_template
+		 */
+		function _updateDetailTemplate($prefix, $from_template, $to_template)
+		{
+			$sql = 'SELECT CustomFieldId
+					FROM ' . TABLE_PREFIX . 'CustomField
+					WHERE FieldName = "' . $prefix . '_ItemTemplate"';
+			$custom_field_id = $this->Conn->GetOne($sql);
+
+			$ml_formatter =& $this->Application->recallObject('kMultiLanguage');
+			/* @var $ml_formatter kMultiLanguage */
+
+			$field = $ml_formatter->LangFieldName('cust_' . $custom_field_id, true);
+
+			$sql = 'UPDATE ' . TABLE_PREFIX . 'CategoryCustomData
+					SET ' . $field . ' = "' . $to_template . '"
+					WHERE ' . $field . ' = "' . $from_template . '"';
+			$this->Conn->Query($sql);
+		}
+	}
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/install/upgrades.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.5
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/install/prerequisites.php
===================================================================
--- branches/5.1.x/in-commerce/install/prerequisites.php	(nonexistent)
+++ branches/5.1.x/in-commerce/install/prerequisites.php	(revision 12131)
@@ -0,0 +1,77 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+	$prerequisite_class = 'InCommercePrerequisites';
+
+	/**
+	 * Class, that holds all prerequisite scripts for "In-Commerce" module
+	 *
+	 */
+	class InCommercePrerequisites extends kHelper {
+
+		/**
+		 * Install toolkit instance
+		 *
+		 * @var kInstallToolkit
+		 */
+		var $_toolkit = null;
+
+		/**
+		 * Sets common instance of installator toolkit
+		 *
+		 * @param kInstallToolkit $instance
+		 */
+		function setToolkit(&$instance)
+		{
+			$this->_toolkit =& $instance;
+		}
+
+		/**
+		 * Checks minimal version, that could be upgradeable
+		 *
+		 * @param string $mode when called mode {install, standalone, upgrade)
+		 */
+		function CheckPrerequisites($versions, $mode)
+		{
+			$errors = Array ();
+
+			if ($mode == 'standalone') {
+				if (!$this->Application->isModuleEnabled('In-Portal')) {
+					$errors[] = 'Please install or enable "In-Portal" module first';
+				}
+			}
+
+			if ($mode == 'upgrade') {
+				$sql = 'SELECT Version
+						FROM ' . TABLE_PREFIX . 'Modules
+						WHERE Name = "In-Portal"';
+				$inportal_version = $this->Conn->GetOne($sql);
+
+				if ($inportal_version === false) {
+					// only, when In-Portal was installed
+					return $errors;
+				}
+
+				$min_version = '4.3.1';
+
+				$current_version = $this->_toolkit->ConvertModuleVersion($inportal_version);
+				$needed_version = $this->_toolkit->ConvertModuleVersion($min_version);
+				if ($current_version < $needed_version) {
+					$errors[] = 'Please upgrade "In-Portal" to version ' . $min_version;
+				}
+			}
+
+			return $errors;
+		}
+	}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/install/prerequisites.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.3
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/install/install_schema.sql
===================================================================
--- branches/5.1.x/in-commerce/install/install_schema.sql	(nonexistent)
+++ branches/5.1.x/in-commerce/install/install_schema.sql	(revision 12131)
@@ -0,0 +1,714 @@
+CREATE TABLE Addresses (
+  AddressId int(11) NOT NULL auto_increment,
+  PortalUserId int(11) NOT NULL default '0',
+  `To` varchar(255) NOT NULL default '',
+  Company varchar(255) NOT NULL default '',
+  Phone varchar(255) NOT NULL default '',
+  Fax varchar(255) NOT NULL default '',
+  Email varchar(255) NOT NULL default '',
+  Address1 varchar(255) NOT NULL default '',
+  Address2 varchar(255) NOT NULL default '',
+  City varchar(255) NOT NULL default '',
+  State char(2) NOT NULL default '',
+  Zip varchar(20) NOT NULL default '',
+  Country char(3) NOT NULL default '',
+  LastUsedAsBilling tinyint(4) unsigned NOT NULL default '0',
+  LastUsedAsShipping tinyint(4) unsigned NOT NULL default '0',
+  IsProfileAddress tinyint(4) NOT NULL default '0',
+  PRIMARY KEY  (AddressId),
+  KEY PortalUserId (PortalUserId),
+  KEY LastUsedAsBilling (LastUsedAsBilling),
+  KEY LastUsedAsShipping (LastUsedAsShipping),
+  KEY IsProfileAddress (IsProfileAddress)
+);
+
+CREATE TABLE Currencies (
+  CurrencyId int(11) NOT NULL auto_increment,
+  ISO char(3) NOT NULL default '',
+  Symbol varchar(255) default NULL,
+  SymbolPosition tinyint(4) default NULL,
+  Name varchar(255) NOT NULL default '',
+  RateToPrimary double NOT NULL default '1',
+  Modified int(11) NOT NULL default '0',
+  Status smallint(6) NOT NULL default '0',
+  IsPrimary smallint(6) NOT NULL default '0',
+  Priority int(11) NOT NULL default '0',
+  PRIMARY KEY  (CurrencyId),
+  KEY Priority (Priority),
+  KEY IsPrimary (IsPrimary),
+  KEY Modified (Modified)
+);
+
+CREATE TABLE GatewayConfigFields (
+  GWConfigFieldId int(11) NOT NULL auto_increment,
+  SystemFieldName varchar(50) NOT NULL default '',
+  FieldName varchar(100) NOT NULL default '',
+  ElementType varchar(30) NOT NULL default 'text',
+  ValueList mediumtext NOT NULL,
+  GatewayId int(11) NOT NULL default '0',
+  PRIMARY KEY  (GWConfigFieldId),
+  KEY GatewayId (GatewayId)
+);
+
+CREATE TABLE GatewayConfigValues (
+  GWConfigValueId int(11) NOT NULL auto_increment,
+  GWConfigFieldId int(11) NOT NULL default '0',
+  PaymentTypeId int(11) NOT NULL default '0',
+  Value varchar(255) default NULL,
+  PRIMARY KEY  (GWConfigValueId),
+  KEY GWConfigFieldId (GWConfigFieldId),
+  KEY PaymentTypeId (PaymentTypeId)
+);
+
+CREATE TABLE Gateways (
+  GatewayId int(11) NOT NULL auto_increment,
+  Name varchar(100) NOT NULL default '',
+  ClassName varchar(150) NOT NULL default '',
+  ClassFile varchar(255) NOT NULL default '',
+  RequireCCFields tinyint(4) NOT NULL default '0',
+  PRIMARY KEY  (GatewayId)
+);
+
+CREATE TABLE Manufacturers (
+  ManufacturerId int(11) NOT NULL auto_increment,
+  Name varchar(255) NOT NULL default '',
+  Description text NOT NULL,
+  URL varchar(255) NOT NULL default '',
+  Logo varchar(255) NOT NULL default '',
+  IsPopular int(10) unsigned NOT NULL default '0',
+  Address1 varchar(255) default NULL,
+  Address2 varchar(255) default NULL,
+  City varchar(255) default NULL,
+  State varchar(50) default NULL,
+  Zip varchar(50) default NULL,
+  Country varchar(255) default NULL,
+  Phone varchar(50) default NULL,
+  Fax varchar(50) default NULL,
+  Email varchar(255) default NULL,
+  PRIMARY KEY  (ManufacturerId)
+);
+
+CREATE TABLE OrderItems (
+  OrderItemId int(11) NOT NULL auto_increment,
+  OrderId int(11) NOT NULL default '0',
+  ProductId int(11) NOT NULL default '0',
+  ProductName varchar(255) NOT NULL default '',
+  Quantity int(11) NOT NULL default '0',
+  QuantityReserved int(11) default NULL,
+  FlatPrice decimal(10,4) NOT NULL default '0.0000',
+  Price decimal(10,4) NOT NULL default '0.0000',
+  Cost double(10,4) NOT NULL default '0.0000',
+  BackOrderFlag tinyint(4) default '0',
+  Weight double default NULL,
+  ShippingTypeId varchar(255) default NULL,
+  ItemData text,
+  OptionsSalt int(11) default '0',
+  SplitShippingGroup int(11) NOT NULL default '0',
+  PackageNum int(11) NOT NULL default '0',
+  ReturnType tinyint(3) unsigned NOT NULL default '0',
+  ReturnAmount decimal(10,2) NOT NULL default '0.00',
+  ReturnedOn int(10) unsigned default NULL,
+  PRIMARY KEY  (OrderItemId),
+  KEY OrderId (OrderId),
+  KEY ProductId (ProductId),
+  KEY BackOrderFlag (BackOrderFlag),
+  KEY PackageNum (PackageNum),
+  KEY ReturnType (ReturnType),
+  KEY ReturnedOn (ReturnedOn),
+  KEY Quantity (Quantity),
+  KEY QuantityReserved (QuantityReserved),
+  KEY OptionsSalt (OptionsSalt),
+  KEY SplitShippingGroup (SplitShippingGroup)
+);
+
+CREATE TABLE Orders (
+  OrderId int(11) NOT NULL auto_increment,
+  Number mediumint(9) NOT NULL default '0',
+  SubNumber smallint(6) NOT NULL default '0',
+  `Status` tinyint(3) unsigned NOT NULL default '0',
+  OnHold tinyint(3) unsigned NOT NULL default '0',
+  OrderDate int(10) unsigned NOT NULL default '0',
+  PortalUserId int(11) NOT NULL default '-1',
+  OrderIP varchar(30) NOT NULL default '',
+  UserComment text NOT NULL,
+  AdminComment text NOT NULL,
+  BillingTo varchar(255) NOT NULL default '',
+  BillingCompany varchar(255) NOT NULL default '',
+  BillingPhone varchar(255) NOT NULL default '',
+  BillingFax varchar(255) NOT NULL default '',
+  BillingEmail varchar(255) NOT NULL default '',
+  BillingAddress1 varchar(255) NOT NULL default '',
+  BillingAddress2 varchar(255) NOT NULL default '',
+  BillingCity varchar(255) NOT NULL default '',
+  BillingState varchar(255) NOT NULL default '',
+  BillingZip varchar(255) NOT NULL default '',
+  BillingCountry varchar(255) NOT NULL default 'USA',
+  VAT decimal(20,4) NOT NULL default '0.0000',
+  VATPercent decimal(20,4) NOT NULL default '0.0000',
+  PaymentType tinyint(3) unsigned NOT NULL default '0',
+  PaymentAccount varchar(255) NOT NULL default '',
+  PaymentExpires int(10) unsigned NOT NULL default '0',
+  PaymentNameOnCard varchar(255) NOT NULL default '',
+  PaymentCCExpDate varchar(5) NOT NULL default '',
+  PaymentCardType varchar(255) NOT NULL default '',
+  ShippingTo varchar(255) NOT NULL default '',
+  ShippingCompany varchar(255) NOT NULL default '',
+  ShippingPhone varchar(255) NOT NULL default '',
+  ShippingFax varchar(255) NOT NULL default '',
+  ShippingEmail varchar(255) NOT NULL default '',
+  ShippingAddress1 varchar(255) NOT NULL default '',
+  ShippingAddress2 varchar(255) NOT NULL default '',
+  ShippingCity varchar(255) NOT NULL default '',
+  ShippingState varchar(255) NOT NULL default '',
+  ShippingZip varchar(255) NOT NULL default '',
+  ShippingCountry varchar(255) NOT NULL default 'USA',
+  ShippingType int(11) NOT NULL default '0',
+  ShippingCost decimal(20,4) NOT NULL default '0.0000',
+  ShippingCustomerAccount varchar(255) NOT NULL default '',
+  ShippingTracking varchar(255) NOT NULL default '',
+  ShippingDate int(11) default NULL,
+  SubTotal decimal(20,4) unsigned NOT NULL default '0.0000',
+  ReturnTotal decimal(20,4) NOT NULL default '0.0000',
+  CostTotal decimal(20,4) NOT NULL default '0.0000',
+  OriginalAmount decimal(20,4) NOT NULL default '0.0000',
+  ShippingOption tinyint(4) default NULL,
+  ShippingInfo text,
+  CouponId int(11) default NULL,
+  CouponDiscount decimal(20,4) NOT NULL default '0.0000',
+  DiscountTotal decimal(10,4) NOT NULL default '0.0000',
+  TransactionStatus tinyint(3) unsigned NOT NULL default '2',
+  GWResult1 mediumtext NOT NULL,
+  GWResult2 mediumtext NOT NULL,
+  AffiliateId int(10) unsigned NOT NULL default '0',
+  VisitId int(10) unsigned NOT NULL default '0',
+  AffiliateCommission decimal(10,4) NOT NULL default '0.0000',
+  ProcessingFee decimal(20,4) default '0.0000',
+  InsuranceFee decimal(20,4) NOT NULL default '0.0000',
+  ShippingTaxable tinyint(1) NOT NULL default '0',
+  ProcessingTaxable tinyint(1) NOT NULL default '0',
+  IsRecurringBilling tinyint(4) NOT NULL default '0',
+  NextCharge int(10) unsigned default NULL,
+  GroupId int(10) unsigned NOT NULL default '0',
+  ChargeOnNextApprove tinyint(4) NOT NULL default '0',
+  ShippingGroupOption tinyint(4) NOT NULL default '0',
+  GiftCertificateId int(11) default NULL,
+  GiftCertificateDiscount decimal(20,4) NOT NULL default '0.0000',
+  GoogleOrderNumber bigint(20) unsigned default NULL,
+  PRIMARY KEY  (OrderId),
+  KEY AffiliateId (AffiliateId),
+  KEY VisitId (VisitId),
+  KEY GoogleOrderNumber (GoogleOrderNumber),
+  KEY Number (Number),
+  KEY SubNumber (SubNumber),
+  KEY `Status` (`Status`),
+  KEY OrderDate (OrderDate),
+  KEY PaymentType (PaymentType),
+  KEY CouponId (CouponId),
+  KEY GroupId (GroupId),
+  KEY GiftCertificateId (GiftCertificateId)
+);
+
+CREATE TABLE GiftCertificates (
+  GiftCertificateId int(11) NOT NULL auto_increment,
+  OrderId int(11) default '0',
+  Purchaser varchar(64) default NULL,
+  Recipient varchar(64) default NULL,
+  SendVia tinyint(1) NOT NULL default '0',
+  RecipientEmail varchar(64) NOT NULL default '',
+  RecipientFirstname varchar(128) default NULL,
+  RecipientLastname varchar(128) default NULL,
+  RecipientAddress1 varchar(255) default NULL,
+  RecipientAddress2 varchar(255) default NULL,
+  RecipientCity varchar(64) default NULL,
+  RecipientState varchar(32) default NULL,
+  RecipientZipcode varchar(32) default NULL,
+  RecipientCountry char(3) NOT NULL default 'USA',
+  RecipientPhone varchar(32) default NULL,
+  Message text,
+  Amount decimal(12,2) default '0.00',
+  Debit decimal(12,2) default '0.00',
+  `Status` tinyint(1) NOT NULL default '1',
+  AddDate int(11) default '0',
+  Expiration int(11) default NULL,
+  Code varchar(255) default NULL,
+  PRIMARY KEY  (GiftCertificateId),
+  UNIQUE KEY Code (Code),
+  KEY OrderId (OrderId),
+  KEY `Status` (`Status`),
+  KEY AddDate (AddDate)
+);
+
+CREATE TABLE PaymentTypeCurrencies (
+  PaymentTypeCurrencyId int(11) NOT NULL auto_increment,
+  PaymentTypeId int(11) NOT NULL default '0',
+  CurrencyId int(11) NOT NULL default '0',
+  PRIMARY KEY  (PaymentTypeCurrencyId),
+  KEY PaymentTypeId (PaymentTypeId),
+  KEY CurrencyId (CurrencyId)
+);
+
+CREATE TABLE PaymentTypes (
+  PaymentTypeId int(11) NOT NULL auto_increment,
+  Name varchar(100) NOT NULL default '',
+  Description varchar(255) default NULL,
+  Instructions text,
+  AdminComments text,
+  Status int(11) NOT NULL default '0',
+  Priority int(11) NOT NULL default '0',
+  IsPrimary tinyint(4) NOT NULL default '0',
+  BuiltIn smallint(6) NOT NULL default '0',
+  GatewayId int(11) NOT NULL default '1',
+  PlacedOrdersEdit tinyint(4) NOT NULL default '0',
+  ProcessingFee DOUBLE NOT NULL DEFAULT '0',
+  PortalGroups TEXT NOT NULL,
+  PRIMARY KEY  (PaymentTypeId),
+  KEY Status (Status),
+  KEY Priority (Priority),
+  KEY GatewayId (GatewayId),
+  KEY BuiltIn (BuiltIn),
+  KEY IsPrimary (IsPrimary)
+);
+
+CREATE TABLE Products (
+  ProductId int(11) NOT NULL auto_increment,
+  Name varchar(255) default '',
+  l1_Name varchar(255) default NULL,
+  l2_Name varchar(255) default NULL,
+  l3_Name varchar(255) default NULL,
+  l4_Name varchar(255) default NULL,
+  l5_Name varchar(255) default NULL,
+  AutomaticFilename tinyint(3) unsigned NOT NULL default '1',
+  SKU varchar(255) default NULL,
+  `Type` tinyint(2) unsigned NOT NULL default '1',
+  Description text,
+  l1_Description text,
+  l2_Description text,
+  l3_Description text,
+  l4_Description text,
+  l5_Description text,
+  DescriptionExcerpt text,
+  l1_DescriptionExcerpt text,
+  l2_DescriptionExcerpt text,
+  l3_DescriptionExcerpt text,
+  l4_DescriptionExcerpt text,
+  l5_DescriptionExcerpt text,
+  Weight double(10,4) default NULL,
+  ManufacturerId int(11) NOT NULL default '0',
+  MSRP double default NULL,
+  BackOrder tinyint(3) unsigned NOT NULL default '2',
+  BackOrderDate int(11) default NULL,
+  CreatedOn int(10) unsigned default NULL,
+  Modified int(10) unsigned default NULL,
+  Expire int(10) unsigned default NULL,
+  Hits double NOT NULL default '0',
+  CachedRating decimal(11,10) NOT NULL default '0.0000000000',
+  CachedVotesQty int(11) NOT NULL default '0',
+  CachedReviewsQty int(11) NOT NULL default '0',
+  CreatedById int(11) NOT NULL default '0',
+  ModifiedById int(11) NOT NULL default '0',
+  Priority int(11) NOT NULL default '0',
+  `Status` tinyint(4) NOT NULL default '2',
+  EditorsPick tinyint(4) NOT NULL default '0',
+  Featured tinyint(4) NOT NULL default '0',
+  OnSale tinyint(1) NOT NULL default '0',
+  ResourceId int(11) default NULL,
+  HotItem tinyint(4) NOT NULL default '2',
+  PopItem tinyint(4) NOT NULL default '2',
+  NewItem tinyint(4) NOT NULL default '2',
+  InventoryStatus tinyint(4) NOT NULL default '0',
+  QtyInStock int(11) NOT NULL default '0',
+  QtyInStockMin int(11) NOT NULL default '0',
+  QtyReserved int(11) NOT NULL default '0',
+  QtyBackOrdered int(11) NOT NULL default '0',
+  QtyOnOrder int(11) NOT NULL default '0',
+  InventoryComment text,
+  AccessGroupId int(11) default NULL,
+  AccessDuration int(11) default NULL,
+  AccessDurationType tinyint(4) default NULL,
+  AccessStart int(11) default NULL,
+  AccessEnd int(11) default NULL,
+  Virtual tinyint(4) NOT NULL default '0',
+  ProcessingData text,
+  PackageContent mediumtext NOT NULL,
+  OptionsSelectionMode tinyint(4) default '0',
+  HasRequiredOptions tinyint(1) NOT NULL default '0',
+  IsRecurringBilling tinyint(3) unsigned NOT NULL default '0',
+  ShippingMode tinyint(1) NOT NULL default '0',
+  ShippingLimitation text NOT NULL,
+  AssignedCoupon int(11) NOT NULL default '0',
+  MinQtyFreePromoShipping int(11) NOT NULL default '0',
+  MetaKeywords varchar(255) default NULL,
+  MetaDescription text,
+  PRIMARY KEY  (ProductId),
+  KEY ResourceId (ResourceId),
+  KEY Hits (Hits),
+  KEY Name (Name),
+  KEY EditorsPick (EditorsPick),
+  KEY CreatedOn (CreatedOn),
+  KEY Modified (Modified,CreatedOn),
+  KEY `Status` (`Status`),
+  KEY l1_Name (l1_Name),
+  KEY Priority (Priority),
+  KEY ManufacturerId (ManufacturerId),
+  KEY NewItem (NewItem),
+  KEY PopItem (PopItem),
+  KEY HotItem (HotItem),
+  KEY Featured (Featured),
+  KEY OnSale (OnSale),
+  KEY Expire (Expire),
+  KEY Virtual (Virtual),
+  KEY AccessGroupId (AccessGroupId)
+);
+
+CREATE TABLE ProductsCouponItems (
+  CouponItemId int(11) NOT NULL auto_increment,
+  CouponId int(11) default NULL,
+  ItemResourceId int(11) default NULL,
+  ItemType TINYINT(4) NOT NULL DEFAULT '1',
+  PRIMARY KEY  (CouponItemId),
+  KEY DiscountId (CouponId),
+  KEY ItemResourceId (ItemResourceId),
+  KEY ItemType (ItemType)
+);
+
+CREATE TABLE ProductsCoupons (
+  CouponId int(11) NOT NULL auto_increment,
+  `Status` tinyint(4) NOT NULL default '1',
+  Name varchar(255) default NULL,
+  Code varchar(255) default NULL,
+  Expiration int(11) default NULL,
+  GroupId int(11) default NULL,
+  `Type` tinyint(1) NOT NULL default '1',
+  Amount double default NULL,
+  LastUsedBy int(11) default NULL,
+  LastUsedOn int(11) default NULL,
+  NumberOfUses int(11) default '1',
+  PRIMARY KEY  (CouponId),
+  KEY `Status` (`Status`),
+  KEY Code (Code)
+);
+
+CREATE TABLE ProductsDiscountItems (
+  DiscountItemId int(11) NOT NULL auto_increment,
+  DiscountId int(11) default NULL,
+  ItemResourceId int(11) default NULL,
+  ItemType TINYINT(4) NOT NULL DEFAULT '1',
+  PRIMARY KEY  (DiscountItemId),
+  KEY DiscountId (DiscountId),
+  KEY ItemResourceId (ItemResourceId),
+  KEY ItemType (ItemType)
+);
+
+CREATE TABLE ProductsDiscounts (
+  DiscountId int(11) NOT NULL auto_increment,
+  `Status` tinyint(4) default '2',
+  `Name` varchar(255) default NULL,
+  `Start` int(11) default NULL,
+  `End` int(11) default NULL,
+  GroupId int(11) default NULL,
+  `Type` tinyint(1) default '1',
+  Amount double default NULL,
+  PRIMARY KEY  (DiscountId),
+  KEY `Status` (`Status`)
+);
+
+CREATE TABLE ProductsPricing (
+  PriceId int(11) NOT NULL auto_increment,
+  ProductId int(11) NOT NULL default '0',
+  MinQty int(11) default NULL,
+  MaxQty int(11) default NULL,
+  Cost decimal(10,4) default NULL,
+  Price decimal(10,4) NOT NULL default '0.0000',
+  Negotiated tinyint(1) default NULL,
+  Points int(11) default NULL,
+  AccessDuration int(11) NOT NULL default '0',
+  AccessUnit int(11) NOT NULL default '0',
+  Description varchar(255) default NULL,
+  IsPrimary tinyint(4) NOT NULL default '0',
+  GroupId int(11) NOT NULL default '0',
+  PRIMARY KEY  (PriceId),
+  KEY ProductId (ProductId),
+  KEY GroupId (GroupId),
+  KEY IsPrimary (IsPrimary)
+);
+
+CREATE TABLE ProductFiles (
+  FileId INT NOT NULL AUTO_INCREMENT,
+  ProductId INT NOT NULL,
+  Name VARCHAR(255) NOT NULL,
+  Version VARCHAR(100) NOT NULL,
+  FilePath VARCHAR(255) NOT NULL,
+  RealPath VARCHAR(255) NOT NULL,
+  Size INT NOT NULL,
+  Status tinyint(4) NOT NULL default '0',
+  IsPrimary tinyint(4) NOT NULL default '0',
+  Priority smallint(6) NOT NULL default '0',
+  AddedOn int(11) NOT NULL default '0',
+  AddedById int(11) NOT NULL default '0',
+  MIMEType varchar(255) NOT NULL default '',
+  PRIMARY KEY (FileId),
+  KEY ProductId (ProductId),
+  KEY Status (Status),
+  KEY IsPrimary (IsPrimary),
+  KEY Priority (Priority),
+  KEY AddedOn (AddedOn)
+);
+
+CREATE TABLE UserFileAccess (
+  FileAccessId INT NOT NULL AUTO_INCREMENT,
+  ProductId INT NOT NULL,
+  PortalUserId INT NOT NULL,
+  PRIMARY KEY (FileAccessId),
+  KEY ProductId (ProductId),
+  KEY PortalUserId (PortalUserId)
+);
+
+CREATE TABLE UserDownloads (
+  DownloadId int(11) NOT NULL auto_increment,
+  PortalUserId int(11) NOT NULL default '0',
+  Username varchar(255) NOT NULL default '',
+  ProductId int(11) NOT NULL default '0',
+  ProductName varchar(255) NOT NULL default '',
+  FileId int(11) NOT NULL default '0',
+  Filename varchar(255) NOT NULL default '',
+  IPAddress varchar(100) NOT NULL default '',
+  StartedOn int(11) NOT NULL default '0',
+  EndedOn int(11) NOT NULL default '0',
+  PRIMARY KEY (DownloadId),
+  KEY PortalUserId (PortalUserId),
+  KEY ProductId (ProductId)
+);
+
+CREATE TABLE ShippingBrackets (
+  BracketId int(11) NOT NULL auto_increment,
+  ShippingTypeID int(11) NOT NULL default '0',
+  Start double NOT NULL default '0',
+  End double NOT NULL default '0',
+  PRIMARY KEY  (BracketId),
+  KEY ShippingTypeID (ShippingTypeID),
+  KEY Start (Start),
+  KEY End (End)
+);
+
+CREATE TABLE ShippingCosts (
+  ShippingCostId int(11) NOT NULL auto_increment,
+  ZoneID int(11) NOT NULL default '0',
+  BracketId int(11) NOT NULL default '0',
+  Flat decimal(10,4) default NULL,
+  PerUnit decimal(10,4) default NULL,
+  PRIMARY KEY  (ShippingCostId),
+  KEY ZoneID (ZoneID),
+  KEY BracketId (BracketId)
+);
+
+CREATE TABLE ShippingQuoteEngines (
+  EngineId int(11) NOT NULL auto_increment,
+  Name varchar(255) NOT NULL default '',
+  FlatSurcharge double NOT NULL default '0',
+  PercentSurcharge double NOT NULL default '0',
+  Status smallint(6) NOT NULL default '0',
+  Properties text NOT NULL,
+  ClassName varchar(255) NOT NULL default '',
+  PRIMARY KEY (EngineId),
+  KEY Status (Status)
+);
+
+CREATE TABLE ShippingType (
+  ShippingID int(11) NOT NULL auto_increment,
+  Code varchar(25) NOT NULL default '',
+  Name varchar(100) NOT NULL default '',
+  SpeedCode varchar(25) NOT NULL default '',
+  LocationFrom int(11) NOT NULL default '1',
+  `Type` int(11) NOT NULL default '1',
+  BaseFee double NOT NULL default '0',
+  CODFlatSurcharge double NOT NULL default '0',
+  CODPercentSurcharge double NOT NULL default '0',
+  `Status` tinyint(4) NOT NULL default '1',
+  CostType tinyint(4) NOT NULL default '1',
+  ZeroIfEmpty tinyint(4) NOT NULL default '1',
+  PrecisionBeforeSep tinyint(4) NOT NULL default '2',
+  PrecisionAfterSep tinyint(4) NOT NULL default '2',
+  PortalGroups text NOT NULL,
+  FreeShippingMinAmount double(10,4) NOT NULL default '0.0000',
+  IsFreePromoShipping tinyint(1) NOT NULL default '0',
+  InsuranceFee decimal(10,2) default NULL,
+  InsuranceType tinyint(1) NOT NULL default '2',
+  PRIMARY KEY  (ShippingID),
+  KEY `Type` (`Type`),
+  KEY Status (Status)
+);
+
+CREATE TABLE ShippingZones (
+  ZoneID int(11) NOT NULL auto_increment,
+  ShippingTypeID int(11) NOT NULL default '0',
+  Name varchar(100) NOT NULL default '',
+  Type int(11) NOT NULL default '1',
+  CODallowed smallint(6) NOT NULL default '1',
+  PRIMARY KEY  (ZoneID),
+  KEY ShippingTypeID (ShippingTypeID),
+  KEY `Type` (`Type`)
+);
+
+CREATE TABLE ShippingZonesDestinations (
+  ZoneDestId int(11) NOT NULL auto_increment,
+  ShippingZoneId int(11) NOT NULL default '0',
+  StdDestId int(11) default '0',
+  DestValue varchar(255) default NULL,
+  PRIMARY KEY  (ZoneDestId),
+  KEY ShippingZoneId (ShippingZoneId),
+  KEY StdDestId (StdDestId)
+);
+
+CREATE TABLE TaxZones (
+  TaxZoneId int(11) NOT NULL auto_increment,
+  Name varchar(100) NOT NULL default '',
+  Type int(11) NOT NULL default '1',
+  TaxValue double NOT NULL default '0',
+  ApplyToShipping TINYINT( 1 ) NOT NULL DEFAULT '0',
+  ApplyToProcessing TINYINT( 1 ) NOT NULL DEFAULT '0',
+  PRIMARY KEY  (TaxZoneId)
+);
+
+CREATE TABLE TaxZonesDestinations (
+  TaxZoneDestId int(11) NOT NULL auto_increment,
+  TaxZoneId int(11) NOT NULL default '0',
+  StdDestId int(11) default '0',
+  DestValue varchar(255) default NULL,
+  PRIMARY KEY  (TaxZoneDestId),
+  KEY TaxZoneId (TaxZoneId),
+  KEY StdDestId (StdDestId)
+);
+
+CREATE TABLE AffiliatePayments (
+  AffiliatePaymentId int(11) NOT NULL auto_increment,
+  AffiliateId int(10) unsigned NOT NULL default '0',
+  PaymentDate int(10) unsigned NOT NULL default '0',
+  Amount decimal(10,2) NOT NULL default '0.00',
+  Comment text NOT NULL,
+  PaymentReference varchar(255) NOT NULL default '',
+  PaymentTypeId int(11) NOT NULL default '0',
+  PRIMARY KEY  (AffiliatePaymentId),
+  KEY AffiliateId (AffiliateId),
+  KEY PaymentDate (PaymentDate),
+  KEY PaymentTypeId (PaymentTypeId)
+);
+
+CREATE TABLE AffiliatePaymentTypes (
+  PaymentTypeId int(11) NOT NULL auto_increment,
+  Name varchar(255) NOT NULL default '',
+  Description text NOT NULL,
+  IsPrimary tinyint(4) NOT NULL default '0',
+  Status tinyint(4) NOT NULL default '0',
+  Priority tinyint(4) NOT NULL default '0',
+  PRIMARY KEY  (PaymentTypeId),
+  KEY IsPrimary (IsPrimary),
+  KEY Status (Status),
+  KEY Priority (Priority)
+);
+
+CREATE TABLE AffiliatePlans (
+  AffiliatePlanId int(11) NOT NULL auto_increment,
+  Name varchar(255) NOT NULL default '',
+  PlanType tinyint(3) unsigned NOT NULL default '1',
+  ResetInterval int(10) unsigned NOT NULL default '0',
+  PaymentType tinyint(4) NOT NULL default '0',
+  MinPaymentAmount varchar(255) NOT NULL default '',
+  Enabled tinyint(4) unsigned NOT NULL default '0',
+  IsPrimary tinyint(4) NOT NULL default '0',
+  PRIMARY KEY  (AffiliatePlanId),
+  KEY PaymentType (PaymentType),
+  KEY Enabled (Enabled),
+  KEY IsPrimary (IsPrimary)
+);
+
+CREATE TABLE AffiliatePlansBrackets (
+  AffiliateBracketId int(11) NOT NULL auto_increment,
+  AffiliatePlanId int(11) NOT NULL default '0',
+  FromAmount decimal(10,4) NOT NULL default '0.0000',
+  ToAmount decimal(10,4) NOT NULL default '0.0000',
+  Percent decimal(3,2) NOT NULL default '0.00',
+  PRIMARY KEY  (AffiliateBracketId),
+  KEY AffiliatePlanId (AffiliatePlanId)
+);
+
+CREATE TABLE AffiliatePlansItems (
+  AffiliateItemId int(11) NOT NULL auto_increment,
+  AffiliatePlanId int(11) NOT NULL default '0',
+  ItemResourceId int(10) unsigned NOT NULL default '0',
+  ItemType tinyint(4) NOT NULL default '1',
+  PRIMARY KEY  (AffiliateItemId),
+  KEY AffiliatePlanId (AffiliatePlanId),
+  KEY ItemResourceId (ItemResourceId),
+  KEY ItemType (ItemType)
+);
+
+CREATE TABLE Affiliates (
+  AffiliateId int(11) NOT NULL auto_increment,
+  PortalUserId int(10) unsigned NOT NULL default '0',
+  AffiliatePlanId int(10) unsigned NOT NULL default '0',
+  AccumulatedAmount decimal(10,2) NOT NULL default '0.00',
+  AmountToPay decimal(10,2) NOT NULL default '0.00',
+  LastPaymentDate INT(11) UNSIGNED NULL DEFAULT NULL,
+  LastOrderDate INT(11) UNSIGNED NULL DEFAULT NULL,
+  Status tinyint(4) NOT NULL default '2',
+  AffiliateCode varchar(30) NOT NULL default '',
+  ItemsSold int(10) unsigned NOT NULL default '0',
+  PaymentTypeId int(11) NOT NULL default '0',
+  SSN varchar(100) NOT NULL default '',
+  Comments text NOT NULL,
+  CreatedOn int(11) NOT NULL default '0',
+  PRIMARY KEY  (AffiliateId),
+  UNIQUE KEY PortalUserId (PortalUserId),
+  UNIQUE KEY AffiliateCode (AffiliateCode),
+  KEY LastOrderDate (LastOrderDate),
+  KEY AffiliatePlanId (AffiliatePlanId),
+  KEY Status (Status),
+  KEY PaymentTypeId (PaymentTypeId),
+  KEY CreatedOn (CreatedOn)
+);
+
+CREATE TABLE ProductOptionCombinations (
+  CombinationId int(11) NOT NULL auto_increment,
+  ProductId int(11) NOT NULL default '0',
+  Combination text NOT NULL,
+  CombinationCRC int(11) NOT NULL default '0',
+  PriceType tinyint(1) default '3',
+  Price float default NULL,
+  WeightType tinyint(1) default '3',
+  Weight float default NULL,
+  Availability tinyint(1) NOT NULL default '1',
+  Priority int(11) NOT NULL default '0',
+  QtyInStock int(11) NOT NULL default '0',
+  QtyReserved int(11) NOT NULL default '0',
+  QtyBackOrdered int(11) NOT NULL default '0',
+  QtyOnOrder int(11) NOT NULL default '0',
+  SKU varchar(255) NOT NULL default '',
+  PRIMARY KEY  (CombinationId),
+  KEY CombinationCRC (CombinationCRC),
+  KEY ProductId (ProductId),
+  KEY Availability (Availability)
+);
+
+CREATE TABLE ProductOptions (
+  ProductOptionId int(11) NOT NULL auto_increment,
+  ProductId int(11) NOT NULL default '0',
+  Name varchar(255) NOT NULL default '',
+  OptionType TINYINT(4) NOT NULL DEFAULT '0',
+  Required tinyint(4) NOT NULL default '0',
+  Listable tinyint(4) NOT NULL default '0',
+  Priority int(11) NOT NULL default '0',
+  `Values` text,
+  Prices text,
+  PriceTypes text,
+  PRIMARY KEY  (ProductOptionId),
+  KEY ProductId (ProductId,Priority),
+  KEY OptionType (OptionType),
+  KEY Listable (Listable)
+);
+
+CREATE TABLE ProductsCustomData (
+  CustomDataId int(11) NOT NULL auto_increment,
+  ResourceId int(10) unsigned NOT NULL default '0',
+  KEY ResourceId (ResourceId),
+  PRIMARY KEY  (CustomDataId)
+);
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/install/install_schema.sql
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.2
\ No newline at end of property
Index: branches/5.1.x/in-commerce/install/remove_schema.sql
===================================================================
--- branches/5.1.x/in-commerce/install/remove_schema.sql	(nonexistent)
+++ branches/5.1.x/in-commerce/install/remove_schema.sql	(revision 12131)
@@ -0,0 +1,37 @@
+DROP TABLE Addresses;
+DROP TABLE Currencies;
+DROP TABLE GatewayConfigFields;
+DROP TABLE GatewayConfigValues;
+DROP TABLE Gateways;
+DROP TABLE Manufacturers;
+DROP TABLE OrderItems;
+DROP TABLE Orders;
+DROP TABLE GiftCertificates;
+DROP TABLE PaymentTypeCurrencies;
+DROP TABLE PaymentTypes;
+DROP TABLE Products;
+DROP TABLE ProductsCouponItems;
+DROP TABLE ProductsCoupons;
+DROP TABLE ProductsDiscountItems;
+DROP TABLE ProductsDiscounts;
+DROP TABLE ProductsPricing;
+DROP TABLE ProductFiles;
+DROP TABLE UserFileAccess;
+DROP TABLE UserDownloads;
+DROP TABLE ShippingBrackets;
+DROP TABLE ShippingCosts;
+DROP TABLE ShippingQuoteEngines;
+DROP TABLE ShippingType;
+DROP TABLE ShippingZones;
+DROP TABLE ShippingZonesDestinations;
+DROP TABLE TaxZones;
+DROP TABLE TaxZonesDestinations;
+DROP TABLE AffiliatePayments;
+DROP TABLE AffiliatePaymentTypes;
+DROP TABLE AffiliatePlans;
+DROP TABLE AffiliatePlansBrackets;
+DROP TABLE AffiliatePlansItems;
+DROP TABLE Affiliates;
+DROP TABLE ProductOptionCombinations;
+DROP TABLE ProductOptions;
+DROP TABLE ProductsCustomData;
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/install/remove_schema.sql
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Index: branches/5.1.x/in-commerce/install/install_order.txt
===================================================================
--- branches/5.1.x/in-commerce/install/install_order.txt	(nonexistent)
+++ branches/5.1.x/in-commerce/install/install_order.txt	(revision 12131)
@@ -0,0 +1 @@
+105
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/install/install_order.txt
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Index: branches/5.1.x/in-commerce/install.php
===================================================================
--- branches/5.1.x/in-commerce/install.php	(nonexistent)
+++ branches/5.1.x/in-commerce/install.php	(revision 12131)
@@ -0,0 +1,49 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+	$module_folder = 'in-commerce';
+
+	if (!defined('IS_INSTALL')) {
+		// separate module install
+		define('IS_INSTALL', 1);
+		define('ADMIN', 1);
+		define('REL_PATH', $module_folder);
+		define('FULL_PATH', realpath(dirname(__FILE__) . '/..') );
+
+		include_once(FULL_PATH . '/core/kernel/startup.php');
+		require_once FULL_PATH . '/core/install/install_toolkit.php';
+
+		$toolkit = new kInstallToolkit();
+	}
+	else {
+		// install, using installation wizard
+		$toolkit =& $this->toolkit;
+		/* @var $toolkit kInstallToolkit */
+	}
+
+	$application =& kApplication::Instance();
+	$application->Init();
+
+	$category =& $toolkit->createModuleCategory('Products', 'Product Catalog', '/in-commerce/designs/section', 'in-commerce/img/menu_products.gif');
+
+	$toolkit->RunSQL('/' . $module_folder . '/install/install_schema.sql');
+	$toolkit->RunSQL('/' . $module_folder . '/install/install_data.sql', '{ProductCatId}', $category->GetID());
+	$toolkit->ImportLanguage('/' . $module_folder . '/install/english');
+
+	$toolkit->SetModuleRootCategory($module_folder, $category->GetID());
+
+	$toolkit->linkCustomFields($module_folder, 'p', 11); // to create Custom Fields for Products
+	$toolkit->linkCustomFields('KERNEL', 'u', 6); // to create shipping related Custom Fields for Users
+	$toolkit->linkCustomFields('KERNEL', 'c', 1); // to create ItemTemplate custom field
+	$toolkit->setModuleItemTemplate($category, 'p', 'in-commerce/designs/detail');
+
+	$toolkit->finalizeModuleInstall($module_folder, true);
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/install.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.2
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/affiliate_payments/affiliate_payments_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/affiliate_payments/affiliate_payments_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/affiliate_payments/affiliate_payments_config.php	(revision 12131)
@@ -0,0 +1,150 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+$config	=	Array(
+					'Prefix'			=>	'apayments',
+					'ItemClass'			=>	Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'AffiliatePaymentsEventHandler','file'=>'affiliate_payments_event_handler.php','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'AffiliatePaymentsTagProcessor','file'=>'affiliate_payments_tag_processor.php','build_event'=>'OnBuild'),
+					'AutoLoad'			=>	true,
+
+					'AggregateTags' => Array(
+											Array(
+												'AggregateTo' => 'ord',
+												'AggregatedTagName' => 'InitPaymentsList',
+												'LocalTagName' => 'InitList',
+											),
+											Array(
+												'AggregateTo' => 'ord',
+												'AggregatedTagName' => 'ListPayments',
+												'LocalTagName' => 'ListPayments',
+											),
+											Array(
+												'AggregateTo' => 'ord',
+												'AggregatedTagName' => 'PaymentsPaginationBar',
+												'LocalTagName' => 'PaginationBar',
+											),
+											Array(
+												'AggregateTo' => 'ord',
+												'AggregatedTagName' => 'PaymentsCount',
+												'LocalTagName' => 'TotalRecords',
+											),
+										),
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'Page',
+												3	=>	'event',
+											),
+
+					'IDField'			=>	'AffiliatePaymentId',
+
+					'TitlePresets'		=>	Array(
+												'default'	=>	Array(	'new_status_labels'		=> Array('apayments'=>'!la_title_Adding_Affiliate_Payment!'),
+																		'edit_status_labels'	=> Array('apayments'=>'!la_title_Editing_Affiliate_Payment!'),
+																		'new_titlefield'		=> Array('apayments'=>'!la_title_New_Affiliate_Payment!'),
+																),
+												'payments_log'	=>	Array('prefixes' => Array('apayments.log_List'), 'format' => "!la_title_AffiliatePayments!"),
+
+											),
+
+					'Sections'			=>	Array(
+						'in-commerce:paymentlog'		=>	Array(
+							'parent'		=>	'in-commerce',
+							'icon'			=>	'payment_log',
+							'label'			=>	'la_tab_PaymentLog',
+							'url'			=>	Array('t' => 'in-commerce/payments/payments_list', 'pass' => 'm'),
+							'permissions'	=>	Array('view'),
+							'priority'		=>	9,
+							'type'			=>	stTREE,
+						),
+					),
+
+					'TableName'			=>	TABLE_PREFIX.'AffiliatePayments',
+
+					'ListSQLs'			=>	Array(''=>'	SELECT %1$s.* %2$s
+														FROM %1$s
+														LEFT JOIN '.TABLE_PREFIX.'Affiliates af ON %1$s.AffiliateId = af.AffiliateId
+														LEFT JOIN '.TABLE_PREFIX.'PortalUser au ON af.PortalUserId = au.PortalUserId'),
+
+					'ItemSQLs'			=>	Array(''=>'	SELECT %1$s.* %2$s
+														FROM %1$s
+														LEFT JOIN '.TABLE_PREFIX.'Affiliates af ON %1$s.AffiliateId = af.AffiliateId
+														LEFT JOIN '.TABLE_PREFIX.'PortalUser au ON af.PortalUserId = au.PortalUserId'),
+
+					'CalculatedFields'	=>	Array(
+												''		=> Array(
+													'PortalUserId'	=>	'af.PortalUserId',
+												),
+												'log' 	=> Array(
+													'Username'		=>	'au.Login',
+													'PortalUserId'	=>	'af.PortalUserId',
+												),
+											),
+
+					'ForeignKey'		=>	'AffiliateId',
+					'ParentTableKey'	=>	'AffiliateId',
+					'ParentPrefix' 		=>	'affil',
+					'AutoDelete'		=>	true,
+					'AutoClone'			=>	true,
+
+					'ListSortings'	=> 	Array(
+												'' => Array(
+															'Sorting' => Array('PaymentDate' => 'desc'),
+														)
+										),
+
+					'Fields' => Array(
+										'AffiliatePaymentId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+										'AffiliateId' => Array('type'=>'int','formatter'=>'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array(0 => 'lu_None'), 'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'Affiliates af LEFT JOIN '.TABLE_PREFIX.'PortalUser pu ON pu.PortalUserId = af.PortalUserId WHERE `%s` = \'%s\'','left_key_field'=>'AffiliateId','left_title_field'=>'Login','not_null'=>1,'default'=>0),
+										'PaymentDate' => Array('type' => 'int', 'formatter'=>'kDateFormatter', 'not_null' => '1','default' => '#NOW#'),
+										'Amount' => Array('type' => 'double', 'formatter'=>'kFormatter', 'format'=>'%.02f', 'not_null' => '1', 'required'=>1, 'default' => '0.00'),
+										'Comment' => Array('type' => 'string', 'formatter' => 'kFormatter', 'not_null' => 1, 'using_fck' => 1, 'default' => ''),
+										'PaymentReference' => Array('type' => 'string','not_null' => '1','default' => ''),
+										'PaymentTypeId' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options_sql'=>'SELECT Name, PaymentTypeId FROM '.TABLE_PREFIX.'AffiliatePaymentTypes WHERE Status = 1 ORDER BY IsPrimary DESC, Priority DESC, Name ASC', 'option_key_field'=>'PaymentTypeId', 'option_title_field'=>'Name', 'not_null' => 1, 'default' => 0),
+									),
+
+					'VirtualFields' => Array(
+										'Username' 		=> Array('type' => 'string'),
+										'PortalUserId' 	=> Array('type' => 'int'),
+								),
+
+					'Grids'	=> Array(
+								'Default'		=>	Array(
+															'Icons' => Array('default'=>'icon16_affiliate_payment.gif'),
+															'Fields' => Array(
+																			'AffiliatePaymentId'=> Array( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+																			'PaymentDate'		=> Array( 'title' => 'la_col_PaymentDate', 'filter_block' => 'grid_date_range_filter'),
+																			'Amount'			=> Array( 'title' => 'la_col_Amount', 'filter_block' => 'grid_float_range_filter'),
+																			'Comment'			=> Array( 'title' => 'la_col_Comment', 'filter_block' => 'grid_like_filter', 'first_chars' => 50),
+																			'PaymentTypeId'		=> Array( 'title' => 'la_col_PaymentType', 'filter_block' => 'grid_options_filter'),
+																			'PaymentReference'	=> Array( 'title' => 'la_col_PaymentReference', 'filter_block' => 'grid_like_filter', 'first_chars' => 50),
+																		),
+													),
+								'Log'			=>	Array(
+															'Icons' => Array('default'=>'icon16_affiliate_payment.gif'),
+															'Fields' => Array(
+																			'AffiliatePaymentId'=> Array( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+																			'Username'			=> Array( 'title' => 'la_col_Username', 'data_block' => 'grid_userlink_td', 'filter_block' => 'grid_like_filter'),
+																			'PaymentDate'		=> Array( 'title' => 'la_col_PaymentDate', 'filter_block' => 'grid_date_range_filter'),
+																			'Amount'			=> Array( 'title' => 'la_col_Amount', 'data_block' => 'grid_currency_td', 'filter_block' => 'grid_float_range_filter'),
+																			'Comment'			=> Array( 'title' => 'la_col_Comment', 'filter_block' => 'grid_like_filter', 'first_chars' => 50),
+																			'PaymentTypeId'		=> Array( 'title' => 'la_col_PaymentType', 'filter_block' => 'grid_options_filter'),
+																			'PaymentReference'	=> Array( 'title' => 'la_col_PaymentReference', 'filter_block' => 'grid_like_filter', 'first_chars' => 50),
+																		),
+													),
+
+								),
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/affiliate_payments/affiliate_payments_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.17.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/affiliate_payments/affiliate_payments_tag_processor.php
===================================================================
--- branches/5.1.x/in-commerce/units/affiliate_payments/affiliate_payments_tag_processor.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/affiliate_payments/affiliate_payments_tag_processor.php	(revision 12131)
@@ -0,0 +1,63 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class AffiliatePaymentsTagProcessor extends kDBTagProcessor  {
+
+	/**
+	 * Returns url for editing user from current record
+	 *
+	 * @param Array $params
+	 * @return string
+	 */
+	function UserLink($params)
+	{
+		$object =& $this->getObject($params);
+		$user_id = $object->GetDBField('PortalUserId');
+
+		if ($user_id) {
+			$url_params =  Array (
+				'm_opener' => 'd',
+				'u_mode' => 't',
+				'u_event' => 'OnEdit',
+				'u_id' => $user_id,
+				'pass' => 'all,u'
+			);
+
+			return $this->Application->HREF($params['edit_template'], '', $url_params);
+		}
+	}
+
+	function ListPayments($params)
+	{
+		$o = '';
+		$params['render_as'] = $params['item_render_as'];
+		$o_payments = $this->PrintList($params);
+
+		if ($o_payments)
+		{
+			$payments_params = Array('name' => $params['header_render_as']);
+			$o  = $this->Application->ParseBlock($payments_params);
+			$o .= $o_payments;
+		}
+		else
+		{
+			$payments_params = array('name' => $params['empty_mypayments_render_as']);
+			$o = $this->Application->ParseBlock($payments_params);
+		}
+
+		return $o;
+	}
+
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/affiliate_payments/affiliate_payments_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.32.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/affiliate_payments/affiliate_payments_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/affiliate_payments/affiliate_payments_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/affiliate_payments/affiliate_payments_event_handler.php	(revision 12131)
@@ -0,0 +1,117 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	class AffiliatePaymentsEventHandler extends kDBEventHandler {
+
+		/**
+		 * Enter description here...
+		 *
+		 * @param kDBItem $object
+		 * @param kEvent $event
+		 */
+		function prepareObject(&$object, &$event)
+		{
+			if($event->Special == 'log') return false;
+
+			$parent_info = $object->getLinkedInfo();
+			$parent_object =& $this->Application->recallObject($parent_info['ParentPrefix']);
+			$options = $object->getFieldOptions('PaymentTypeId');
+
+			if($parent_object->isLoaded())
+			{
+				$options['default'] = $parent_object->GetDBField('PaymentTypeId');
+				$object->SetDBField('PaymentTypeId', $parent_object->GetDBField('PaymentTypeId'));
+			}
+
+			if($this->Application->GetVar($event->Prefix_Special.'_event') != 'OnNew' && $this->Application->GetVar($event->Prefix_Special.'_event') != 'OnCreate')
+			{
+				$options['options'][0] = '';
+			}
+
+			$object->setFieldOptions('PaymentTypeId', $options);
+		}
+
+		/**
+		 * Set's fields based on affiliate currently beeing edited
+		 *
+		 * @param kEvent $event
+		 */
+		function OnNew(&$event)
+		{
+			parent::OnNew($event);
+
+			$affiliate =& $this->Application->recallObject('affil');
+			$object =& $event->getObject( Array('skip_autoload'=>true) );
+			$object->SetDBField('Amount', $affiliate->GetDBField('AmountToPay') );
+			$object->SetDBField('AffiliateId', $affiliate->GetID() );
+		}
+
+		/**
+		 * Set's day of payment for newly created payments
+		 *
+		 * @param kEvent $event
+		 */
+		function OnBeforeItemCreate(&$event)
+		{
+			$object =& $event->getObject( Array('skip_autoload'=>true) );
+		}
+
+		/**
+		 * Updates Affiliate Record On Successfuly payment creation
+		 *
+		 * @param kEvent $event
+		 */
+		function OnAfterItemCreate(&$event)
+		{
+			$object =& $event->getObject( Array('skip_autoload' => true) );
+			$parent_info = $object->getLinkedInfo();
+			$sql = 'SELECT MAX(PaymentDate) FROM '.$object->TableName.'
+					WHERE '.$parent_info['ParentTableKey'].' = '.$parent_info['ParentId'];
+			$payment_date = $this->Conn->GetOne($sql);
+
+			$amount_payed = $object->GetDBField('Amount');
+
+			$affiliate =& $this->Application->recallObject('affil');
+			$affiliate->SetDBField( 'AmountToPay', $affiliate->GetDBField('AmountToPay') - $amount_payed );
+			$affiliate->SetDBField('LastPaymentDate_date', $payment_date);
+			$affiliate->SetDBField('LastPaymentDate_time', $payment_date);
+			$affiliate->Update();
+		}
+
+		function SetCustomQuery(&$event)
+		{
+			$object =& $event->getObject();
+			if($event->Special == 'log')
+			{
+				$object->removeFilter('parent_filter');
+			}
+
+			$types = $event->getEventParam('types');
+			if ($types=='my_payments')
+			{
+				$user_id = $this->Application->RecallVar('user_id');
+				$object->removeFilter('parent_filter');
+				$object->addFilter('my_payments', 'au.PortalUserId = '.$user_id);
+			}
+
+			if ($types=='myvisitororders')
+			{
+				$user_id = $this->Application->RecallVar('user_id');
+				$object->addFilter('myitems_orders','ord.OrderId IS NOT NULL');
+				$object->addFilter('myitems_user1','au.PortalUserId = '.$user_id);
+				$object->addFilter('myitems_user2','au.PortalUserId > 0');
+			}
+		}
+
+	}
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/affiliate_payments/affiliate_payments_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.10
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/products/products_config.php
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: branches/5.1.x/in-commerce/units/products/products_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.99.2.27
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/products/products_tag_processor.php
===================================================================
--- branches/5.1.x/in-commerce/units/products/products_tag_processor.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/products/products_tag_processor.php	(revision 12131)
@@ -0,0 +1,768 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class ProductsTagProcessor extends kCatDBTagProcessor {
+
+	function Rating($params)
+	{
+		$object =& $this->getObject($params);
+		$rating = round($object->GetDBField('CachedRating') );
+
+		$o = '';
+		for ($i = 0; $i < $rating; $i++) {
+			$o .= $this->Application->ParseBlock( Array('name' => $this->SelectParam($params, 'star_on_render_as,block_star_on')) );
+		}
+
+		for ($i = 0; $i < 5 - $rating; $i++) {
+			$o .= $this->Application->ParseBlock( Array('name' => $this->SelectParam($params, 'star_off_render_as,block_star_off')) );
+		}
+
+		return $o;
+	}
+
+	function NewMark($params)
+	{
+		$object =& $this->getObject($params);
+		$o = '';
+		if($object->GetDBField('IsNew'))
+		{
+			$o .= $this->Application->ParseBlock( Array('name' => $this->SelectParam($params, 'render_as,block')) );
+		}
+		return $o;
+	}
+
+	function HotMark($params)
+	{
+		$object =& $this->getObject($params);
+		$o = '';
+		if($object->GetDBField('IsHot'))
+		{
+			$o .= $this->Application->ParseBlock( Array('name' => $this->SelectParam($params, 'render_as,block')) );
+		}
+		return $o;
+	}
+
+	function TopSellerMark($params)
+	{
+		return $this->HotMark($params);
+	}
+
+	function PopMark($params)
+	{
+		$object =& $this->getObject($params);
+		$o = '';
+		if($object->GetDBField('IsPop'))
+		{
+			$o .= $this->Application->ParseBlock( Array('name' => $this->SelectParam($params, 'render_as,block')) );
+		}
+		return $o;
+	}
+
+	function EdPickMark($params)
+	{
+		$object =& $this->getObject($params);
+		$o = '';
+		if($object->GetDBField('EditorsPick'))
+		{
+			$o .= $this->Application->ParseBlock( Array('name' => $this->SelectParam($params, 'render_as,block')) );
+		}
+		return $o;
+	}
+
+	/**
+	 * Parses block only if item is favorite
+	 *
+	 * @param Array $params
+	 * @return string
+	 * @deprecated used only in default,onlinestore
+	 */
+	function FavoriteMark($params)
+	{
+		if ($this->IsFavorite($params)) {
+			return $this->Application->ParseBlock( Array( 'name' => $this->SelectParam($params, 'render_as,block') ) );
+		}
+
+		return '';
+	}
+
+	function CurrentCategory($params){
+		$conn=$this->Application->GetADODBConnection();
+		return $conn->GetOne("SELECT Name FROM ".TABLE_PREFIX."Category WHERE CategoryId=".$this->Application->GetVar("m_cat_id"));
+	}
+
+	function RateForm($params)
+	{
+		$params['name'] = $this->SelectParam($params, 'render_as,block');
+		$labels = explode(',', $params['labels']);
+		$o = '';
+		$star_block = $this->SelectParam($params, 'star_render_as,star_block');
+		for($i = 5; $i >= 0; $i--)
+		{
+			$params['rating'] = $i;
+			$params['label'] = $this->Application->Phrase($labels[5 - $i]);
+			$params['stars'] = '';
+			for($j = $i; $j > 0; $j--)
+			{
+				$params['stars'] .= $this->Application->ParseBlock(Array('name' => $star_block));
+			}
+			$o .= $this->Application->ParseBlock($params);
+		}
+		return $o;
+	}
+
+	/**
+	 * Parses block for changing favorite status
+	 *
+	 * @param Array $params
+	 * @return string
+	 * @deprecated used only in default,onlinestore
+	 */
+	function FavoriteToggle($params)
+	{
+		$block_params = Array ();
+		$block_names = $this->IsFavorite($params) ? 'remove_favorite_render_as,block_remove_favorite' : 'add_favorite_render_as,block_add_favorite';
+		$block_params['name'] = $this->SelectParam($params, $block_names);
+		$params['template'] = $params[$this->IsFavorite($params) ? 'template_on_remove' : 'template_on_add'];
+
+		$remove_params = Array (
+			'remove_favorite_render_as', 'block_remove_favorite', 'add_to_wish_list_render_as', 'block_add_to_wish_list',
+			'add_favorite_render_as', 'block_add_favorite', 'remove_from_wish_list_render_as', 'block_remove_from_wish_list',
+			'template_on_remove', 'template_on_add'
+		);
+
+		foreach ($params as $param_name => $param_value) {
+			if (in_array($param_name, $remove_params)) {
+				unset($params[$param_name]);
+			}
+		}
+
+		$block_params['wish_list_toggle_link'] = $this->FavoriteToggleLink($params);
+		return $this->Application->ParseBlock($block_params);
+	}
+
+	function WishListToggleLink($params)
+	{
+		$params['block_add_favorite'] = $this->SelectParam($params, 'add_to_wish_list_render_as,block_add_to_wish_list');
+		$params['block_remove_favorite'] = $this->SelectParam($params, 'remove_from_wish_list_render_as,block_remove_from_wish_list');
+		return $this->FavoriteToggle($params);
+	}
+
+	function AddReviewLink($params)
+	{
+		$o = $this->Application->ParseBlock( Array('name' => $this->SelectParam($params, 'render_as,block')) );
+		return $o;
+	}
+
+	function ListProducts($params)
+	{
+		return $this->PrintList2($params);
+	}
+
+	function ListRelatedProducts($params)
+	{
+//		$related = &$this->Application->recallObject('rel');
+		return $this->PrintList2($params);
+	}
+
+	function BuildListSpecial($params)
+	{
+		if ($this->Special != '') return $this->Special;
+		if ( isset($params['parent_cat_id']) ) {
+			$parent_cat_id = $params['parent_cat_id'];
+		}
+		else {
+			$parent_cat_id = $this->Application->GetVar('c_id');
+			if (!$parent_cat_id) {
+				$parent_cat_id = $this->Application->GetVar('m_cat_id');
+			}
+		}
+
+		if ( isset($params['manufacturer']) ) {
+			$manufacturer = $params['manufacturer'];
+		}
+		else {
+			$manufacturer = $this->Application->GetVar('manuf_id');
+		}
+
+		$recursive = isset($params['recursive']);
+
+		$list_unique_key = $this->getUniqueListKey($params).$recursive;
+		if ($list_unique_key == '') {
+			return parent::BuildListSpecial($params);
+		}
+
+		return crc32($parent_cat_id.$list_unique_key.$manufacturer);
+	}
+
+	function ProductList($params)
+	{
+		if($params['shortlist'])
+		{
+			$params['per_page'] = $this->Application->ConfigValue('Comm_Perpage_Products_Short');
+		}
+		$object =& $this->Application->recallObject( $this->getPrefixSpecial() , $this->Prefix.'_List', $params );
+
+		switch($params['ListType'])
+		{
+			case 'favorites':
+				return $this->PrintList($params);
+				break;
+			case 'search':
+
+			default:
+				if(isset($params['block']))
+				{
+					return $this->PrintList($params);
+				}
+				else
+				{
+					$params['block'] = $params['block_main'];
+					$params['row_start_block'] = $params['block_row_start'];
+					$params['row_end_block'] = $params['block_row_end'];
+					return $this->PrintList2($params);
+				}
+		}
+	}
+
+	/**
+	 * Adds product to recently viewed list (only in case, when not already there)
+	 *
+	 * @param Array $params
+	 */
+	function AddToRecent($params)
+	{
+		$recent_products = $this->Application->RecallVar('recent_products');
+		if (!$recent_products) {
+			$recent_products = Array();
+		}
+		else {
+			$recent_products = unserialize($recent_products);
+		}
+
+		$product_id = $this->Application->GetVar('p_id');
+		if (!in_array($product_id, $recent_products)) {
+			array_push($recent_products, $product_id);
+			$this->Application->StoreVar('recent_products', serialize($recent_products));
+		}
+	}
+
+	function SearchMoreLink($params)
+	{
+		$object =& $this->Application->recallObject( $this->getPrefixSpecial() , $this->Prefix.'_List', $params );
+		$o = '';
+		if($object->PerPage < $this->SearchResultsCount())
+		{
+			$o = $this->Application->ParseBlock( Array('name' => $params['block']) );
+		}
+		return $o;
+	}
+
+	function AddToCartLink($params)
+	{
+		$object =& $this->getObject($params);
+
+		if ($object->GetDBField('HasRequiredOptions')) {
+			$t = $params['product_template'];
+			if (!$t) {
+				$theme =& $this->Application->recallObject('theme.current');
+				if ($theme->GetDBField('Name') == 'onlinestore') {
+					$t = 'in-commerce/product/details';
+				}
+				elseif ($theme->GetDBField('Name') == 'default') {
+					$t = 'in-commerce/product';
+				}
+			}
+			$link_params = Array('m_cat_id' => $object->GetDBField('CategoryId'), 'pass' => 'm,p');
+		}
+		else {
+			$t = $params['template'];
+			$link_params = Array('m_cat_id' => $object->GetDBField('CategoryId'), 'pass' => 'm,p,ord', 'ord_event' => 'OnAddToCart');
+		}
+
+		$this->Application->SetVar('p_id', $this->Application->GetVar($this->getPrefixSpecial().'_id'));
+		return $this->Application->HREF($t, '', $link_params);
+	}
+
+	function SearchResultsCount($params)
+	{
+		$search_results_table = TABLE_PREFIX.'ses_'.$this->Application->GetSID().'_'.TABLE_PREFIX.'Search';
+		$sql = '	SELECT COUNT(ResourceId)
+					FROM '.$search_results_table.'
+					WHERE ItemType=11';
+		return $this->Conn->GetOne($sql);
+	}
+
+	function DetailsLink($params)
+	{
+		$this->Application->SetVar( $this->Prefix.'_id', $this->Application->GetVar($this->getPrefixSpecial().'_id') );
+		$ret = $this->Application->HREF('in-commerce/details', '', Array('pass' => 'all,p'));
+		return $ret;
+	}
+
+	function ProductLink($params)
+	{
+		return $this->ItemLink($params, 'product');
+	}
+
+	function ProductFileLink($params)
+	{
+		// 'p_id'=>'0',  ??
+		$params = array_merge($params,  Array('pass'=>'all,m,p,file.downl'));
+		$product_id = getArrayValue($params,'product_id');
+		if (!$product_id) {
+			$product_id = $this->Application->GetVar($this->Prefix.'_id');
+		}
+		$params['p_id'] = $product_id;
+
+		$product =& $this->Application->recallObject($this->getPrefixSpecial());
+		$params['m_cat_id'] = $product->GetDBField('CategoryId');
+
+		$main_processor =& $this->Application->recallObject('m_TagProcessor');
+		return $main_processor->T($params);
+	}
+
+	/*
+	function MoreLink($params)
+	{
+		$object =& $this->Application->recallObject( $this->getPrefixSpecial() , $this->Prefix.'_List', $params );
+		$favorites_tag_processor =& $this->Application->recallObject('fav_TagProcessor');
+		$o = '';
+		if($object->PerPage < $favorites_tag_processor->FavoriteProductCount( Array('filter' => 'all') ))
+		{
+			$o = $this->Application->ParseBlock( Array('name' => $params['block']) );
+		}
+		return $o;
+	}
+	*/
+
+	function GetMarkedVal($params)
+	{
+		$list =& $this->GetList($params);
+
+		return $this->Application->RecallVar($list->getPrefixSpecial().$params['name']);
+	}
+
+	function SortingOptions($params)
+	{
+		$list =& $this->GetList($params);
+
+		$sorting_field_selected = $this->Application->RecallVar($list->getPrefixSpecial().$params['sorting_select_name']);
+
+		if (!$sorting_field_selected){
+			$sorting_field_selected = $this->Application->ConfigValue('product_OrderProductsBy');
+		}
+
+		$field_list_plain = $this->Conn->GetOne('SELECT ValueList FROM '.TABLE_PREFIX.'ConfigurationAdmin WHERE VariableName = '.$this->Conn->qstr('product_OrderProductsBy') );
+		$field_list = explode(',', $field_list_plain);
+
+		$o = '';
+
+		foreach ($field_list as $key=>$field){
+			list($fieldname, $fieldlabel) = explode('=', $field);
+			$option_params = $this->prepareTagParams($params);
+			$option_params['fieldname'] = $fieldname;
+			$option_params['fieldlabel'] = $this->Application->Phrase($fieldlabel);
+			$option_params['name'] = $params['block_options'];
+			if ($fieldname == $sorting_field_selected){
+				$option_params['selected'] = 'selected';
+			}else{
+				$option_params['selected'] = '';
+			}
+			$o .= $this->Application->ParseBlock($option_params);
+		}
+
+		return $o;
+	}
+
+	function SortingDirectionOptions($params)
+	{
+		$list =& $this->GetList($params);
+
+		$sorting_dir_selected = $this->Application->RecallVar($list->getPrefixSpecial().$params['sorting_select_name']);
+
+		if (!$sorting_dir_selected){
+			$sorting_dir_selected = $this->Application->ConfigValue('product_OrderProductsByDir');
+		}
+
+		$o = '';
+
+		$field_list = array('asc' => 'lu_Ascending', 'desc' => 'lu_Descending');
+
+		foreach ($field_list as $fieldname=>$fieldlabel){
+
+			$option_params = $this->prepareTagParams($params);
+			$option_params['fieldname'] = $fieldname;
+			$option_params['fieldlabel'] = $this->Application->Phrase($fieldlabel);
+			$option_params['name'] = $params['block_options'];
+			if ($fieldname == $sorting_dir_selected){
+				$option_params['selected'] = 'selected';
+			}else{
+				$option_params['selected'] = '';
+			}
+			$o .= $this->Application->ParseBlock($option_params);
+
+		}
+
+		return $o;
+	}
+
+	function ErrorMessage($params)
+	{
+		if( $this->Application->GetVar('keywords_too_short') )
+		{
+			$ret = $this->Application->ParseBlock(Array('name' => $this->SelectParam($params, 'keywords_too_short_render_as,block_keywords_too_short')));
+		}
+		elseif( $this->Application->GetVar('adv_search_error') )
+		{
+			$ret = $this->Application->ParseBlock(Array('name' => $this->SelectParam($params, 'adv_search_error_render_as,block_adv_search_error')));
+		}
+		else
+		{
+			$ret = $this->Application->ParseBlock(Array('name' => $this->SelectParam($params, 'no_found_render_as,block_no_found')));
+		}
+		return $ret;
+	}
+
+	function ListReviews($params)
+	{
+		$review_tag_processor =& $this->Application->recallObject('rev.product_TagProcessor');
+		return $review_tag_processor->PrintList($params);
+	}
+
+	function ReviewCount($params)
+	{
+		$review_tag_processor =& $this->Application->recallObject('rev.product_TagProcessor');
+		return $review_tag_processor->TotalRecords($params);
+	}
+
+	function InitList($params){
+
+		$passed_manuf_id = $this->Application->GetVar('manuf_id');
+		if ($passed_manuf_id && !isset($params['manufacturer'])){
+			$params['manufacturer'] = $passed_manuf_id;
+		}
+		parent::InitList($params);
+
+	}
+
+	/**
+	 * Builds link to manufacturer page
+	 *
+	 * @param Array $params
+	 * @return string
+	 */
+	function ManufacturerLink($params)
+	{
+		if ( array_key_exists('manufacturer_id', $params) ) {
+			// use direct manufacturer from tag
+			$params['manuf_id'] = $params['manufacturer_id'];
+			unset($params['manufacturer_id']);
+		}
+		else {
+			// use product's manufacturer
+			$object =& $this->getObject($params);
+			$item_manufacturer_id = $object->GetDBField('ManufacturerId');
+
+			if ($item_manufacturer_id){
+				$params['manuf_id'] = $item_manufacturer_id;
+			}
+		}
+
+		$params['pass'] = 'm,manuf';
+		$params['m_cat_id'] = 0;
+		return $this->Application->ProcessParsedTag('m', 'Link', $params);
+	}
+
+	function AlreadyReviewed($params)
+	{
+		$rev_tag_processor =& $this->Application->recallObject('rev_TagProcessor');
+		return $rev_tag_processor->AlreadyReviewed($params);
+	}
+
+	function PrepareSearchResults($params)
+	{
+		$names_mapping = $this->Application->GetVar('NamesToSpecialMapping');
+
+		if($this->Application->GetVar('search_type') == 'advanced' || !getArrayValue($names_mapping, $this->Prefix, 'search_results'))
+		{
+			$params = Array('list_name'		=>	'search_results',
+							'types'			=>	'search',
+							'parent_cat_id'	=>	'any',
+							'recursive'		=>	'true',
+							'per_page'		=>	'short_list'
+						);
+			$this->InitList($params);
+		}
+		return '';
+	}
+
+	function Available($params)
+	{
+		$object =& $this->Application->recallObject($this->getPrefixSpecial(), $this->Prefix, $params);
+
+		if (!$object->GetDBField('InventoryStatus')) return true;
+
+		$backordering = $this->Application->ConfigValue('Comm_Enable_Backordering');
+
+		if ($object->GetDBField('InventoryStatus') == 2) {
+			$poc_table = $this->Application->getUnitOption('poc', 'TableName');
+			$sql = 'SELECT SUM(IF(QtyInStock > '.$object->GetDBField('QtyInStockMin').', 1, 0))
+					FROM '.$poc_table.'
+					WHERE (ProductId = '.$object->GetID().') AND (Availability = 1)';
+			$stock_available = $this->Conn->GetOne($sql) > 0; // at least one option combination present
+		}
+		else {
+		$stock_available = $object->GetDBField('QtyInStock') > $object->GetDBField('QtyInStockMin');
+		}
+
+		$prod_backordering = $object->GetDBField('BackOrder');
+
+		if ($stock_available) return true;
+
+		// stock is NOT available:
+		if (!$backordering || $prod_backordering == 0) return false; // if backordering is generaly disabled or disabled for product (Never)
+
+		// backordering enabled; (auto or always mode)
+		return true;
+	}
+
+	function IsSubscription($params)
+	{
+		$object = &$this->Application->recallObject($this->getPrefixSpecial());
+		return ($object->GetDBField('Type') == 2);
+	}
+
+	function IsTangible($params)
+	{
+		$object = &$this->Application->recallObject($this->getPrefixSpecial());
+		return ($object->GetDBField('Type') == 1);
+	}
+
+	function HasFiles($params)
+	{
+		$sql = 'SELECT COUNT(FileId) FROM '.$this->Application->getUnitOption('file', 'TableName').'
+				WHERE ProductId = '.$this->Application->GetVar('p_id').' AND Status = 1';
+		return $this->Conn->GetOne($sql) ? 1 : 0;
+	}
+
+	function UniqueFileName($params)
+	{
+		$file_object =& $this->Application->recallObject('file.downl');
+		return ($file_object->GetDBField('Name') &&
+				$file_object->GetDBField('Name') != $file_object->GetDBField('FilePath'))
+			? 1 : 0;
+	}
+
+	function FileDownload($params)
+	{
+		$file_id = $this->Application->GetVar('file.downl_id');
+		$product_id =	$file_id ? $this->Conn->GetOne('SELECT ProductId
+														FROM '.$this->Application->getUnitOption('file', 'TableName').'
+														WHERE FileId = '.$file_id) :
+						$this->Application->GetVar($this->getPrefixSpecial().'_id');
+
+		$download_helper_class = $this->Application->getUnitOption($this->Prefix, 'DownloadHelperClass');
+
+		if (!$download_helper_class) {
+			$download_helper_class = 'DownloadHelper';
+		}
+		$download_helper =& $this->Application->recallObject($download_helper_class);
+		if (!$download_helper->CheckAccess($file_id, $product_id)) {
+			$this->Application->ApplicationDie('File Access permission check failed!');
+		}
+		$file_info = $download_helper->SendFile($file_id, $product_id);
+		$download_helper->LogDownload($product_id, $file_info);
+
+		define('DBG_SKIP_REPORTING', 1);
+		$this->Application->ApplicationDie();
+	}
+
+	function PictureLink($params)
+	{
+		if (getArrayValue($params, 'picture_list')) {
+			$params['img_id'] = $this->Application->GetVar('img_id');
+			$params['pass'] = 'all,p,img';
+			unset($params['picture_list']);
+		}
+		else {
+			$params['pass'] = 'all,p';
+		}
+		return $this->Application->ProcessParsedTag('m', 'Link', $params);
+	}
+
+	function ShouldListOptions($params)
+	{
+		$object =& $this->getObject($params);
+
+		$req_filter = '';
+		if (getArrayValue($params, 'required_only')) {
+			$req_filter = ' AND Required = 1';
+		}
+
+		$query = 'SELECT COUNT(*) FROM '.TABLE_PREFIX.'ProductOptions WHERE ProductId = '.$object->GetID().$req_filter;
+		$res = $this->Conn->GetOne($query);
+		return $res > 0;
+	}
+
+	function CountOptions($params)
+	{
+		$object =& $this->getObject($params);
+
+		$query = 'SELECT COUNT(*) FROM '.TABLE_PREFIX.'ProductOptions WHERE ProductId = '.$object->GetID();
+		$res = $this->Conn->GetOne($query);
+
+		$max = $this->SelectParam($params, 'greater');
+		if (!$max) $max = 0;
+
+		return $res > $max;
+	}
+
+	function OptionsUpdateMode($params)
+	{
+		return $this->Application->GetVar('orditems_id') !== false;
+	}
+
+	function OptionsHaveError($params)
+	{
+		return $this->Application->GetVar('opt_error') > 0;
+	}
+
+	function OptionsError($params)
+	{
+		switch ($this->Application->GetVar('opt_error')) {
+			case 1:
+				return $this->Application->Phrase($params['required']);
+			case 2:
+				return $this->Application->Phrase($params['not_available']);
+		}
+	}
+
+
+	function ListShippingTypes($params)
+	{
+		$quote_engine_collector =& $this->Application->recallObject('ShippingQuoteCollector');
+		$types = $quote_engine_collector->GetAvailableShippingTypes();
+
+		$object =& $this->getObject($params);
+		$selected = $object->GetDBField('ShippingLimitation');
+		$selected = explode('|', substr($selected, 1, -1));
+
+		$o = '';
+		foreach ($types as $a_type)
+		{
+			$is_selected = in_array($a_type['_Id'], $selected);
+			$continue = $params['mode'] == 'selected' ? !$is_selected : $is_selected;
+			if ($continue) continue;
+			$block_params = $a_type;
+			$block_params['name']	= $params['render_as'];
+			$o .= $this->Application->ParseBlock($block_params);
+		}
+		return $o;
+	}
+
+	function PageLink($params)
+	{
+		$manufacturer_id = $this->Application->GetVar('manuf_id');
+		if ($manufacturer_id) {
+			$params['pass'] = 'm,'.$this->getPrefixSpecial().',manuf';
+		}
+
+		return parent::PageLink($params);
+	}
+
+	/**
+	 * Calculate savings based on price & market price relationship
+	 *
+	 * @param Array $params
+	 * @return int
+	 */
+	function Savings($params)
+	{
+		$object =& $this->getObject($params);
+		/* @var $object kDBItem */
+
+		$price = $object->GetDBField('Price');
+		$msrp = $object->GetDBField('MSRP');
+
+		$value = 0;
+		if (isset($params['type']) && ($params['type'] == 'percent')) {
+			if ($msrp > 0) {
+				return 100 - round($price * 100 / $msrp);
+			}
+		}
+		else {
+			if ($msrp > $price) {
+				$value = $msrp - $price;
+			}
+		}
+
+		if (isset($params['currency'])) {
+			$lang =& $this->Application->recallObject('lang.current');
+			/* @var $lang LanguagesItem */
+
+			$iso = $this->GetISO($params['currency']);
+			$value = $this->ConvertCurrency($value, $iso);
+			$value = $lang->formatNumber( sprintf('%.2f', $value) );
+			$value = $this->AddCurrencySymbol($value, $iso);
+		}
+
+		return $value;
+	}
+
+	/**
+	 * Hides permission tab, when it's not allowed by configuration settings
+	 *
+	 * @param Array $params
+	 */
+	function ModifyUnitConfig($params)
+	{
+		$edit_tab_presets = $this->Application->getUnitOption($this->Prefix, 'EditTabPresets');
+		$edit_tab_preset = $edit_tab_presets['Default'];
+
+		$object =& $this->getObject($params);
+		/* @var $object kDBItem */
+
+		$product_type = $object->GetDBField('Type');
+
+		if ($product_type != PRODUCT_TYPE_TANGIBLE) {
+			unset($edit_tab_preset['inventory']);
+		}
+
+		if ($product_type == PRODUCT_TYPE_SUBSCRIPTION) {
+			unset($edit_tab_preset['options']);
+		}
+		else {
+			unset($edit_tab_preset['access_and_pricing']);
+		}
+
+		if ($product_type != PRODUCT_TYPE_TANGIBLE && $product_type != PRODUCT_TYPE_PACKAGE) {
+			unset($edit_tab_preset['pricing']);
+		}
+		else {
+			unset($edit_tab_preset['pricing2']);
+		}
+
+		if ($product_type != PRODUCT_TYPE_DOWNLOADABLE) {
+			unset($edit_tab_preset['files_and_pricing']);
+		}
+
+		if ($product_type != PRODUCT_TYPE_PACKAGE) {
+			unset($edit_tab_preset['package_content']);
+		}
+
+		$edit_tab_presets['Default'] = $edit_tab_preset;
+		$this->Application->setUnitOption($this->Prefix, 'EditTabPresets', $edit_tab_presets);
+	}
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/products/products_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.49.2.11
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/products/products_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/products/products_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/products/products_event_handler.php	(revision 12131)
@@ -0,0 +1,1227 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class ProductsEventHandler extends kCatDBEventHandler {
+
+	/**
+	 * Allows to override standart permission mapping
+	 *
+	 */
+	function mapPermissions()
+	{
+		parent::mapPermissions();
+		$permissions = Array(
+								// front
+								'OnCancelAction'		=>	Array('self' => true),
+								'OnRateProduct'			=>	Array('self' => true),
+								'OnClearRecent'			=>	Array('self' => true),
+								'OnRecommendProduct'	=>	Array('self' => true),
+
+								// admin
+								'OnQtyAdd'			=>	Array('self' => 'add|edit'),
+								'OnQtyRemove'		=>	Array('self' => 'add|edit'),
+								'OnQtyOrder'		=>	Array('self' => 'add|edit'),
+								'OnQtyReceiveOrder'	=>	Array('self' => 'add|edit'),
+								'OnQtyCancelOrder'	=>	Array('self' => 'add|edit'),
+
+						);
+		$this->permMapping = array_merge($this->permMapping, $permissions);
+	}
+
+	function mapEvents()
+	{
+		parent::mapEvents();	// ensure auto-adding of approve/decine and so on events
+		$product_events = Array(	'OnQtyAdd'=>'InventoryAction',
+									'OnQtyRemove'=>'InventoryAction',
+									'OnQtyOrder'=>'InventoryAction',
+									'OnQtyReceiveOrder'=>'InventoryAction',
+									'OnQtyCancelOrder'=>'InventoryAction',);
+
+		$this->eventMethods = array_merge($this->eventMethods, $product_events);
+	}
+
+	/**
+	 * Sets default processing data for subscriptions
+	 *
+	 * @param kEvent $event
+	 */
+	function OnBeforeItemCreate(&$event)
+	{
+		$object =& $event->getObject();
+
+		$product_approve_events = Array(2 => 'p:OnSubscriptionApprove',
+										4 => 'p:OnDownloadableApprove',
+										5 => 'p:OnPackageApprove');
+
+		$product_type = $object->GetDBField('Type');
+
+		$type_found = in_array($product_type, array_keys($product_approve_events) );
+
+		if($type_found && !$object->GetDBField('ProcessingData') )
+		{
+			$processing_data = Array('ApproveEvent' => $product_approve_events[$product_type] );
+			$object->SetDBField( 'ProcessingData', serialize($processing_data) );
+		}
+	}
+
+	/**
+	 * Process product count manipulations
+	 *
+	 * @param kEvent $event
+	 * @access private
+	 */
+	function InventoryAction(&$event)
+	{
+		$object =& $event->getObject();
+
+		$object->SetFieldsFromHash( $this->getSubmittedFields($event) );
+
+		if ($object->GetDBField('InventoryStatus') == 2) {
+			// inventory by options (use first selected combination in grid)
+			$combination_id = array_shift( array_keys( $this->Application->GetVar('poc_grid') ) );
+		}
+		else {
+			// inventory by product
+			$combination_id = 0;
+		}
+
+		// save id of selected option combination & preselect it in grid
+		$this->Application->SetVar('combination_id', $combination_id);
+
+		$this->ScheduleInventoryAction($event->Name, $object->GetId(), $object->GetDBField('Qty'), $combination_id);
+
+		$object->Validate();
+
+		if (!isset($object->FieldErrors['Qty']['pseudo'])){
+			$this->modifyInventory($event->Name, $object, $object->GetDBField('Qty'), $combination_id);
+		}
+
+		$object->SetDBField('Qty', null);
+		$event->redirect = false;
+	}
+
+	/**
+	 * Perform inventory action on supplied object
+	 *
+	 * @param string $action event name which is actually called by user
+	 * @param ProductsItem $product
+	 * @param int $qty
+	 * @param int $combination_id
+	 */
+	function modifyInventory($action, &$product, $qty, $combination_id)
+	{
+		if ($product->GetDBField('InventoryStatus') == 2) {
+			// save inventory changes to option combination instead of product
+			$object =& $this->Application->recallObject('poc.-item', null, Array('skip_autoload' => true));
+			$object->Load($combination_id);
+		}
+		elseif ($combination_id > 0) {
+			// combination id present, but not inventory by combinations => skip
+			return false;
+		}
+		elseif ($product->GetDBField('InventoryStatus') == 1) {
+			// save inventory changes to product
+			$object =& $product;
+		}
+		else {
+			// product has inventory actions, but don't use inventory => skip
+			return false;
+		}
+
+		if (!$object->isLoaded()) {
+			// product/combination in action doesn't exist in database by now
+			return false;
+		}
+
+		switch ($action) {
+			case 'OnQtyAdd':
+				$object->SetDBField('QtyInStock', $object->GetDBField('QtyInStock') + $qty);
+				break;
+
+			case 'OnQtyRemove':
+				if ($object->GetDBField('QtyInStock') < $qty) {
+					$qty = $object->GetDBField('QtyInStock');
+				}
+				$object->SetDBField('QtyInStock', $object->GetDBField('QtyInStock') - $qty);
+				break;
+
+			case 'OnQtyOrder':
+				$object->SetDBField('QtyOnOrder', $object->GetDBField('QtyOnOrder') + $qty);
+				break;
+
+			case 'OnQtyReceiveOrder':
+				$object->SetDBField('QtyOnOrder', $object->GetDBField('QtyOnOrder') - $qty);
+				$object->SetDBField('QtyInStock', $object->GetDBField('QtyInStock') + $qty);
+				break;
+
+			case 'OnQtyCancelOrder':
+				$object->SetDBField('QtyOnOrder', $object->GetDBField('QtyOnOrder') - $qty);
+				break;
+		}
+
+		return $object->Update();
+	}
+
+	function ScheduleInventoryAction($action, $prod_id, $qty, $combination_id = 0)
+	{
+		$inv_actions = $this->Application->RecallVar('inventory_actions');
+		if (!$inv_actions) {
+			$inv_actions = Array();
+		}
+		else {
+			$inv_actions = unserialize($inv_actions);
+		}
+
+		array_push($inv_actions, Array('action' => $action, 'product_id' => $prod_id, 'combination_id' => $combination_id, 'qty' => $qty));
+
+		$this->Application->StoreVar('inventory_actions', serialize($inv_actions));
+	}
+
+	function RealInventoryAction($action, $prod_id, $qty, $combination_id)
+	{
+		$product =& $this->Application->recallObject('p.liveitem', null, Array('skip_autoload' => true));
+		$product->SwitchToLive();
+		$product->Load($prod_id);
+
+		$this->modifyInventory($action, $product, $qty, $combination_id);
+	}
+
+	function RunScheduledInventoryActions(&$event)
+	{
+		$inv_actions = $this->Application->GetVar('inventory_actions');
+		if (!$inv_actions) {
+			return;
+		}
+		$inv_actions = unserialize($inv_actions);
+
+		$products = array();
+		foreach($inv_actions as $an_action) {
+			$this->RealInventoryAction($an_action['action'], $an_action['product_id'], $an_action['qty'], $an_action['combination_id']);
+			array_push($products, $an_action['product_id'].'_'.$an_action['combination_id']);
+		}
+
+		$products = array_unique($products);
+		if ($products) {
+			$product_obj =& $this->Application->recallObject('p.liveitem', null, Array('skip_autoload' => true));
+			$product_obj->SwitchToLive();
+			foreach ($products as $product_key) {
+				list($prod_id, $combination_id) = explode('_', $product_key);
+			$product_obj->Load($prod_id);
+				$this->FullfillBackOrders($product_obj, $combination_id);
+			}
+		}
+	}
+
+	/**
+	 * In case if products arrived into inventory and they are required by old (non processed) orders, then use them (products) in that orders
+	 *
+	 * @param ProductsItem $product
+	 * @param int $combination_id
+	 */
+	function FullfillBackOrders(&$product, $combination_id)
+	{
+		if ( !$this->Application->ConfigValue('Comm_Process_Backorders_Auto') ) return;
+
+		if ($combination_id && ($product->GetDBField('InventoryStatus') == 2)) {
+			// if combination id present and inventory by combinations
+			$poc_idfield = $this->Application->getUnitOption('poc', 'IDField');
+			$poc_tablename = $this->Application->getUnitOption('poc', 'TableName');
+			$sql = 'SELECT QtyInStock
+					FROM '.$poc_tablename.'
+					WHERE '.$poc_idfield.' = '.$combination_id;
+			$stock_qty = $this->Conn->GetOne($sql);
+		}
+		else {
+			// inventory by product
+			$stock_qty = $product->GetDBField('QtyInStock');
+		}
+
+		$qty = (int) $stock_qty - $product->GetDBField('QtyInStockMin');
+		$prod_id = $product->GetID();
+		if ($prod_id <= 0 || !$prod_id || $qty <= 0) return;
+
+		//selecting up to $qty backorders with $prod_id where full qty is not reserved
+		$query = 'SELECT '.TABLE_PREFIX.'Orders.OrderId
+							FROM '.TABLE_PREFIX.'OrderItems
+					LEFT JOIN '.TABLE_PREFIX.'Orders ON '.TABLE_PREFIX.'Orders.OrderId = '.TABLE_PREFIX.'OrderItems.OrderId
+					WHERE (ProductId = '.$prod_id.') AND (Quantity > QuantityReserved) AND (Status = '.ORDER_STATUS_BACKORDERS.')
+							GROUP BY '.TABLE_PREFIX.'Orders.OrderId
+							ORDER BY OrderDate ASC
+							LIMIT 0,'.$qty; //assuming 1 item per order - minimum possible
+
+		$orders = $this->Conn->GetCol($query);
+
+		if (!$orders) return;
+
+		$order =& $this->Application->recallObject('ord.-inv', null, Array('skip_autoload' => true));
+		foreach ($orders as $ord_id) {
+			$order->Load($ord_id);
+
+			$email_event_admin =& $this->Application->EmailEventAdmin('BACKORDER.FULLFILL');
+
+			//reserve what's possible in any case
+			$this->Application->HandleEvent( $event, 'ord:OnReserveItems' );
+			if ($event->status == erSUCCESS) { //
+				//in case the order is ready to process - process it
+				$this->Application->HandleEvent( $event, 'ord:OnOrderProcess' );
+			}
+		}
+	}
+
+	function OnBeforeDeleteFromLive(&$event)
+	{
+		$id = $event->getEventParam('id');
+		$product =& $this->Application->recallObject($event->Prefix.'.itemlive', null, Array('skip_autoload' => true));
+		$product->SwitchToLive();
+		if (!$product->Load($id)) return ; // this will make sure New product will not be overwritten with empty data
+
+		$temp =& $this->Application->recallObject($event->Prefix.'.itemtemp', null, Array('skip_autoload' => true));
+		$temp->SwitchToTemp();
+		$temp->Load($id);
+
+		$temp->SetDBFieldsFromHash($product->FieldValues, Array('QtyInStock','QtyReserved','QtyBackOrdered','QtyOnOrder'));
+		$temp->Update();
+	}
+
+	function clearSelectedIDs(&$event)
+	{
+		parent::clearSelectedIDs($event);
+		$this->Application->SetVar('inventory_actions', $this->Application->RecallVar('inventory_actions'));
+		$this->Application->RemoveVar('inventory_actions');
+	}
+
+	function OnSave(&$event)
+	{
+		$res = parent::OnSave($event);
+		if ($event->status == erSUCCESS) {
+			$this->RunScheduledInventoryActions($event);
+		}
+		return $res;
+	}
+
+	function OnPreCreate(&$event)
+	{
+		parent::onPreCreate($event);
+		$object =& $event->GetObject();
+		$object->SetDBField('Type', $this->Application->GetVar( $event->getPrefixSpecial(true).'_new_type' ));
+	}
+
+
+	function OnPreSaveAndGo(&$event) {
+
+		$event->CallSubEvent('OnPreSave');
+		$this->LoadItem($event);
+		$object =& $event->getObject();
+		$from_type = $object->GetDBField('Type');
+		if ($event->status==erSUCCESS) {
+			$this->Application->SetVar($event->Prefix_Special.'_id', $this->Application->GetVar($event->getPrefixSpecial(true).'_GoId'));
+			$this->LoadItem($event);
+			$to_type = $object->GetDBField('Type');
+
+			if ($from_type != $to_type) {
+				$from_tabs = $this->GetTabs($from_type);
+				$from_tab_i = array_search($this->Application->GetVar('t'), $from_tabs);
+
+				$to_tabs = $this->GetTabs($to_type);
+				$to_tab = $this->Application->GetVar('t');
+
+				$found = false;
+				while ( !isset($to_tabs[$from_tab_i]) && $from_tab_i < count($to_tabs)) {
+					$from_tab_i++;
+				}
+				if ( !isset($to_tabs[$from_tab_i]) ) $from_tab_i = 0;
+				$to_tab = $to_tabs[$from_tab_i];
+
+				$event->redirect = $to_tab;
+			}
+		}
+	}
+
+	function GetTabs($type)
+	{
+		switch($type)
+		{
+			case 1:
+				return Array(
+					0 => 'in-commerce/products/products_edit',
+					1 => 'in-commerce/products/products_inventory',
+					2 => 'in-commerce/products/products_pricing',
+					3 => 'in-commerce/products/products_categories',
+					4 => 'in-commerce/products/products_images',
+					5 => 'in-commerce/products/products_reviews',
+					6 => 'in-commerce/products/products_custom',
+				);
+
+			case 2:
+				return Array(
+					0 => 'in-commerce/products/products_edit',
+					1 => 'in-commerce/products/products_access',
+					/*2 => 'in-commerce/products/products_access_pricing',*/
+					3 => 'in-commerce/products/products_categories',
+					4 => 'in-commerce/products/products_images',
+					5 => 'in-commerce/products/products_reviews',
+					6 => 'in-commerce/products/products_custom',
+				);
+
+			case 3:
+				return Array(
+					0 => 'in-commerce/products/products_edit',
+
+					2 => 'in-commerce/products/products_access_pricing',
+					3 => 'in-commerce/products/products_categories',
+					4 => 'in-commerce/products/products_images',
+					5 => 'in-commerce/products/products_reviews',
+					6 => 'in-commerce/products/products_custom',
+				);
+
+			case 4:
+				return Array(
+					0 => 'in-commerce/products/products_edit',
+
+					2 => 'in-commerce/products/products_files',
+					3 => 'in-commerce/products/products_categories',
+					4 => 'in-commerce/products/products_images',
+					5 => 'in-commerce/products/products_reviews',
+					6 => 'in-commerce/products/products_custom',
+				);
+		}
+	}
+
+	/**
+	 * Return type clauses for list bulding on front
+	 *
+	 * @param kEvent $event
+	 * @return Array
+	 */
+	function getTypeClauses(&$event)
+	{
+		$types=$event->getEventParam('types');
+		$except_types=$event->getEventParam('except');
+		$object =& $event->getObject();
+		$type_clauses = parent::getTypeClauses($event);
+
+		$type_clauses['featured']['include']='%1$s.Featured=1 AND '.TABLE_PREFIX.'CategoryItems.PrimaryCat = 1';
+		$type_clauses['featured']['except']='%1$s.Featured!=1 AND '.TABLE_PREFIX.'CategoryItems.PrimaryCat = 1';
+		$type_clauses['featured']['having_filter']=false;
+
+		$type_clauses['onsale']['include']='%1$s.OnSale=1 AND '.TABLE_PREFIX.'CategoryItems.PrimaryCat = 1';
+		$type_clauses['onsale']['except']='%1$s.OnSale!=1 AND '.TABLE_PREFIX.'CategoryItems.PrimaryCat = 1';
+		$type_clauses['onsale']['having_filter']=false;
+
+		// products from selected manufacturer: begin
+		$manufacturer = $event->getEventParam('manufacturer');
+		if ( !$manufacturer ) {
+			$manufacturer = $this->Application->GetVar('manuf_id');
+		}
+		if ( $manufacturer ) {
+			$type_clauses['manufacturer']['include'] = '%1$s.ManufacturerId='.$manufacturer.' AND PrimaryCat = 1';
+			$type_clauses['manufacturer']['except'] = '%1$s.ManufacturerId!='.$manufacturer.' AND PrimaryCat = 1';
+			$type_clauses['manufacturer']['having_filter'] = false;
+		}
+		// products from selected manufacturer: end
+
+		// recent products: begin
+		$recent = $this->Application->RecallVar('recent_products');
+		if ($recent) {
+			$recent = unserialize($recent);
+			$type_clauses['recent']['include'] = '%1$s.ProductId IN ('.implode(',', $recent).') AND PrimaryCat = 1';
+			$type_clauses['recent']['except'] = '%1$s.ProductId NOT IN ('.implode(',', $recent).') AND PrimaryCat = 1';
+		}
+		else {
+			$type_clauses['recent']['include']='0';
+			$type_clauses['recent']['except']='1';
+		}
+		$type_clauses['recent']['having_filter']=false;
+		// recent products: end
+
+		// products already in shopping cart: begin
+		if (strpos($types, 'in_cart') !== false || strpos($except_types, 'in_cart') !== false) {
+			$order_id = $this->Application->RecallVar('ord_id');
+			if ($order_id) {
+				$in_cart = $this->Conn->GetCol('SELECT ProductId FROM '.TABLE_PREFIX.'OrderItems WHERE OrderId = '.$order_id);
+				if ($in_cart) {
+					$type_clauses['in_cart']['include'] = '%1$s.ProductId IN ('.implode(',', $in_cart).') AND PrimaryCat = 1';
+					$type_clauses['in_cart']['except'] = '%1$s.ProductId NOT IN ('.implode(',', $in_cart).') AND PrimaryCat = 1';
+				}
+				else {
+					$type_clauses['in_cart']['include']='0';
+					$type_clauses['in_cart']['except']='1';
+				}
+			}
+			else {
+				$type_clauses['in_cart']['include']='0';
+				$type_clauses['in_cart']['except']='1';
+			}
+			$type_clauses['in_cart']['having_filter']=false;
+		}
+		// products already in shopping cart: end
+
+		// my downloadable products: begin
+		if (strpos($types, 'my_downloads') !== false || strpos($except_types, 'my_downloads') !== false)
+		{
+			$user_id = $this->Application->RecallVar('user_id');
+			$my_downloads = ($user_id > 0) ? $this->Conn->GetCol('SELECT ProductId FROM '.TABLE_PREFIX.'UserFileAccess WHERE PortalUserId = '.$user_id) : false;
+			if ($my_downloads)
+			{
+				$type_clauses['my_downloads']['include'] = '%1$s.ProductId IN ('.implode(',', $my_downloads).') AND PrimaryCat = 1';
+				$type_clauses['my_downloads']['except'] = '%1$s.ProductId NOT IN ('.implode(',', $my_downloads).') AND PrimaryCat = 1';
+			}
+			else
+			{
+				$type_clauses['my_downloads']['include'] = '0';
+				$type_clauses['my_downloads']['except'] = '1';
+			}
+
+			$type_clauses['my_downloads']['having_filter'] = false;
+		}
+		// my downloadable products: end
+
+		// my favorite products: begin
+		if (strpos($types, 'wish_list') !== false || strpos($except_types, 'wish_list') !== false) {
+			$sql = 'SELECT ResourceId FROM '.$this->Application->getUnitOption('fav', 'TableName').'
+					WHERE PortalUserId = '.(int)$this->Application->RecallVar('user_id');
+			$wishlist_ids = $this->Conn->GetCol($sql);
+			if ($wishlist_ids) {
+				$type_clauses['wish_list']['include'] = '%1$s.ResourceId IN ('.implode(',', $wishlist_ids).') AND PrimaryCat = 1';
+				$type_clauses['wish_list']['except'] = '%1$s.ResourceId NOT IN ('.implode(',', $wishlist_ids).') AND PrimaryCat = 1';
+			}
+			else {
+				$type_clauses['wish_list']['include']='0';
+				$type_clauses['wish_list']['except']='1';
+			}
+			$type_clauses['wish_list']['having_filter']=false;
+		}
+		// my favorite products: end
+
+		// products from package: begin
+		if (strpos($types, 'content') !== false) {
+			$object->removeFilter('category_filter');
+			$object->AddGroupByField('%1$s.ProductId');
+
+			$item_type = $this->Application->getUnitOption('p', 'ItemType');
+
+			$object_product = &$this->Application->recallObject($event->Prefix);
+
+			$content_ids_array = $object_product->GetPackageContentIds();
+
+			if (sizeof($content_ids_array)==0) {
+				$content_ids_array = array('-1');
+			}
+
+			if (sizeof($content_ids_array)>0) {
+				$type_clauses['content']['include'] = '%1$s.ProductId IN ('.implode(',', $content_ids_array).')';
+			}
+			else {
+				$type_clauses['content']['include']='0';
+			}
+			$type_clauses['related']['having_filter']=false;
+		}
+		// products from package: end
+
+		$object->addFilter('not_virtual', '%1$s.Virtual = 0');
+
+		if ( !$this->Application->IsAdmin() ) {
+			$object->addFilter('expire_filter', '%1$s.Expire IS NULL OR %1$s.Expire > UNIX_TIMESTAMP()');
+		}
+
+		return $type_clauses;
+	}
+
+	function OnClearRecent(&$event)
+	{
+		$this->Application->RemoveVar('recent_products');
+	}
+
+	/**
+	 * Occurs, when user rates a product
+	 *
+	 * @param kEvent $event
+	 */
+	function OnRateProduct(&$event)
+	{
+		$event->redirect_params = Array('pass' => 'all,p');
+		$event->redirect = $this->Application->GetVar('success_template');
+
+		$object =& $event->getObject();
+		$user_id = ($this->Application->RecallVar('user_id') == 0) ? -2 : $this->Application->RecallVar('user_id');
+
+		$sql = '	SELECT * FROM '.TABLE_PREFIX.'SpamControl
+					WHERE ItemResourceId='.$object->GetDBField('ResourceId').'
+					AND IPaddress="'.$_SERVER['REMOTE_ADDR'].'"
+					AND PortalUserId='.$user_id.'
+					AND DataType="Rating"';
+		$res = $this->Conn->GetRow($sql);
+
+		if( $res && $res['Expire'] < adodb_mktime() )
+		{
+			$sql = '	DELETE FROM '.TABLE_PREFIX.'SpamControl
+						WHERE ItemResourceId='.$object->GetDBField('ResourceId').'
+						AND IPaddress="'.$_SERVER['REMOTE_ADDR'].'"
+						AND PortalUserId='.$user_id.'
+						AND DataType="Rating"';
+			$this->Conn->Query($sql);
+			unset($res);
+		}
+
+		$new_rating = $this->Application->GetVar('rating');
+
+		if($new_rating !== false && !$res)
+		{
+			$rating = $object->GetDBField('CachedRating');
+			$votes = $object->GetDBField('CachedVotesQty');
+			$new_votes = $votes + 1;
+
+			$rating = (($rating * $votes) + $new_rating) / $new_votes;
+			$object->SetDBField('CachedRating', $rating);
+			$object->SetDBField('CachedVotesQty', $new_votes);
+			$object->Update();
+
+			$expire = adodb_mktime() + $this->Application->ConfigValue('product_ReviewDelay_Value') * $this->Application->ConfigValue('product_ReviewDelay_Interval');
+			$sql = '	INSERT INTO '.TABLE_PREFIX.'SpamControl
+							(ItemResourceId, IPaddress, PortalUserId, DataType, Expire)
+						VALUES ('.$object->GetDBField('ResourceId').',
+								"'.$_SERVER['REMOTE_ADDR'].'",
+								'.$user_id.',
+								"Rating",
+								'.$expire.')';
+			$this->Conn->Query($sql);
+		}
+		else
+		{
+			$event->status == erFAIL;
+			$event->redirect=false;
+			$object->FieldErrors['CachedRating']['pseudo'] = 'too_frequent';
+			$object->ErrorMsgs['too_frequent'] = $this->Application->Phrase('lu_ferror_rate_duplicate');
+		}
+	}
+
+	function OnCancelAction(&$event)
+	{
+		$event->redirect_params = Array('pass' => 'all,p');
+		$event->redirect = $this->Application->GetVar('cancel_template');
+	}
+
+	function OnRecommendProduct(&$event)
+	{
+		// used for error reporting only -> rewrite code + theme (by Alex)
+		$object =& $this->Application->recallObject('u', null, Array('skip_autoload' => true)); // TODO: change theme too
+
+		$friend_email = $this->Application->GetVar('friend_email');
+		$friend_name = $this->Application->GetVar('friend_name');
+		$my_email = $this->Application->GetVar('your_email');
+		$my_name = $this->Application->GetVar('your_name');
+		$my_message = $this->Application->GetVar('your_message');
+
+		$send_params = array();
+		$send_params['to_email']=$friend_email;
+		$send_params['to_name']=$friend_name;
+		$send_params['from_email']=$my_email;
+		$send_params['from_name']=$my_name;
+		$send_params['message']=$my_message;
+
+		if (eregi("^[a-z0-9]+([-_\.]?[a-z0-9])+@[a-z0-9]+([-_\.]?[a-z0-9])+\.[a-z]{2,4}", $friend_email))
+	    {
+			$user_id = $this->Application->RecallVar('user_id');
+			$email_event = &$this->Application->EmailEventUser('PRODUCT.SUGGEST', $user_id, $send_params);
+			if ($email_event->status == erSUCCESS){
+				$event->redirect_params = array('opener' => 's', 'pass' => 'all');
+				$event->redirect = $this->Application->GetVar('template_success');
+			}
+			else {
+//					$event->redirect_params = array('opener' => 's', 'pass' => 'all');
+//					$event->redirect = $this->Application->GetVar('template_fail');
+
+				$object->ErrorMsgs['send_error'] = $this->Application->Phrase('lu_email_send_error');
+				$object->FieldErrors['Email']['pseudo'] = 'send_error';
+				$event->status = erFAIL;
+			}
+	    }
+	    else {
+			$object->ErrorMsgs['invalid_email'] = $this->Application->Phrase('lu_InvalidEmail');
+			$object->FieldErrors['Email']['pseudo'] = 'invalid_email';
+			$event->status = erFAIL;
+	    }
+	}
+
+	/**
+	 * Creates/updates virtual product based on listing type data
+	 *
+	 * @param kEvent $event
+	 */
+	function OnSaveVirtualProduct(&$event)
+	{
+		$object =& $event->getObject( Array('skip_autoload' => true) );
+		$listing_type =& $this->Application->recallObject('lst', null, Array('skip_autoload' => true));
+		$listing_type->Load($event->MasterEvent->getEventParam('id'));
+
+		$product_id = $listing_type->GetDBField('VirtualProductId');
+
+		if ($product_id) {
+			$object->Load($product_id);
+		}
+
+		if (!$listing_type->GetDBField('EnableBuying')) {
+			if ($product_id) {
+				// delete virtual product here
+				$temp_handler =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
+				$temp_handler->DeleteItems($event->Prefix, $event->Special, Array($product_id));
+
+				$listing_type->SetDBField('VirtualProductId', 0);
+				$listing_type->Update();
+			}
+			return true;
+		}
+
+		$ml_formatter =& $this->Application->recallObject('kMultiLanguage');
+		$object->SetDBField($ml_formatter->LangFieldName('Name'), $listing_type->GetDBField('ShopCartName') );
+		$object->SetDBField($ml_formatter->LangFieldName('Description'), $listing_type->GetDBField('Description'));
+		$object->SetDBField('SKU', 'ENHANCE_LINK_'.abs( crc32( $listing_type->GetDBField('Name') ) ) );
+
+		if ($product_id) {
+			$object->Update();
+		}
+		else {
+			$object->SetDBField('Type', 2);
+			$object->SetDBField('Status', 1);
+			$object->SetDBField('HotItem', 0);
+			$object->SetDBField('PopItem', 0);
+			$object->SetDBField('NewItem', 0);
+			$object->SetDBField('Virtual', 1);
+
+//			$processing_data = Array('ApproveEvent' => 'ls:EnhanceLinkAfterOrderApprove', 'ExpireEvent' => 'ls:ExpireLink');
+			$processing_data = Array(	'ApproveEvent'			=>	'ls:EnhanceLinkAfterOrderApprove',
+										'DenyEvent'				=>	'ls:EnhanceLinkAfterOrderDeny',
+										'CompleteOrderEvent'	=>	'ls:EnhancedLinkOnCompleteOrder',
+										'ExpireEvent'			=>	'ls:ExpireLink',
+										'HasNewProcessing'		=>	1);
+			$object->SetDBField('ProcessingData', serialize($processing_data));
+			$object->Create();
+
+			$listing_type->SetDBField('VirtualProductId', $object->GetID());
+			$listing_type->Update();
+		}
+
+		$additiona_fields = Array(	'AccessDuration'	=>	$listing_type->GetDBField('Duration'),
+									'AccessUnit'		=>	$listing_type->GetDBField('DurationType'),
+							);
+		$this->setPrimaryPrice($object->GetID(), (double)$listing_type->GetDBField('Price'), $additiona_fields);
+	}
+
+	/**
+	 * [HOOK] Deletes virtual product when listing type is deleted
+	 *
+	 * @param kEvent $event
+	 */
+	function OnDeleteListingType(&$event)
+	{
+		$listing_type = $event->MasterEvent->getObject();
+		$product_id = $listing_type->GetDBField('VirtualProductId');
+
+		if ($product_id) {
+			$temp_handler =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
+			$temp_handler->DeleteItems($event->Prefix, $event->Special, Array($product_id));
+		}
+	}
+
+	/**
+	 * Extends user membership in group when his order is approved
+	 *
+	 * @param kEvent $event
+	 */
+	function OnSubscriptionApprove(&$event)
+	{
+		$field_values = $event->getEventParam('field_values');
+		$item_data = unserialize($field_values['ItemData']);
+
+		if (!getArrayValue($item_data,'PortalGroupId')) {
+			// is subscription product, but no group defined in it's properties
+			trigger_error('Invalid product <b>'.$field_values['ProductName'].'</b> (id: '.$field_values['ProductId'].')');
+			return false;
+		}
+
+		$order_table = $this->Application->getUnitOption('ord', 'TableName');
+		$order_idfield = $this->Application->getUnitOption('ord', 'IDField');
+		$sql = 'SELECT PortalUserId FROM %s WHERE %s = %s';
+		$user_id = $this->Conn->GetOne( sprintf($sql, $order_table, $order_idfield, $field_values['OrderId']) );
+
+		$group_id = $item_data['PortalGroupId'];
+		$duration = $item_data['Duration'];
+
+		$sql = 'SELECT * FROM '.TABLE_PREFIX.'UserGroup WHERE PortalUserId = %s';
+		$user_groups = $this->Conn->Query( sprintf($sql, $user_id), 'GroupId' );
+
+		$sql = 'REPLACE INTO '.TABLE_PREFIX.'UserGroup (PortalUserId,GroupId,MembershipExpires,PrimaryGroup) VALUES (%s,%s,%s,%s)';
+		if( !isset($user_groups[$group_id]) )
+		{
+			$primary_group = count($user_groups) == 0 ? 1 : 0;
+			$expire = adodb_mktime() + $duration;
+		}
+		else {
+			$primary_group = $user_groups[$group_id]['PrimaryGroup'];
+			$expire = $user_groups[$group_id]['MembershipExpires'];
+			$expire = $expire < adodb_mktime() ? adodb_mktime() + $duration : $expire + $duration;
+		}
+
+/*
+		// Customization healtheconomics.org
+		if ($item_data['DurationType'] == 2) {
+			$expire = $item_data['AccessExpiration'];
+		}
+		// Customization healtheconomics.org --
+*/
+		$this->Conn->Query( sprintf($sql, $user_id, $group_id, $expire, $primary_group) );
+
+		$sub_order =& $this->Application->recallObject('ord.-sub'.$event->getEventParam('next_sub_number'), 'ord');
+		$sub_order->SetDBField('IsRecurringBilling', getArrayValue($item_data, 'IsRecurringBilling') ? 1 : 0);
+		$sub_order->SetDBField('GroupId', $group_id);
+		$sub_order->SetDBField('NextCharge_date', $expire);
+		$sub_order->SetDBField('NextCharge_time', $expire);
+	}
+
+
+
+	function OnDownloadableApprove(&$event)
+	{
+		$field_values = $event->getEventParam('field_values');
+		$product_id = $field_values['ProductId'];
+		$sql = 'SELECT PortalUserId FROM '.$this->Application->getUnitOption('ord', 'TableName').'
+				WHERE OrderId = '.$field_values['OrderId'];
+		$user_id = $this->Conn->GetOne($sql);
+		$sql = 'INSERT INTO '.TABLE_PREFIX.'UserFileAccess VALUES("", '.$product_id.', '.$user_id.')';
+		$this->Conn->Query($sql);
+	}
+
+	function OnPackageApprove(&$event){
+		$field_values = $event->getEventParam('field_values');
+		$item_data = unserialize($field_values['ItemData']);
+		$package_content_ids = $item_data['PackageContent'];
+
+
+
+		$object_item = &$this->Application->recallObject('p.packageitem', null, array('skip_autoload'=>true));
+		foreach ($package_content_ids as $package_item_id) {
+			$object_field_values = array();
+					// query processing data from product and run approve event
+			$sql = 'SELECT ProcessingData FROM '.TABLE_PREFIX.'Products WHERE ProductId = '.$package_item_id;
+			$processing_data = $this->Conn->GetOne($sql);
+			if($processing_data)
+			{
+				$processing_data = unserialize($processing_data);
+				$approve_event = new kEvent($processing_data['ApproveEvent']);
+
+				//$order_item_fields = $this->Conn->GetRow('SELECT * FROM '.TABLE_PREFIX.'OrderItems WHERE OrderItemId = '.$grouping_data[1]);
+				$object_item->Load($package_item_id);
+
+				$object_field_values['OrderId'] = $field_values['OrderId'];
+				$object_field_values['ProductId'] = $package_item_id;
+
+				$object_field_values['ItemData'] = serialize($item_data['PackageItemsItemData'][$package_item_id]);
+
+				$approve_event->setEventParam('field_values', $object_field_values);
+				$this->Application->HandleEvent($approve_event);
+			}
+
+
+		}
+
+	}
+
+	function OnPreSave(&$event)
+	{
+		$this->CheckRequiredOptions($event);
+		parent::OnPreSave($event);
+
+		$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
+		if ($items_info) {
+			foreach ($items_info as $id => $field_values) {
+				$primary_price = getArrayValue($field_values, 'Price');
+				$this->setPrimaryPrice($id, $primary_price);
+			}
+		}
+	}
+
+	function CheckRequiredOptions(&$event)
+	{
+		$object =& $event->getObject();
+		if ($object->GetDBField('ProductId') == '') return ; // if product does not have ID - it's not yet created
+		$opt_object =& $this->Application->recallObject('po', null, Array('skip_autoload' => true) );
+		$has_required = $this->Conn->GetOne('SELECT COUNT(*) FROM '.$opt_object->TableName.' WHERE Required = 1 AND ProductId = '.$object->GetDBField('ProductId'));
+		//we need to imitate data sumbit, as parent' PreSave sets object values from $items_info
+		$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
+		$items_info[$object->GetDBField('ProductId')]['HasRequiredOptions'] = $has_required ? 1:0;
+		$this->Application->SetVar($event->getPrefixSpecial(true), $items_info);
+		$object->SetDBField('HasRequiredOptions', $has_required ? 1:0);
+	}
+
+	/**
+	 * Sets required price in primary price backed, if it's missing, then create it
+	 *
+	 * @param int $product_id
+	 * @param double $price
+	 * @param Array $additional_fields
+	 * @return bool
+	 */
+	function setPrimaryPrice($product_id, $price, $additional_fields = Array())
+	{
+		$pr_object =& $this->Application->recallObject('pr.-item', null, Array('skip_autoload' => true) );
+		/* @var $pr_object kDBItem */
+
+		$pr_object->Load( Array('ProductId' => $product_id, 'IsPrimary' => 1) );
+
+		$sql = 'SELECT COUNT(*) FROM '.$pr_object->TableName.' WHERE ProductId = '.$product_id;
+		$has_pricings = $this->Conn->GetOne($sql);
+
+		if ($additional_fields) {
+			$pr_object->SetDBFieldsFromHash($additional_fields);
+		}
+
+		if( ($price === false) && $has_pricings ) return false;
+
+		if( $pr_object->isLoaded() )
+		{
+			$pr_object->SetField('Price', $price);
+			return $pr_object->Update();
+		}
+		else
+		{
+			$group_id = $this->Application->ConfigValue('User_LoggedInGroup');
+			$field_values = Array('ProductId' => $product_id, 'IsPrimary' => 1, 'MinQty' => 1, 'MaxQty' => -1, 'GroupId'=>$group_id);
+			$pr_object->SetDBFieldsFromHash($field_values);
+			$pr_object->SetField('Price', $price);
+			$ret = $pr_object->Create();
+			if ($pr_object->mode == 't') {
+				$pr_object->setTempID();
+			}
+			return $ret;
+		}
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnAfterItemDelete(&$event)
+	{
+		$product_id = $event->getEventParam('id');
+		if(!$product_id)
+		{
+			return;
+		}
+		$sql = 'DELETE FROM '.TABLE_PREFIX.'UserFileAccess
+				WHERE ProductId = '.$product_id;
+		$this->Conn->Query($sql);
+	}
+
+	/**
+	 * Load price from temp table if product mode is temp table
+	 *
+	 * @param kEvent $event
+	 */
+	function OnAfterItemLoad(&$event)
+	{
+		parent::OnAfterItemLoad($event);
+
+		$object =& $event->getObject();
+		$a_pricing = $object->getPrimaryPricing();
+		$object->SetDBField('Price', floatval($a_pricing['Price']));
+		$object->SetDBField('Cost',  floatval($a_pricing['Cost']));
+	}
+
+	/**
+	 * Allows to add products to package besides all that parent method does
+	 *
+	 * @param kEvent $event
+	 */
+	function OnProcessSelected(&$event)
+	{
+		$dst_field = $this->Application->RecallVar('dst_field');
+
+		if ($dst_field == 'PackageContent') {
+			$this->OnAddToPackage($event);
+		}
+		elseif ($dst_field == 'AssignedCoupon') {
+			$coupon_id = $this->Application->GetVar('selected_ids');
+			$object =& $event->getObject();
+			$object->SetDBField('AssignedCoupon', $coupon_id);
+			$this->RemoveRequiredFields($object);
+			$object->Update();
+		}
+		else {
+			parent::OnProcessSelected($event);
+		}
+		$this->finalizePopup($event);
+	}
+
+	/**
+	 * Called when some products are selected in products selector for this prefix
+	 *
+	 * @param kEvent $event
+	 */
+	function OnAddToPackage(&$event)
+	{
+		$selected_ids = $this->Application->GetVar('selected_ids');
+
+		// update current package content with selected products
+
+		$object =& $event->getObject();
+		/* @var $object ProductsItem */
+
+		$product_ids = $selected_ids['p'] ? explode(',', $selected_ids['p']) : Array();
+
+		if ($product_ids) {
+			$current_ids = $object->GetPackageContentIds();
+			$current_ids = array_unique(array_merge($current_ids, $product_ids));
+
+			// remove package product from selected list
+			$this_product = array_search($object->GetID(), $current_ids);
+			if ($this_product !== false) {
+				unset($current_ids[$this_product]);
+			}
+
+			$dst_field = $this->Application->RecallVar('dst_field');
+			$object->SetDBField($dst_field, '|'.implode('|', $current_ids).'|');
+
+			$object->Update();
+			$this->ProcessPackageItems($event);
+		}
+
+		$this->finalizePopup($event);
+	}
+
+
+	function ProcessPackageItems(&$event)
+	{
+		//$this->Application->SetVar('p_mode', 't');
+
+		$object =& $event->getObject();
+		/* @var $object ProductsItem */
+
+		$content_ids = $object->GetPackageContentIds();
+
+		if (sizeof($content_ids) > 0) {
+			$total_weight = $this->Conn->GetOne('SELECT SUM(Weight) FROM '.TABLE_PREFIX.'Products WHERE ProductId IN ('.implode(', ', $content_ids).') AND Type=1');
+
+			if (!$total_weight) $total_weight = 0;
+
+			$this->Conn->Query('UPDATE '.$object->TableName.' SET Weight='.$total_weight.' WHERE ProductId='.$object->GetID());
+		}
+
+		/*
+		$this->Application->SetVar('p_mode', false);
+
+		$list = &$this->Application->recallObject('p.content', 'p_List', array('types'=>'content'));
+
+		$this->Application->SetVar('p_mode', 't');
+
+		$list->Query();
+
+		$total_weight_a = 0;
+		$total_weight_b = 0;
+
+		$list->GoFirst();
+
+		while (!$list->EOL())
+		{
+			if ($list->GetDBField('Type')==1){
+				$total_weight_a += $list->GetField('Weight_a');
+				$total_weight_b += $list->GetField('Weight_b');
+			}
+			$list->GoNext();
+		}
+
+		$object->SetField('Weight_a', $total_weight_a);
+		$object->SetField('Weight_b', $total_weight_b);
+		*/
+		//$object->Update();
+
+
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+
+	function OnSaveItems(&$event)
+	{
+		//$event->CallSubEvent('OnUpdate');
+		$event->redirect = false;
+		//$event->redirect_params = Array('opener'=>'s','pass'=>'all,p');
+
+
+	}
+
+	/**
+	 * Removes product from package
+	 *
+	 * @param kEvent $event
+	 */
+	function OnRemovePackageItem(&$event) {
+
+		$this->Application->SetVar('p_mode', 't');
+
+		$object =& $event->getObject();
+
+		$items_info = $this->Application->GetVar('p_content');
+
+		if($items_info)
+		{
+			$product_ids = array_keys($items_info);
+
+			$current_ids = $object->GetPackageContentIds();
+
+			$current_ids_flip = array_flip($current_ids);
+			foreach($product_ids as $key=>$val){
+				unset($current_ids_flip[$val]);
+			}
+			$current_ids = array_keys($current_ids_flip);
+			$current_ids_str = '|'.implode('|', array_unique($current_ids)).'|';
+			$object->SetDBField('PackageContent', $current_ids_str);
+		}
+
+		$object->Update();
+		$this->ProcessPackageItems($event);
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+
+	function OnBeforeItemDelete(&$event){
+
+		$object = &$event->getObject();
+
+		$product_includes_in = $this->Conn->GetOne('SELECT COUNT(*) FROM '.TABLE_PREFIX.'Products WHERE PackageContent LIKE "%|'.$object->GetID().'%"');
+		if ($product_includes_in > 0){
+			$event->status=erFAIL;
+		}
+	}
+
+	/**
+	 * Returns specific to each item type columns only
+	 *
+	 * @param kEvent $event
+	 * @return Array
+	 */
+	function getCustomExportColumns(&$event)
+	{
+		$columns = parent::getCustomExportColumns($event);
+		$new_columns = Array(
+			'__VIRTUAL__Price' => 'Price',
+			'__VIRTUAL__Cost' => 'Cost',
+		);
+		return array_merge_recursive2($columns, $new_columns);
+	}
+
+/**
+	 * Sets non standart virtual fields (e.g. to other tables)
+	 *
+	 * @param kEvent $event
+	 */
+	function setCustomExportColumns(&$event)
+	{
+		parent::setCustomExportColumns($event);
+
+		$object =& $event->getObject();
+		$this->setPrimaryPrice($object->GetID(), (double)$object->GetDBField('Price'), Array('Cost' => (double)$object->GetDBField('Cost')) );
+	}
+
+	function OnPreSaveAndOpenPopup(&$event)
+	{
+		$object =& $event->getObject();
+		$this->RemoveRequiredFields($object);
+		$event->CallSubEvent('OnPreSave');
+
+		$event->redirect = $this->Application->GetVar('t');
+		// pass ID too, in case if product is created by OnPreSave call to ensure proper editing
+		$event->redirect_params =	Array(
+											'pass' => 'all',
+											$event->getPrefixSpecial(true).'_id' => $object->GetID(),
+									);
+	}
+
+
+	function getPassedId(&$event)
+	{
+		$event->setEventParam('raise_warnings', 0);
+		$passed = parent::getPassedID($event);
+
+		if ($passed) {
+			return $passed;
+		}
+
+		if ($this->Application->IsAdmin()) {
+			// we may get product id out of OrderItem, if it exists
+			$ord_item =& $this->Application->recallObject('orditems', null, Array ('raise_warnings' => 0));
+			if ($ord_item->GetDBField('ProductId')) {
+				$passed = $ord_item->GetDBField('ProductId');
+			}
+		}
+
+		return $passed;
+	}
+
+	function OnAfterConfigRead(&$event)
+	{
+		parent::OnAfterConfigRead($event);
+
+		$user_id = $this->Application->RecallVar('user_id');
+		if (!is_numeric($user_id)) {
+			return ;
+		}
+
+		$calculated_fields = $this->Application->getUnitOption($event->Prefix, 'CalculatedFields');
+		$sql = 'SELECT GroupId
+				FROM '.TABLE_PREFIX.'UserGroup
+				WHERE PrimaryGroup = 1 AND PortalUserId = '.$user_id;
+		$primary_group = $this->Conn->GetOne($sql);
+		if (!$primary_group) return;
+		$calculated_fields['']['Price'] = '
+			( IFNULL(
+					(	SELECT pp.Price FROM '.TABLE_PREFIX.'ProductsPricing AS pp
+			 			WHERE pp.ProductId = %1$s.ProductId AND GroupId = '.$primary_group.' ORDER BY MinQty LIMIT 0,1
+			 		), pricing.Price
+			 	)
+			)';
+		$this->Application->setUnitOption($event->Prefix, 'CalculatedFields', $calculated_fields);
+	}
+
+	/**
+	 * Starts product editing, remove any pending inventory actions
+	 *
+	 * @param kEvent $event
+	 */
+	function OnEdit(&$event)
+	{
+		$this->Application->RemoveVar('inventory_actions');
+		parent::OnEdit($event);
+	}
+
+	/**
+	 * Adds "Shop Cart" tab on paid listing type editing tab
+	 *
+	 * @param kEvent $event
+	 */
+	function OnModifyPaidListingConfig(&$event)
+	{
+		$edit_tab_presets = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'EditTabPresets');
+		$edit_tab_presets['Default']['shopping_cart'] = Array ('title' => 'la_tab_ShopCartEntry', 't' => 'in-commerce/paid_listings/paid_listing_type_shopcart', 'priority' => 2);
+		$this->Application->setUnitOption($event->MasterEvent->Prefix, 'EditTabPresets', $edit_tab_presets);
+	}
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/products/products_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.84.2.6
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/products/products_item.php
===================================================================
--- branches/5.1.x/in-commerce/units/products/products_item.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/products/products_item.php	(revision 12131)
@@ -0,0 +1,62 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	class ProductsItem extends kCatDBItem
+	{
+		function GetPackageContentIds()
+		{
+			$ids_string = trim($this->GetDBField('PackageContent'), '|');
+			if ($ids_string) {
+				$ids_array = explode('|', $ids_string);
+				return $ids_array;
+			}
+			else {
+				return array();
+			}
+		}
+
+		/**
+		 * Returns field values from primary pricing for product
+		 *
+		 * @return array
+		 */
+		function getPrimaryPricing()
+		{
+			if (!$this->Application->IsAdmin()) {
+				$user_id = $this->Application->RecallVar('user_id');
+				$primary_group = $user_id != -2 ? $this->Conn->GetOne('SELECT GroupId FROM '.TABLE_PREFIX.'UserGroup WHERE PrimaryGroup = 1 AND PortalUserId = '.$user_id) : false;
+				if ($primary_group) {
+					$sql = 'SELECT Price, Cost
+						FROM '.TABLE_PREFIX.'ProductsPricing
+						WHERE (ProductId = '.$this->GetID().') AND (GroupId = '.$primary_group.')
+						ORDER BY MinQty';
+					$a_values = $this->Conn->GetRow($sql);
+					if ($a_values !== false) {
+						return $a_values;
+					}
+				}
+			}
+			$pr_table = $this->Application->getUnitOption('pr', 'TableName');
+			if ($this->mode == 't') {
+				$pr_table = $this->Application->GetTempName($pr_table, 'prefix:'.$this->Prefix);
+			}
+
+			$sql = 'SELECT Price, Cost
+					FROM '.$pr_table.'
+					WHERE ('.$this->IDField.' = '.$this->GetID().') AND (IsPrimary = 1)';
+			return $this->Conn->GetRow($sql);
+		}
+
+	}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/products/products_item.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/affiliate_plans/affiliate_plans_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/affiliate_plans/affiliate_plans_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/affiliate_plans/affiliate_plans_event_handler.php	(revision 12131)
@@ -0,0 +1,92 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class AffiliatePlansEventHandler extends kDBEventHandler {
+
+	function SetCustomQuery(&$event)
+	{
+		if($event->Special == 'active')
+		{
+			$object =& $event->getObject();
+			$object->addFilter('active', '%1$s.Enabled = 1');
+		}
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnSetPrimary(&$event)
+	{
+		$object =& $event->getObject();
+		$object->SetDBField('IsPrimary', 1);
+		$object->Update();
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnBeforeItemUpdate(&$event)
+	{
+		$object =& $event->getObject();
+
+		$live_table = $this->Application->getUnitOption($event->Prefix, 'TableName');
+		$plans_count = $this->Conn->GetOne('SELECT COUNT(*) FROM '.$live_table);
+		if(!$plans_count) $object->SetDBField('IsPrimary', 1);
+
+		if( $object->GetDBField('IsPrimary') && $object->Validate() )
+		{
+			$sql = 'UPDATE '.$this->Application->getUnitOption($event->Prefix, 'TableName').'
+					SET IsPrimary = 0';
+			$this->Conn->Query($sql);
+
+			$status_field = array_shift( $this->Application->getUnitOption($event->Prefix,'StatusField') );
+			$object->SetDBField($status_field, 1);
+		}
+	}
+
+	function OnBeforeItemCreate(&$event)
+	{
+		$this->OnBeforeItemUpdate($event);
+	}
+
+	function OnMassDelete($event)
+	{
+		if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
+			return;
+		}
+		$event->status=erSUCCESS;
+
+		$ids = $this->StoreSelectedIDs($event);
+		$event->setEventParam('ids', $ids );
+		$ids = $event->getEventParam('ids');
+
+		$temp =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
+
+		$sql = 'SELECT AffiliatePlanId FROM '.$this->Application->getUnitOption('ap', 'TableName').'
+				WHERE IsPrimary = 1';
+		$primary_id = $this->Conn->GetOne($sql);
+		$ids = array_diff($ids, Array($primary_id));
+
+		if($ids)
+		{
+			$temp->DeleteItems($event->Prefix, $event->Special, $ids);
+		}
+		$this->clearSelectedIDs($event);
+	}
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/affiliate_plans/affiliate_plans_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/affiliate_plans/affiliate_plans_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/affiliate_plans/affiliate_plans_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/affiliate_plans/affiliate_plans_config.php	(revision 12131)
@@ -0,0 +1,107 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+$config	=	Array(
+					'Prefix'			=>	'ap',
+					'ItemClass'			=>	Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'AffiliatePlansEventHandler','file'=>'affiliate_plans_event_handler.php','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
+					'AutoLoad'			=>	true,
+					'AggregateTags' => Array(
+													),
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'Page',
+												3	=>	'event',
+												4 	=>	'mode',
+											),
+
+					'IDField'			=>	'AffiliatePlanId',
+					'StatusField'		=>	Array('Enabled', 'IsPrimary'),	// field, that is affected by Approve/Decline events
+
+					'TitleField'		=>	'Name',
+					'TitlePresets'		=>	Array(
+												'default'	=>	Array(	'new_status_labels'		=> Array('ap'=>'!la_title_Adding_Affiliate_Plan!'),
+																		'edit_status_labels'	=> Array('ap'=>'!la_title_Editing_Affiliate_Plan!'),
+																		'new_titlefield'		=> Array('ap'=>'!la_title_New_Affiliate_Plan!'),
+																),
+
+												'affiliate_plans_list'	=>	Array('prefixes' => Array('ap_List'), 'format' => "!la_title_AffiliatePlans!"),
+												'affiliate_plans_edit' => Array('prefixes' => Array('ap'), 'format' => "#ap_status# '#ap_titlefield#' - !la_title_General!"),
+												'affiliate_plans_brackets'	=>	Array('prefixes' => Array('ap','apbrackets_List'), 'format' => "#ap_status# '#ap_titlefield#' - !la_title_AffiliatePlansBrackets!"),
+												'affiliate_plans_items'	=>	Array('prefixes' => Array('ap','api_List'), 'format' => "#ap_status# '#ap_titlefield#' - !la_title_AffiliatePlansBrackets!"),
+
+											),
+
+					'EditTabPresets' => Array (
+   						'Default' => Array (
+   							'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/affiliate_plans/affiliate_plans_edit', 'priority' => 1),
+							'brackets' => Array ('title' => 'la_tab_Brackets', 't' => 'in-commerce/affiliate_plans/affiliate_plans_brackets', 'priority' => 2),
+//							'items' => Array ('title' => 'la_tab_Items', 't' => 'in-commerce/affiliate_plans/affiliate_plans_items', 'priority' => 3),
+   						),
+   					),
+
+					'PermSection'		=>	Array('main' => 'in-commerce:affiliate_plans'),
+
+					'Sections'			=>	Array(
+													'in-commerce:affiliate_plans'	=>	Array(
+																								'parent'		=>	'in-commerce:affiliates_folder',
+																								'icon'			=>	'affiliates',
+																								'label'			=>	'la_tab_AffiliatePlans',
+																								'url'			=>	Array('t' => 'in-commerce/affiliate_plans/affiliate_plans_list', 'pass' => 'm'),
+																								'permissions'	=>	Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline', 'advanced:set_primary'),
+																								'priority'		=>	8.2,
+																								'type'			=>	stTAB,
+																						),
+											),
+
+					'TableName'			=>	TABLE_PREFIX.'AffiliatePlans',
+
+					'ListSQLs'			=>	Array('' => 'SELECT * FROM %s'),
+					'ItemSQLs'			=>	Array('' => 'SELECT * FROM %s'),
+
+					'SubItems'	=> Array('apbrackets', /*'api'*/),
+					'ListSortings'	=> 	Array(
+												'' => Array(
+															'ForcedSorting' => Array('IsPrimary' => 'desc'),
+															'Sorting' => Array('Name' => 'desc'),
+														)
+										),
+
+					'Fields' => Array(
+							            'AffiliatePlanId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
+							            'Name' => Array('type' => 'string', 'unique' => Array(), 'not_null' => '1', 'required' => 1, 'default' => ''),
+							            'PlanType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(/*0 => 'la_by_amount',*/ 1 => 'la_by_amount', 2 => 'la_by_items_sold'), 'use_phrases' => 1, 'required' => 1, 'not_null' => 1, 'default' => 1),
+							            'ResetInterval' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(86400 => 'la_day', 604800 => 'la_week', 2628000 => 'la_month', 7884000 => 'la_quartely', 31536000 => 'la_year'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
+							            'PaymentType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(0 => 'la_regular', 1 => 'la_by_request'), 'use_phrases' => 1, 'not_null' => 1,'default' => 0),
+							            'MinPaymentAmount' => Array('type' => 'string','not_null' => '1','default' => ''),
+							            'Enabled' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(0 => 'la_Disabled', 1 => 'la_Enabled'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
+							            'IsPrimary' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+								),
+
+					'Grids'	=> Array(
+								'Default'		=>	Array(
+															'Icons' => Array('default'=>'icon16_custom.gif', '0_0' => 'icon16_affiliate_plan_disabled.gif', '1_0' => 'icon16_affiliate_plan.gif', '1_1' => 'icon16_affiliate_plan_primary.gif'),
+															'Fields' => Array(
+																			'AffiliatePlanId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+																			'Name' 			=> Array( 'title'=>'la_col_Name', 'filter_block' => 'grid_like_filter'),
+																			'PlanType'		=> Array( 'title' => 'la_col_PlanType', 'filter_block' => 'grid_options_filter'),
+																			'Enabled'		=> Array( 'title' => 'la_col_Status', 'filter_block' => 'grid_options_filter'),
+																		),
+													),
+
+								),
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/affiliate_plans/affiliate_plans_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.28.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/affiliate_plans_items/affiliate_plans_items_tag_processor.php
===================================================================
--- branches/5.1.x/in-commerce/units/affiliate_plans_items/affiliate_plans_items_tag_processor.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/affiliate_plans_items/affiliate_plans_items_tag_processor.php	(revision 12131)
@@ -0,0 +1,48 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class AffiliatePlansItemsTagProcessor extends kDBTagProcessor  {
+
+	function IsEntireOrder($params)
+	{
+		$table_name = $this->Application->getUnitOption($this->Prefix, 'TableName');
+
+		if ($this->Application->IsTempMode($this->Prefix)) {
+			$table_name = $this->Application->GetTempName($table_name, 'prefix:' . $this->Prefix);
+		}
+
+		$sql = 'SELECT COUNT(*)
+				FROM ' . $table_name . '
+				WHERE (ItemType = 0) AND (AffiliatePlanId = ' . $this->Application->GetVar('ap_id') . ')';
+		return $this->Conn->GetOne($sql);
+	}
+
+	function ItemIcon($params)
+	{
+		$object =& $this->Application->recallObject($this->getPrefixSpecial(),$this->Prefix, $params);
+		if($object->GetDBField('ItemType') == 2)
+		{
+			$cat_object =& $this->Application->recallObject('c');
+			$cat_object->Load( $object->GetDBField('CategoryId') );
+			$cat_tag_processor =& $this->Application->recallObject('c_TagProcessor');
+			return $cat_tag_processor->ItemIcon();
+		}
+		else
+		{
+			return parent::ItemIcon($params);
+		}
+	}
+
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/affiliate_plans_items/affiliate_plans_items_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2.8.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/affiliate_plans_items/affiliate_plans_items_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/affiliate_plans_items/affiliate_plans_items_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/affiliate_plans_items/affiliate_plans_items_event_handler.php	(revision 12131)
@@ -0,0 +1,78 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+// NOT IN USE RIGHT NOW (by Alex)
+
+class AffiliatePlansItemsEventHandler extends kDBEventHandler {
+
+	/**
+	 * Adds selected items to affiliate products
+	 *
+	 * @param kEvent $event
+	 */
+	function OnProcessSelected(&$event)
+	{
+		// uses another handler event, because does the same stuff but on different table
+		$di_handler =& $this->Application->recallObject('di_EventHandler');
+		$di_handler->OnProcessSelected($event);
+	}
+
+	/**
+	 * Allows to set discount on entire order
+	 *
+	 * @param kEvent $event
+	 * @todo get parent item id through $object->getLinkedInfo()['ParentId']
+	 * @access public
+	 */
+	function OnEntireOrder(&$event)
+	{
+		$object =& $event->GetObject();
+		$sql = 'DELETE FROM '.$object->TableName.' WHERE AffiliatePlanId='.$this->Application->GetVar('ap_id');
+		$this->Conn->Query($sql);
+
+		$object->SetDBField('AffiliatePlanId', $this->Application->GetVar('ap_id'));
+		$object->SetDBField('ItemResourceId', -1);
+		$object->SetDBField('ItemType', 0);
+
+		if( $object->Create() )
+		{
+			if( $object->IsTempTable() ) $object->setTempID();
+			$this->customProcessing($event, 'after');
+			$event->status=erSUCCESS;
+			$event->redirect_params = Array('opener' => 's'); //stay!
+		}
+		else
+		{
+			$event->status=erFAIL;
+			$this->Application->SetVar($event->Prefix_Special.'_SaveEvent','OnCreate');
+			$object->setID(0);
+		}
+	}
+
+	/**
+	 * Deletes discount items where hooked item (product) is used
+	 *
+	 * @param kEvent $event
+	 */
+	function OnDeleteDiscountedItem(&$event)
+	{
+		$main_object =& $event->MasterEvent->getObject();
+		$resource_id = $main_object->GetDBField('ResourceId');
+
+		$table = $this->Application->getUnitOption($event->Prefix,'TableName');
+		$sql = 'DELETE FROM '.$table.' WHERE ItemResourceId = '.$resource_id;
+		$this->Conn->Query($sql);
+	}
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/affiliate_plans_items/affiliate_plans_items_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/affiliate_plans_items/affiliate_plans_items_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/affiliate_plans_items/affiliate_plans_items_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/affiliate_plans_items/affiliate_plans_items_config.php	(revision 12131)
@@ -0,0 +1,113 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+	
+$config	=	Array(
+					'Prefix'			=>	'api',
+					'ItemClass'			=>	Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'AffiliatePlansItemsEventHandler','file'=>'affiliate_plans_items_event_handler.php','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'AffiliatePlansItemsTagProcessor','file'=>'affiliate_plans_items_tag_processor.php','build_event'=>'OnBuild'),
+					'AutoLoad'			=>	true,
+					'Hooks'	=>	Array( 
+												Array(
+													'Mode' => hAFTER,
+													'Conditional' => false,
+													'HookToPrefix' => '#PARENT#',
+													'HookToSpecial' => '',
+													'HookToEvent' => Array('OnAfterItemDelete'),
+													'DoPrefix' => '',
+													'DoSpecial' => '',
+													'DoEvent' => 'OnDeleteDiscountedItem',
+												),
+											),
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'page',
+												3	=>	'event',
+											),
+					'IDField'			=>	'AffiliateItemId',
+					'StatusField'		=>	Array('Status'),
+					'TitleField'		=>	'Name',
+					'TableName'			=>	TABLE_PREFIX.'AffiliatePlansItems',
+
+					'CalculatedFields'	=>	Array(
+												''	=>	Array(
+															'ProductId'		=>	'p.ProductId',
+															'ItemName'			=>	'IF(p.Name IS NULL,c.Name,p.l1_Name)',
+															'SKU'			=>	'p.SKU',
+															'Weight'		=>	'p.Weight',
+															'CreatedOn'		=>	'p.CreatedOn',
+															'BackOrderDate'	=>	'p.BackOrderDate',
+															'Status'		=>	'p.Status',
+															'CategoryId'	=>	'c.CategoryId',
+												
+														),
+					
+											),				
+					'ListSQLs'			=>	Array(	''=>'	SELECT %1$s.* %2$s
+															FROM %1$s
+															LEFT JOIN '.TABLE_PREFIX.'Products p ON %1$s.ItemResourceId = p.ResourceId
+															LEFT JOIN '.TABLE_PREFIX.'Category c ON %1$s.ItemResourceId = c.ResourceId',					
+																		), // key - special, value - list select sql
+					'ItemSQLs'			=>	Array(	''=>'SELECT * FROM %s',
+																		),
+					
+					'ForeignKey'	=>	'AffiliatePlanId',
+					'ParentTableKey' => 'AffiliatePlanId',
+					'ParentPrefix' => 'ap',
+					'AutoDelete'	=>	true,
+					'AutoClone'	=> true,
+					
+					'ListSortings'	=> 	Array( 
+												'' => Array(
+													'Sorting' => Array('ItemName' => 'asc'),
+												)
+											),
+					
+					'Fields' => Array (
+						'AffiliateItemId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
+			            'AffiliatePlanId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
+			            'ItemResourceId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
+			            'ItemType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_Product', 2 => 'la_Category', 0 => 'la_WholeOrder' ), 'not_null' => 1, 'default' => 1, ),
+					),
+					
+					'VirtualFields'	=> 	Array(
+													'ProductId' => Array(),
+													'ItemName' => Array(),
+													'SKU' => Array(),
+													'Weight' => Array('type'=>'float', 'min_value_exc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f'),
+													'CreatedOn' => Array('formatter' => 'kDateFormatter', 'default'=>'#NOW#' ),
+													'BackOrderDate' => Array('formatter' => 'kDateFormatter'),
+												),
+											
+					'Grids'	=> Array(
+								'Default'		=>	Array(
+																	'Icons' => Array('default'=>'icon16_entire_order.gif'),
+																	'Fields' => Array(
+																			'ItemType' => Array( 'title'=>'la_col_ItemType', 'data_block' => 'grid_checkbox_td' ),
+																		),
+																	
+																),
+								'AffiliatePlansItems'		=>	Array(
+																	'Icons' => Array('default'=>'icon16_custom.gif',1=>'icon16_product.gif',2=>'icon16_product_pending.gif',0=>'icon16_product_disabled.gif'),
+																	'Fields' => Array(
+																			'ProductId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_item_checkbox_td' ),
+																			'ItemName' => Array( 'title'=>'la_col_ItemName' ),
+																			'ItemType' => Array( 'title'=>'la_col_ItemType' ),																		
+																		),
+																	
+																),
+													),
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/affiliate_plans_items/affiliate_plans_items_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gateways/gateways_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/gateways/gateways_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gateways/gateways_config.php	(revision 12131)
@@ -0,0 +1,81 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+$config	=	Array(
+					'Prefix'			=>	'gwf',
+					'ItemClass'			=>	Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'GatewayEventHandler','file'=>'gw_event_handler.php','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'GatewayTagProcessor','file'=>'gw_tag_processor.php','build_event'=>'OnBuild'),
+					'AutoLoad'			=>	true,
+					'Hooks'	=>	Array(
+												Array(
+													'Mode' => hBEFORE,
+													'Conditional' => false,
+													'HookToPrefix' => 'pt',
+													'HookToSpecial' => '',
+													'HookToEvent' => Array( 'OnListBuild' ),
+													'DoPrefix' => '',
+													'DoSpecial' => '',
+													'DoEvent' => 'OnCheckGateways',
+												),
+												Array(
+													'Mode' => hBEFORE,
+													'Conditional' => true,
+													'HookToPrefix' => 'pt',
+													'HookToSpecial' => '',
+													'HookToEvent' => Array( 'OnCreate', 'OnSave', 'OnUpdate', 'onPreSaveAndGoToTab', 'onPreSaveAndGo' ),
+													'DoPrefix' => '',
+													'DoSpecial' => '',
+													'DoEvent' => 'OnSaveValues',
+												),
+											),
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'page',
+												3	=>	'event',
+											),
+					'IDField'			=>	'GWConfigFieldId',
+					'TableName'			=>	TABLE_PREFIX.'GatewayConfigFields',
+
+					'ListSQLs'			=>	Array	(''=>'SELECT * FROM %s',
+													), // key - special, value - list select sql
+					'ItemSQLs'			=>	Array(	''=>'SELECT * FROM %s',
+																		),
+
+					'Fields' => Array (
+						'GWConfigFieldId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
+			            'SystemFieldName' => Array('type' => 'string', 'not_null' => 1, 'default' => 0, ),
+			            'FieldName' => Array('type' => 'string', 'required' => true, 'max_len' => 100, 'not_null' => 1, 'default' => 0, ),
+			            'ElementType' => Array('type' => 'string', 'not_null' => 1, 'default' => 0, ),
+			            'ValueList' => Array('type' => 'string', 'not_null' => 1, 'default' => 0, ),
+			            'GatewayId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
+					),
+					
+					'VirtualFields'	=> 	Array	(
+													'Value' => Array(),
+												),
+
+					'Grids'	=> Array(
+								'Default'		=>	Array(
+																	'Icons' => Array('default'=>'icon16_custom.gif'),	// icons for each StatusField values, if no matches or no statusfield selected, then "default" icon is used
+																	'Fields' => Array(
+																			'FieldName' => Array( 'title'=>'la_Fields' ),
+																			'Value' => Array( 'title'=>'la_Value' ),
+																		),
+
+																),
+													),
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gateways/gateways_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gateways/gw_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/gateways/gw_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gateways/gw_event_handler.php	(revision 12131)
@@ -0,0 +1,77 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class GatewayEventHandler extends kDBEventHandler {
+
+	function OnSaveValues(&$event)
+	{
+		// if there is no id - it means we need to create an item
+		$item_id = $this->getPassedID($event);
+		$event->setPseudoClass('_List');
+
+		$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
+		$PaymentType_info = $this->Application->GetVar( 'pt' );
+		$GWConfigValue =& $this->Application->recallObject('gwfv');
+		$GWConfigValue->SetDBField('PaymentTypeId', $this->Application->GetVar('pt_id'));
+
+		//deleting old values
+		$sql = 'DELETE FROM '.$GWConfigValue->TableName.' WHERE PaymentTypeId = '.$this->Application->GetVar('pt_id');
+		$res = $this->Conn->Query($sql);
+
+		//selecting fields for selected gateway only
+		$sql = 'SELECT GWConfigFieldId FROM '.TABLE_PREFIX.'GatewayConfigFields
+					WHERE GatewayId = '.$PaymentType_info[$this->Application->GetVar('pt_id')]['GatewayId'];
+		$res = $this->Conn->GetCol($sql);
+
+		if($items_info)
+		{
+			foreach($res as $gw_field_id)
+			{
+				$field_values = $items_info[$gw_field_id];
+				$field_values['GWConfigFieldId'] = $gw_field_id;
+
+				$GWConfigValue->SetFieldsFromHash($field_values);
+				if( $GWConfigValue->Create() )
+				{
+					$event->status=erSUCCESS;
+				}
+				else
+				{
+					$event->status=erFAIL;
+					break;
+				}
+			}
+		}
+	}
+
+	function OnCheckGateways(&$event)
+	{
+		if (!$this->Application->IsAdmin()) return ;
+		$fh=opendir(GW_CLASS_PATH);
+		while( $entry=readdir($fh) )
+		{
+			if ( !is_file(GW_CLASS_PATH.'/'.$entry) ) continue;
+			$pathinfo = pathinfo($entry);
+			if ( $pathinfo['extension'] != 'php') continue;
+
+			$class_name = false;
+			include_once(GW_CLASS_PATH.'/'.$entry);
+			if (!$class_name) continue;
+			$tmp = new $class_name();
+			$tmp->Install();
+		}
+
+	}
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gateways/gw_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/google_checkout_notify.php
===================================================================
--- branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/google_checkout_notify.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/google_checkout_notify.php	(revision 12131)
@@ -0,0 +1,52 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	define('FULL_PATH', realpath(dirname(__FILE__).'/../../../../../'));
+	define('REL_PATH', 'in-commerce/units/gateways/gw_classes/notify_scripts');
+	define('ADMIN', 1);
+	include_once(FULL_PATH.'/core/kernel/startup.php');
+
+	$application =& kApplication::Instance();
+	$application->Init();
+
+	$sql = 'SELECT PaymentTypeId FROM '.TABLE_PREFIX.'PaymentTypes AS pt
+			LEFT JOIN '.TABLE_PREFIX.'Gateways AS g ON g.GatewayId = pt.GatewayId
+			WHERE g.ClassName = "kGWGoogleCheckout"';
+	$payment_type_id = $application->Conn->GetOne($sql);
+
+	$application->SetVar('payment_type_id', $payment_type_id); // keep, because kGWGoogleCheckout::processNewOrderNotification relies on this
+
+	$order =& $application->recallObject('ord', null, Array ('skip_autoload' => true));
+	/* @var $order OrdersItem */
+
+	$gw_data = $order->getGatewayData($application->GetVar('payment_type_id'));
+	$application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
+	$gateway_object =& $application->recallObject( $gw_data['ClassName'] );
+
+	$transaction_status = $gateway_object->processNotification($gw_data['gw_params']);
+
+	$sql = 'UPDATE '.$order->TableName.'
+			SET TransactionStatus = '.$transaction_status.'
+			WHERE '.$order->IDField.' = '.$order->GetID();
+	$application->Conn->Query($sql);
+
+	$order->SetDBField('TransactionStatus', $transaction_status);
+
+	if ($transaction_status == 1) {
+		$dummy_var = '10';
+		$application->SetVar('ord_id', $order->GetID()); // used in OrdersEventHandler::UpdateOrderItem
+		$application->HandleEvent($dummy_var, 'ord:OnCompleteOrder');
+	}
+
+	$application->Done();
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/google_checkout_notify.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.2
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/sella_error.php
===================================================================
--- branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/sella_error.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/sella_error.php	(revision 12131)
@@ -0,0 +1,32 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	define('FULL_PATH', realpath(dirname(__FILE__).'/../../../../../'));
+	define('REL_PATH', 'in-commerce/units/gateways/gw_classes/notify_scripts');
+	define('ADMIN', 1);
+	include_once(FULL_PATH.'/core/kernel/startup.php');
+
+	$application =& kApplication::Instance();
+	$application->Init();
+
+	$application->SetVar('sella_error', 1);
+
+	$application->SetVar('payment_type_id',
+				$application->Conn->GetOne(
+					'SELECT PaymentTypeId FROM '.TABLE_PREFIX.'PaymentTypes AS pt
+					LEFT JOIN '.TABLE_PREFIX.'Gateways AS g
+					ON g.GatewayId = pt.GatewayId
+					WHERE g.ClassName = '.$application->Conn->qstr('kSellaGuestPayGW')));
+
+	include(FULL_PATH.'/in-commerce/gw_notify.php');
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/sella_error.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/sella_ok.php
===================================================================
--- branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/sella_ok.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/sella_ok.php	(revision 12131)
@@ -0,0 +1,32 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	define('FULL_PATH', realpath(dirname(__FILE__).'/../../../../../'));
+	define('REL_PATH', 'in-commerce/units/gateways/gw_classes/notify_scripts');
+	define('ADMIN', 1);
+	include_once(FULL_PATH.'/core/kernel/startup.php');
+
+	$application =& kApplication::Instance();
+	$application->Init();
+
+	$application->SetVar('sella_ok', 1);
+
+	$application->SetVar('payment_type_id',
+				$application->Conn->GetOne(
+					'SELECT PaymentTypeId FROM '.TABLE_PREFIX.'PaymentTypes AS pt
+					LEFT JOIN '.TABLE_PREFIX.'Gateways AS g
+					ON g.GatewayId = pt.GatewayId
+					WHERE g.ClassName = '.$application->Conn->qstr('kSellaGuestPayGW')));
+
+	include(FULL_PATH.'/in-commerce/gw_notify.php');
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/sella_ok.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/paybox_notify.php
===================================================================
--- branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/paybox_notify.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/paybox_notify.php	(revision 12131)
@@ -0,0 +1,33 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	define('FULL_PATH', realpath(dirname(__FILE__).'/../../../../../'));
+	define('REL_PATH', 'in-commerce/units/gateways/gw_classes/notify_scripts');
+	if (!file_exists(FULL_PATH.'/core/kernel/application.php')) { //way to dectect new ver
+		define('APPLICATION_CLASS', 'MyApplication');
+	}
+	define('ADMIN', 1);
+	include_once(FULL_PATH.'/core/kernel/startup.php');
+
+	$application =& kApplication::Instance();
+	$application->Init();
+
+	$application->SetVar('payment_type_id',
+				$application->Conn->GetOne(
+					'SELECT PaymentTypeId FROM '.TABLE_PREFIX.'PaymentTypes AS pt
+					LEFT JOIN '.TABLE_PREFIX.'Gateways AS g
+					ON g.GatewayId = pt.GatewayId
+					WHERE g.ClassName = '.$application->Conn->qstr('kPayboxGW')));
+
+	include(FULL_PATH.'/in-commerce/gw_notify.php');
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/paybox_notify.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/multicards_notify.php
===================================================================
--- branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/multicards_notify.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/multicards_notify.php	(revision 12131)
@@ -0,0 +1,33 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	define('FULL_PATH', realpath(dirname(__FILE__).'/../../../../../'));
+	define('REL_PATH', 'in-commerce/units/gateways/gw_classes/notify_scripts');
+	if (!file_exists(FULL_PATH.'/core/kernel/application.php')) { //way to dectect new ver
+		define('APPLICATION_CLASS', 'MyApplication');
+	}
+	define('ADMIN', 1);
+	include_once(FULL_PATH.'/core/kernel/startup.php');
+
+	$application =& kApplication::Instance();
+	$application->Init();
+
+	$application->SetVar('payment_type_id',
+				$application->Conn->GetOne(
+					'SELECT PaymentTypeId FROM '.TABLE_PREFIX.'PaymentTypes AS pt
+					LEFT JOIN '.TABLE_PREFIX.'Gateways AS g
+					ON g.GatewayId = pt.GatewayId
+					WHERE g.ClassName = '.$application->Conn->qstr('kMultiCardsGW')));
+
+	include(FULL_PATH.'/in-commerce/gw_notify.php');
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/multicards_notify.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/verisign_pflink_notify.php
===================================================================
--- branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/verisign_pflink_notify.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/verisign_pflink_notify.php	(revision 12131)
@@ -0,0 +1,30 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	define('FULL_PATH', realpath(dirname(__FILE__).'/../../../../../'));
+	define('REL_PATH', 'in-commerce/units/gateways/gw_classes/notify_scripts');
+	define('ADMIN', 1);
+	include_once(FULL_PATH.'/core/kernel/startup.php');
+
+	$application =& kApplication::Instance();
+	$application->Init();
+
+	$application->SetVar('payment_type_id',
+				$application->Conn->GetOne(
+					'SELECT PaymentTypeId FROM '.TABLE_PREFIX.'PaymentTypes AS pt
+					LEFT JOIN '.TABLE_PREFIX.'Gateways AS g
+					ON g.GatewayId = pt.GatewayId
+					WHERE g.ClassName = '.$application->Conn->qstr('kVerisignPfLinkGW')));
+
+	include(FULL_PATH.'/in-commerce/gw_notify.php');
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/verisign_pflink_notify.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/google_checkout_shippings.php
===================================================================
--- branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/google_checkout_shippings.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/google_checkout_shippings.php	(revision 12131)
@@ -0,0 +1,38 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	define('FULL_PATH', realpath(dirname(__FILE__).'/../../../../../'));
+	define('REL_PATH', 'in-commerce/units/gateways/gw_classes/notify_scripts');
+	define('ADMIN', 1);
+	include_once(FULL_PATH.'/core/kernel/startup.php');
+
+	$application =& kApplication::Instance();
+	$application->Init();
+
+	$sql = 'SELECT PaymentTypeId FROM '.TABLE_PREFIX.'PaymentTypes AS pt
+			LEFT JOIN '.TABLE_PREFIX.'Gateways AS g ON g.GatewayId = pt.GatewayId
+			WHERE g.ClassName = "kGWGoogleCheckout"';
+	$payment_type_id = $application->Conn->GetOne($sql);
+
+	$order =& $application->recallObject('ord', null, Array ('skip_autoload' => true));
+	/* @var $order OrdersItem */
+
+	$gw_data = $order->getGatewayData($payment_type_id);
+	$application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
+	$gateway_object =& $application->recallObject( $gw_data['ClassName'] );
+	/* @var $gateway_object kGWGoogleCheckout */
+
+	$gateway_object->processNotification($gw_data['gw_params'], 'shippings');
+
+	$application->Done();
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/google_checkout_shippings.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/atosorigin_notify.php
===================================================================
--- branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/atosorigin_notify.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/atosorigin_notify.php	(revision 12131)
@@ -0,0 +1,30 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	define('FULL_PATH', realpath(dirname(__FILE__).'/../../../../../'));
+	define('REL_PATH', 'in-commerce/units/gateways/gw_classes/notify_scripts');
+	define('ADMIN', 1);
+	include_once(FULL_PATH.'/core/kernel/startup.php');
+
+	$application =& kApplication::Instance();
+	$application->Init();
+
+	$application->SetVar('payment_type_id',
+				$application->Conn->GetOne(
+					'SELECT PaymentTypeId FROM '.TABLE_PREFIX.'PaymentTypes AS pt
+					LEFT JOIN '.TABLE_PREFIX.'Gateways AS g
+					ON g.GatewayId = pt.GatewayId
+					WHERE g.ClassName = '.$application->Conn->qstr('kAtosOriginGW')));
+
+	include(FULL_PATH.'/in-commerce/gw_notify.php');
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/atosorigin_notify.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/sella_notify.php
===================================================================
--- branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/sella_notify.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/sella_notify.php	(revision 12131)
@@ -0,0 +1,30 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	define('FULL_PATH', realpath(dirname(__FILE__).'/../../../../../'));
+	define('REL_PATH', 'in-commerce/units/gateways/gw_classes/notify_scripts');
+	define('ADMIN', 1);
+	include_once(FULL_PATH.'/core/kernel/startup.php');
+
+	$application =& kApplication::Instance();
+	$application->Init();
+
+	$application->SetVar('payment_type_id',
+				$application->Conn->GetOne(
+					'SELECT PaymentTypeId FROM '.TABLE_PREFIX.'PaymentTypes AS pt
+					LEFT JOIN '.TABLE_PREFIX.'Gateways AS g
+					ON g.GatewayId = pt.GatewayId
+					WHERE g.ClassName = '.$application->Conn->qstr('kSellaGuestPayGW')));
+
+	include(FULL_PATH.'/in-commerce/gw_notify.php');
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gateways/gw_classes/notify_scripts/sella_notify.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gateways/gw_classes/verisign_pflink.php
===================================================================
--- branches/5.1.x/in-commerce/units/gateways/gw_classes/verisign_pflink.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gateways/gw_classes/verisign_pflink.php	(revision 12131)
@@ -0,0 +1,139 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	require_once GW_CLASS_PATH.'/gw_base.php';
+
+	$class_name = 'kVerisignPfLinkGW'; // for automatic installation
+
+	class kVerisignPfLinkGW extends kGWBase
+	{
+		function InstallData()
+		{
+			$data = array(
+				'Gateway' => Array('Name' => 'Verisign Payflow Link', 'ClassName' => 'kVerisignPfLinkGW', 'ClassFile' => 'verisign_pflink.php', 'RequireCCFields' => 0),
+				'ConfigFields' => Array(
+					'submit_url' => Array('Name' => 'Submit URL', 'Type' => 'text', 'ValueList' => '', 'Default' => 'https://payments.verisign.com/payflowlink'),
+					'login' => Array('Name' => 'Login', 'Type' => 'text', 'ValueList' => '', 'Default' => ''),
+					'partner' => Array('Name' => 'Partner', 'Type' => 'text', 'ValueList' => '', 'Default' => ''),
+					'transaction_type' => Array('Name' => 'Transaction Type (S/A)', 'Type' => 'text', 'ValueList' => '', 'Default' => 'S'),
+					'shipping_control' => Array('Name' => 'Shipping Control', 'Type' => 'select', 'ValueList' => '3=la_CreditDirect,4=la_CreditPreAuthorize', 'Default' => '3'),
+				)
+			);
+			return $data;
+		}
+
+		/**
+		 * Returns payment form submit url
+		 *
+		 * @param Array $gw_params gateway params from payment type config
+		 * @return string
+		 */
+		function getFormAction($gw_params)
+		{
+			return $gw_params['submit_url'];
+		}
+
+		/**
+		 * Processed input data and convets it to fields understandable by gateway
+		 *
+		 * @param Array $item_data
+		 * @param Array $tag_params additional params for gateway passed through tag
+		 * @param Array $gw_params gateway params from payment type config
+		 * @return Array
+		 */
+		function getHiddenFields($item_data, $tag_params, $gw_params)
+		{
+			$params['LOGIN'] = $gw_params['login'];
+			$params['PARTNER'] = $gw_params['partner'];
+			$params['TYPE'] = $gw_params['transaction_type'];
+
+			$params['AMOUNT'] = $item_data['TotalAmount'];
+
+
+			$billing_email = $item_data['BillingEmail'];
+			if (!$billing_email) {
+				$billing_email = $this->Conn->GetOne('	SELECT Email FROM '.$this->Application->getUnitOption('u', 'TableName').'
+											WHERE PortalUserId = '.$this->Application->RecallVar('user_id'));
+			}
+
+			$params['NAME'] = $item_data['BillingTo'];
+			$params['PHONE'] = $item_data['BillingPhone'];
+			$params['ADDRESS'] = $item_data['BillingAddress1'] . ' ' . $item_data['BillingAddress2'];
+			$params['CITY'] = $item_data['BillingCity'];
+			$params['ZIP'] = $item_data['BillingZip'];
+			$params['COUNTRY'] = $item_data['BillingCountry'];
+			$params['EMAIL'] = $billing_email;
+
+			$params['COMMENT1'] = '';
+
+			$params['DESCRIPTION'] = 'Order #'.$item_data['OrderNumber'];
+
+			$params['INVOICE'] = $item_data['OrderNumber'];
+
+			$params['CUSTID'] = $item_data['PortalUserId'];
+			$params['USER1'] = $item_data['OrderId'];
+			$params['USER2'] = $this->Application->GetSID();
+
+			return $params;
+		}
+
+		function processNotification($gw_params)
+		{
+			$result = $this->parseGWResponce($_POST);
+
+			$session =& $this->Application->recallObject('Session');
+			$session->SID = $_POST['USER2'];
+
+			$order_id = $this->Conn->GetOne('SELECT OrderId FROM '.TABLE_PREFIX.'Orders WHERE OrderId = '.$_POST['USER1']);
+			$this->Application->SetVar('ord_id', $order_id);
+			$order =& $this->Application->recallObject('ord');
+			$order->Load($order_id);
+
+			define('ADMIN', 1);
+			if (!$this->Application->GetVar('silent')) {
+				if ($result['RESULT'] == '0') {
+					$this->Application->Redirect('in-commerce/checkout/checkout_success', array('pass'=>'m', 'm_cat_id'=>0), '_FRONT_END_', 'index.php');
+				}
+				else {
+					$this->Application->StoreVar('gw_error', $this->getErrorMsg());
+					$this->Application->Redirect('in-commerce/checkout/billing', array('pass'=>'m', 'm_cat_id'=>0), '_FRONT_END_', 'index.php');
+				}
+			}
+
+			return $result['RESULT'] == '0' ? 1 : 0;
+		}
+
+		function parseGWResponce($res)
+		{
+			$this->parsed_responce = $res;
+			return $res;
+		}
+
+		function getGWResponce()
+		{
+			return serialize($this->parsed_responce);
+		}
+
+		function getErrorMsg()
+		{
+			$msg = $this->parsed_responce['RESPMSG'];
+			if (!$msg) {
+				if ($this->parsed_responce['RESULT'] != '0') {
+					$msg = 'Transaction failed';
+				}
+			}
+			return $msg;
+		}
+	}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gateways/gw_classes/verisign_pflink.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gateways/gw_classes/paymentech.php
===================================================================
--- branches/5.1.x/in-commerce/units/gateways/gw_classes/paymentech.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gateways/gw_classes/paymentech.php	(revision 12131)
@@ -0,0 +1,313 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	require_once GW_CLASS_PATH.'/gw_base.php';
+
+	$class_name = 'kPaymentechGW'; // for automatic installation
+
+	class kPaymentechGW extends kGWBase
+	{
+		function InstallData()
+		{
+			$data = array(
+				'Gateway' => Array('Name' => 'Patmentech/Orbital', 'ClassName' => 'kPaymentechGW', 'ClassFile' => 'paymentech.php', 'RequireCCFields' => 1),
+				'ConfigFields' => Array(
+					'submit_url' => Array('Name' => 'Submit URL', 'Type' => 'text', 'ValueList' => '', 'Default' => ''),
+					'user_account' => Array('Name' => 'Merchant ID', 'Type' => 'text', 'ValueList' => '', 'Default' => ''),
+					'user_bin' => Array('Name' => 'BIN Number', 'Type' => 'text', 'ValueList' => '', 'Default' => ''),
+					'shipping_control' => Array('Name' => 'Shipping Control', 'Type' => 'select', 'ValueList' => '3=la_CreditDirect,4=la_CreditPreAuthorize', 'Default' => '3'),
+					'deny_cvv' => Array('Name' => 'Decline the following CVV response codes (ex: N,P)', 'Type' => 'text', 'ValueList' => '', 'Default' => 'N,P,S'),
+					'deny_avs' => Array('Name' => 'Decline the following AVS response codes (ex: 1,3,R,5,6,G)', 'Type' => 'text', 'ValueList' => '', 'Default' => '1,2,3,4,R,5,6,7,8,A,C,D,E,F,G,Z'),
+				)
+			);
+			return $data;
+		}
+
+		function DirectPayment($item_data, $gw_params)
+		{
+			// if( $this->IsTestMode() ) $post_fields['x_test_request'] = 'True';
+
+			$data = array(
+				//sys default
+				'TzCode' => 705,
+				'CurrencyCode' => 840,
+				'CurrencyExponent' => 2,
+				'TxDateTime' => '', //gateway will set current timestamp
+
+				//merchant info
+				'MerchantID' => $gw_params['user_account'],
+				'BIN' => $gw_params['user_bin'],
+
+				//transaction
+				// A - Authorize Only  // AC - Authorize & Capture // C - Prior Auth Capture
+				'MessageType' => $gw_params['shipping_control'] == SHIPPING_CONTROL_PREAUTH ? 'A' : 'AC',
+
+				'Amount' => str_replace('.', '', sprintf('%.2f', $item_data['TotalAmount'])),
+				'AccountNum' => $item_data['PaymentAccount'], //card num
+				'Exp' => str_replace('/', '', $item_data['PaymentCCExpDate']), //expiration
+				'CardSecVal' => $item_data['PaymentCVV2'], //cvv2
+
+				//customer info
+				'AVSname' => $item_data['PaymentNameOnCard'],
+				'AVSaddress1' => $item_data['BillingAddress1'],
+				'AVSaddress2' => $item_data['BillingAddress2'],
+				'AVScity' => $item_data['BillingCity'],
+				'AVSstate' => $item_data['BillingState'],
+				'AVSzip' => $item_data['BillingZip'],
+
+				// order info
+				'OrderID' => $item_data['OrderNumber'],
+				'ECOrderNum' => $item_data['OrderNumber'],
+				'Comments' => 'Invoice #'.$item_data['OrderNumber'],
+				'ShippingRef' => '',
+			);
+
+			$sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = %s';
+			$data['AVScountryCode']	=	$this->Conn->GetOne( sprintf($sql, $this->Conn->qstr($item_data['BillingCountry']) ) );
+
+			if ($data['AVScountryCode'] != 'US') {
+				$data['AVSstate'] = '';
+			}
+
+			$headers = Array(
+				'POST /AUTHORIZE HTTP/1.0',
+				'MIME-Version: 1.0',
+				'Content-type: application/PTI34',
+				'Content-transfer-encoding: text',
+				'Request-number: 1',
+				'Document-type: Request'
+			);
+			$xml = $this->PrepareXML($data);
+			$this->gw_responce = curl_post($gw_params['submit_url'], $xml, $headers);
+			$gw_responce = $this->parseGWResponce(null, $gw_params);
+			$this->CheckCVV_AVS($gw_params);
+			return ($this->parsed_responce['ProcStatus'] != 0 || $this->parsed_responce['ApprovalStatus'] != 1) ? false : true;
+		}
+
+		function CheckCVV_AVS($gw_params)
+		{
+			$cvv_reject = explode(',', $gw_params['deny_cvv']);
+			if (in_array(trim($this->parsed_responce['CVV2RespCode']), $cvv_reject)) {
+				$this->parsed_responce['ApprovalStatus'] = 0;
+			}
+			$avs_reject = explode(',', $gw_params['deny_avs']);
+			if (in_array(trim($this->parsed_responce['AVSRespCode']), $avs_reject)) {
+				$this->parsed_responce['ApprovalStatus'] = 0;
+			}
+		}
+
+		/**
+		 * Perform SALE type transaction direct from php script wihtout redirecting to 3rd-party website
+		 *
+		 * @param Array $item_data
+		 * @param Array $gw_params
+		 * @return bool
+		 */
+		function Charge($item_data, $gw_params)
+		{
+			$gw_responce = unserialize( $item_data['GWResult1'] );
+
+			if( ( strtoupper($gw_responce['MessageType']) == 'A') )
+			{
+				$data = array(
+					//sys default
+					'TzCode' => 705,
+					'CurrencyCode' => 840,
+					'CurrencyExponent' => 2,
+					'TxDateTime' => '', //gateway will set current timestamp
+
+					//merchant info
+					'MerchantID' => $gw_params['user_account'],
+					'BIN' => $gw_params['user_bin'],
+
+					//transaction
+					// A - Authorize Only  // AC - Authorize & Capture // C - Prior Auth Capture
+					'Amount' => str_replace('.', '', sprintf('%.2f', $item_data['TotalAmount'])),
+					'MessageType' => 'C',
+					'OrderID' => $gw_responce['OrderID'],
+					'TxRefNum' => $gw_responce['TxRefNum'],
+				);
+
+				$headers = Array(
+					'POST /AUTHORIZE HTTP/1.0',
+					'MIME-Version: 1.0',
+					'Content-type: application/PTI34',
+					'Content-transfer-encoding: text',
+					'Request-number: 1',
+					'Document-type: Request'
+				);
+
+				$xml = $this->PrepareXML($data);
+				$this->gw_responce = curl_post($gw_params['submit_url'], $xml, $headers);
+				$gw_responce = $this->parseGWResponce(null, $gw_params);
+
+				return ($gw_responce['ProcStatus'] != 0 || $gw_responce['ApprovalStatus'] != 1) ? false : true;
+			}
+			else
+			{
+				return true;
+			}
+		}
+
+		/**
+		 * Parse previosly saved gw responce into associative array
+		 *
+		 * @param string $gw_responce
+		 * @param Array $gw_params
+		 * @return Array
+		 */
+		function parseGWResponce($gw_responce = null, $gw_params)
+		{
+			if( !isset($gw_responce) ) $gw_responce = $this->gw_responce;
+
+			$parser =& $this->Application->recallObject('kXMLHelper');
+			$parser->Clear();
+			$res = $parser->Parse($gw_responce);
+
+			$parsed = array();
+			$parsed['ProcStatus'] = $res->FindChildValue('ProcStatus');
+			$parsed['StatusMsg'] = $res->FindChildValue('StatusMsg');
+
+			$parsed['ApprovalStatus'] = $res->FindChildValue('ApprovalStatus');
+			$parsed['RespCode'] = $res->FindChildValue('RespCode');
+			$parsed['AuthCode'] = $res->FindChildValue('AuthCode');
+			$parsed['AVSRespCode'] = $res->FindChildValue('AVSRespCode');
+			$parsed['CVV2RespCode'] = $res->FindChildValue('CVV2RespCode');
+			$parsed['StatusMsg'] = $res->FindChildValue('StatusMsg');
+			$parsed['RespMsg'] = $res->FindChildValue('RespMsg');
+			$parsed['TxRefNum'] = $res->FindChildValue('TxRefNum');
+			$parsed['TxRefIdx'] = $res->FindChildValue('TxRefIdx');
+			$parsed['RespTime'] = $res->FindChildValue('RespTime');
+			$parsed['Amount'] = $res->FindChildValue('Amount');
+			$parsed['OrderID'] = $res->FindChildValue('OrderNumber');
+
+			$parsed['MessageType'] = $res->FindChildValue('CommonMandatoryResponse', 'MessageType');
+
+			$this->parsed_responce = $parsed;
+			return $parsed;
+		}
+
+		function getErrorMsg()
+		{
+			$code = $this->parsed_responce['ApprovalStatus'];
+			switch ($this->parsed_responce['ApprovalStatus']) {
+				case '0':
+					return 'The transaction has been declined';
+				case '1':
+					return 'The transaction has been approved';
+				default:
+					return 'An error has occured while processing the transaction ('.$this->parsed_responce['StatusMsg'].')';
+			}
+
+		}
+
+		function getGWResponce()
+		{
+			return serialize($this->parsed_responce);
+		}
+
+		function GetTestCCNumbers()
+		{
+			return array('4012888888881', '4055011111111111', '5454545454545454', '5405222222222226', '371449635398431',
+									 '6011000995500000', '36438999960016', '3566002020140006');
+		}
+
+		function PrepareXML($data)
+		{
+			if ($data['MessageType'] == 'A' ||
+					$data['MessageType'] == 'AC') {
+				$xml = <<<END_XML
+<?xml version="1.0" encoding="UTF-8"?>
+<Request>
+    <AC>
+        <CommonData>
+            <CommonMandatory AuthOverrideInd="N" LangInd="00" CardHolderAttendanceInd="01" HcsTcsInd="T" TxCatg="7" MessageType="{$data['MessageType']}" Version="2" TzCode="{$data['TzCode']}">
+                <AccountNum AccountTypeInd="91">{$data['AccountNum']}</AccountNum>
+                <POSDetails POSEntryMode="01"/>
+                <MerchantID>{$data['MerchantID']}</MerchantID>
+                <TerminalID TermEntCapInd="05" CATInfoInd="06" TermLocInd="01" CardPresentInd="N" POSConditionCode="59" AttendedTermDataInd="01">001</TerminalID>
+                <BIN>{$data['BIN']}</BIN>
+                <OrderID>{$data['OrderID']}</OrderID>
+                <AmountDetails>
+                    <Amount>{$data['Amount']}</Amount>
+                </AmountDetails>
+                <TxTypeCommon TxTypeID="G"/>
+                <Currency CurrencyCode="{$data['CurrencyCode']}" CurrencyExponent="{$data['CurrencyExponent']}"/>
+                <CardPresence>
+                    <CardNP>
+                        <Exp>{$data['Exp']}</Exp>
+                    </CardNP>
+                </CardPresence>
+                <TxDateTime>{$data['TxDateTime']}</TxDateTime>
+            </CommonMandatory>
+            <CommonOptional>
+                <Comments>{$data['Comments']}</Comments>
+                <ShippingRef>{$data['ShippingRef']}</ShippingRef>
+                <CardSecVal>{$data['CardSecVal']}</CardSecVal>
+                <ECommerceData ECSecurityInd="07">
+                    <ECOrderNum>{$data['ECOrderNum']}</ECOrderNum>
+                </ECommerceData>
+            </CommonOptional>
+        </CommonData>
+        <Auth>
+            <AuthMandatory FormatInd="H"/>
+            <AuthOptional>
+                <AVSextended>
+                    <AVSname>{$data['AVSname']}</AVSname>
+                    <AVSaddress1>{$data['AVSaddress1']}</AVSaddress1>
+                    <AVSaddress2>{$data['AVSaddress2']}</AVSaddress2>
+                    <AVScity>{$data['AVScity']}</AVScity>
+                    <AVSstate>{$data['AVSstate']}</AVSstate>
+                    <AVSzip>{$data['AVSzip']}</AVSzip>
+                </AVSextended>
+            </AuthOptional>
+        </Auth>
+        <Cap>
+            <CapMandatory>
+                <EntryDataSrc>02</EntryDataSrc>
+            </CapMandatory>
+            <CapOptional/>
+        </Cap>
+    </AC>
+</Request>
+END_XML;
+			}
+			elseif ($data['MessageType'] == 'C') {
+				$xml = <<<END_XML
+<?xml version="1.0" encoding="UTF-8" ?>
+<Request>
+    <AC>
+        <CommonData>
+            <CommonMandatory MessageType="{$data['MessageType']}">
+                <MerchantID>{$data['MerchantID']}</MerchantID>
+                <TerminalID>001</TerminalID>
+                <BIN>{$data['BIN']}</BIN>
+                <OrderID>{$data['OrderID']}</OrderID>
+                <AmountDetails>
+                    <Amount>{$data['Amount']}</Amount>
+                </AmountDetails>
+                <TxDateTime>{$data['TxDateTime']}</TxDateTime>
+            </CommonMandatory>
+            <CommonOptional>
+            	<TxRefNum>{$data['TxRefNum']}</TxRefNum>
+            </CommonOptional>
+        </CommonData>
+    </AC>
+</Request>
+END_XML;
+			}
+			return $xml;
+		}
+	}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gateways/gw_classes/paymentech.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gateways/gw_classes/atosorigin.php
===================================================================
--- branches/5.1.x/in-commerce/units/gateways/gw_classes/atosorigin.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gateways/gw_classes/atosorigin.php	(revision 12131)
@@ -0,0 +1,193 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	require_once GW_CLASS_PATH.'/gw_base.php';
+
+	$class_name = 'kAtosOriginGW'; // for automatic installation
+
+	class kAtosOriginGW extends kGWBase
+	{
+		function InstallData()
+		{
+			$data = array(
+				'Gateway' => Array('Name' => 'Atos Origin', 'ClassName' => 'kAtosOriginGW', 'ClassFile' => 'atosorigin.php', 'RequireCCFields' => 0),
+				'ConfigFields' => Array(
+					'request_binary' => Array('Name' => 'API Request Executable', 'Type' => 'text', 'ValueList' => '', 'Default' => ''),
+					'response_binary' => Array('Name' => 'API Response Executable', 'Type' => 'text', 'ValueList' => '', 'Default' => ''),
+					'pathfile' => Array('Name' => 'Pathfile', 'Type' => 'text', 'ValueList' => '', 'Default' => ''),
+					'merchant_id' => Array('Name' => 'Merchant ID', 'Type' => 'text', 'ValueList' => '', 'Default' => ''),
+					'merchant_country' => Array('Name' => 'Merchant Country Code', 'Type' => 'text', 'ValueList' => '', 'Default' => ''),
+					'currency_code' => Array('Name' => 'Currency Code', 'Type' => 'text', 'ValueList' => '', 'Default' => '978'),
+					'shipping_control' => Array('Name' => 'Shipping Control', 'Type' => 'select', 'ValueList' => '3=la_CreditDirect,4=la_CreditPreAuthorize', 'Default' => '3'),
+				)
+			);
+			return $data;
+		}
+
+		/**
+		 * Returns payment form submit url
+		 *
+		 * @param Array $gw_params gateway params from payment type config
+		 * @return string
+		 */
+		function getFormAction($gw_params)
+		{
+			return $gw_params['submit_url'];
+		}
+
+		/**
+		 * Processed input data and convets it to fields understandable by gateway
+		 *
+		 * @param Array $item_data
+		 * @param Array $tag_params additional params for gateway passed through tag
+		 * @param Array $gw_params gateway params from payment type config
+		 * @return Array
+		 */
+		function getHiddenFields($item_data, $tag_params, $gw_params)
+		{
+			$params['pathfile'] = $gw_params['pathfile'];
+			$params['merchant_id'] = $gw_params['merchant_id'];
+			$params['merchant_country'] = $gw_params['merchant_country'];
+			$params['currency_code'] = $gw_params['currency_code'];
+			$params['currency_code'] = $gw_params['currency_code'];
+
+			$params['normal_return_url'] = $this->Application->HREF($tag_params['return_template'],'',Array('pass'=>'m'));
+			$params['cancel_return_url'] = $this->Application->HREF($tag_params['cancel_template'],'',Array('pass'=>'m'));
+			$params['automatic_response_url'] = $this->Application->BaseURL('/in-commerce/units/gateways/gw_classes/notify_scripts').'atosorigin_notify.php';
+
+			$txt_amount = sprintf("%.2f", $item_data['TotalAmount']);
+			$params['amount'] = eregi_replace("[.,]", '', $txt_amount);
+			$params['caddie'] = $this->Application->GetSID().','.MD5($item_data['OrderId']);
+			$params['order_id'] = $item_data['OrderId'];
+			$params['customer_ip_address'] = $_SERVER['REMOTE_ADDR'];
+			$params['customer_id'] = $item_data['PortalUserId'];
+
+			$billing_email = $item_data['BillingEmail'];
+			if (!$billing_email) {
+				$billing_email = $this->Conn->GetOne('	SELECT Email FROM '.$this->Application->getUnitOption('u', 'TableName').'
+											WHERE PortalUserId = '.$this->Application->RecallVar('user_id'));
+			}
+			$params['customer_email'] = $billing_email;
+
+			$params_str = '';
+			foreach ($params as $key => $val) {
+				$params_str .= ' '.$key . '="'.$val.'"';
+			}
+			$run_line = $gw_params['request_binary'].' '.$params_str;
+
+//			$run_line = escapeshellcmd($run_line);
+//			echo $run_line;
+
+			exec ($run_line, $rets);
+
+			$ret = $rets[0];
+
+			$ret = eregi_replace("^.*\!\!", '', $ret);
+			$ret = chop($ret, '!');
+
+			return '</form>'.$ret.'<form>';
+		}
+
+		function NeedPlaceButton($item_data, $tag_params, $gw_params)
+		{
+			return false;
+		}
+
+		function processNotification($gw_params)
+		{
+			$params['pathfile'] = $gw_params['pathfile'];
+			$params['message'] = $_POST['DATA'];
+
+			$params_str = '';
+			foreach ($params as $key => $val) {
+				$params_str .= ' '.$key . '="'.$val.'"';
+			}
+			$run_line = $gw_params['response_binary'].' '.$params_str;
+
+			exec ($run_line, $rets);
+			$ret = $rets[0];
+
+			$result = $this->parseGWResponce($ret);
+
+			list ($sid, $auth_code) = explode(',', $result['caddie']);
+			$session =& $this->Application->recallObject('Session');
+			$session->SID = $sid;
+
+			$order_id = $this->Conn->GetOne('SELECT OrderId FROM '.TABLE_PREFIX.'Orders WHERE md5(OrderId) = '.$this->Conn->qstr($auth_code));
+			$this->Application->SetVar('ord_id', $order_id);
+			$order =& $this->Application->recallObject('ord');
+			$order->Load($order_id);
+
+			return $result['response_code'] === '00' ? 1 : 0;
+		}
+
+		function parseGWResponce($str)
+		{
+			$response = explode ("!", $str);
+
+			$result = Array (
+				'code' => $response[1],
+				'error' => $response[2],
+				'merchant_id' => $response[3],
+				'merchant_country' => $response[4],
+				'amount' => $response[5],
+				'transaction_id' => $response[6],
+				'payment_means' => $response[7],
+				'transmission_date' => $response[8],
+				'payment_time' => $response[9],
+				'payment_date' => $response[10],
+				'response_code' => $response[11],
+				'payment_certificate' => $response[12],
+				'authorisation_id' => $response[13],
+				'currency_code' => $response[14],
+				'card_number' => $response[15],
+				'cvv_flag' => $response[16],
+				'cvv_response_code' => $response[17],
+				'bank_response_code' => $response[18],
+				'complementary_code' => $response[19],
+				'complementary_info' => $response[20],
+				'return_context' => $response[21],
+				'caddie' => $response[22],
+				'receipt_complement' => $response[23],
+				'merchant_language' => $response[24],
+				'language' => $response[25],
+				'customer_id' => $response[26],
+				'order_id' => $response[27],
+				'customer_email' => $response[28],
+				'customer_ip_address' => $response[29],
+				'capture_day' => $response[30],
+				'capture_mode' => $response[31],
+				'data' => $response[32],
+			);
+			$this->parsed_responce = $result;
+			return $result;
+		}
+
+		function getGWResponce()
+		{
+			return serialize($this->parsed_responce);
+		}
+
+		function getErrorMsg()
+		{
+			$msg = $this->parsed_responce['error'];
+			if (!$msg) {
+				if ($this->parsed_responce['response_code'] != '00') {
+					$msg = 'Transaction failed';
+				}
+			}
+			return $msg;
+		}
+	}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gateways/gw_classes/atosorigin.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gateways/gw_classes/paypal_direct.php
===================================================================
--- branches/5.1.x/in-commerce/units/gateways/gw_classes/paypal_direct.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gateways/gw_classes/paypal_direct.php	(revision 12131)
@@ -0,0 +1,231 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	require_once GW_CLASS_PATH.'/gw_base.php';
+
+	$class_name = 'kGWPaypalDirect'; // for automatic installation
+
+	class kGWPaypalDirect extends kGWBase
+	{
+		function InstallData()
+		{
+			$data = array(
+				'Gateway' => Array('Name' => 'PayPal Pro', 'ClassName' => 'kGWPaypalDirect', 'ClassFile' => 'paypal_direct.php', 'RequireCCFields' => 1),
+				'ConfigFields' => Array(
+					'submit_url' => Array('Name' => 'Submit URL', 'Type' => 'text', 'ValueList' => '', 'Default' => 'https://api-3t.paypal.com/nvp'),
+					'api_username' => Array('Name' => 'PayPal Pro API Username', 'Type' => 'text', 'ValueList' => '', 'Default' => ''),
+					'api_password' => Array('Name' => 'PayPal Pro API Password', 'Type' => 'text', 'ValueList' => '', 'Default' => ''),
+					'signature' => Array('Name' => 'PayPal Pro API Signature', 'Type' => 'text', 'ValueList' => '', 'Default' => ''),
+					'shipping_control' => Array('Name' => 'Shipping Control', 'Type' => 'select', 'ValueList' => '3=la_CreditDirect', 'Default' => '3'),
+				)
+			);
+			return $data;
+		}
+
+		function DirectPayment($item_data, $gw_params)
+		{
+			$post_fields = Array();
+			// -- Login Information --
+			$post_fields['METHOD']				=	'DoDirectPayment';
+			$post_fields['VERSION']				=	'52.0';
+			$post_fields['IPADDRESS']			=	$_SERVER['REMOTE_ADDR'];
+			$post_fields['USER']				=	$gw_params['api_username'];
+			$post_fields['PWD']					=	$gw_params['api_password'];
+			$post_fields['SIGNATURE']			=	$gw_params['signature'];
+			$post_fields['PAYMENTACTION']		=	'Sale';
+			$post_fields['AMT']					=	sprintf('%.2f', $item_data['TotalAmount']);
+
+			switch ($item_data['PaymentCardType']) {
+				case 1:
+					$post_fields['CREDITCARDTYPE'] = 'Visa';
+					break;
+				case 2:
+					$post_fields['CREDITCARDTYPE'] = 'MasterCard';
+					break;
+				case 3:
+					$post_fields['CREDITCARDTYPE'] = 'Amex';
+					break;
+				case 4:
+					$post_fields['CREDITCARDTYPE'] = 'Discover';
+					break;
+				default:
+					$this->parsed_responce['responce_reason_text'] = 'Invalid Credit Card Type';
+					return false;
+			}
+
+			$post_fields['ACCT']				=	$item_data['PaymentAccount'];
+			$date_parts = explode('/', $item_data['PaymentCCExpDate']);
+			$post_fields['EXPDATE']				=	$date_parts[0].'20'.$date_parts[1];
+			$post_fields['CVV2']				=	$item_data['PaymentCVV2'];
+
+			$names = explode(' ', $item_data['PaymentNameOnCard'], 2);
+			$post_fields['FIRSTNAME']			=	getArrayValue($names, 0);
+			$post_fields['LASTNAME']			=	getArrayValue($names, 1);
+
+			$post_fields['STREET']				=	$item_data['BillingAddress1'];
+			$post_fields['STREET2']				=	$item_data['BillingAddress2'];
+			$post_fields['CITY']				=	$item_data['BillingCity'];
+			$post_fields['STATE']				=	$item_data['BillingState'];
+			$sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = %s';
+			$post_fields['COUNTRYCODE']			=	$this->Conn->GetOne( sprintf($sql, $this->Conn->qstr($item_data['BillingCountry']) ) );
+			$post_fields['ZIP']					=	$item_data['BillingZip'];
+			$post_fields['INVNUM']				=	$item_data['OrderNumber'];
+			$post_fields['CUSTOM']				=	$item_data['PortalUserId'];
+
+/*
+			$post_fields['x_encap_char']		=	$gw_params['encapsulate_char'];
+			$post_fields['x_relay_response']	=	'False';
+			$post_fields['x_type']				=	$gw_params['shipping_control'] == SHIPPING_CONTROL_PREAUTH ? 'AUTH_ONLY' : 'AUTH_CAPTURE';
+			$post_fields['x_login']				=	$gw_params['user_account'];
+			$post_fields['x_tran_key']			=	$gw_params['transaction_key'];
+
+			if( $this->IsTestMode() ) $post_fields['x_test_request'] = 'True';
+
+			// -- Payment Details --
+			$names = explode(' ', $item_data['PaymentNameOnCard'], 2);
+			$post_fields['x_first_name']		=	getArrayValue($names, 0);
+			$post_fields['x_last_name']			=	getArrayValue($names, 1);
+			$post_fields['x_amount']			=	sprintf('%.2f', $item_data['TotalAmount']);
+			$post_fields['x_company']			=	$item_data['BillingCompany'];
+			$post_fields['x_card_num']			=	$item_data['PaymentAccount'];
+			$post_fields['x_card_code']			=	$item_data['PaymentCVV2'];
+			$post_fields['x_exp_date']			=	$item_data['PaymentCCExpDate'];
+			$post_fields['x_address']			=	$item_data['BillingAddress1'].' '.$item_data['BillingAddress2'];
+			$post_fields['x_city']				=	$item_data['BillingCity'];
+			$post_fields['x_state']				=	$item_data['BillingState'];
+			$post_fields['x_zip']				=	$item_data['BillingZip'];
+
+			$recurring = getArrayValue($item_data, 'IsRecurringBilling') ? 'YES' : 'NO';
+			$post_fields['x_recurring_billing'] = $recurring;
+
+			$billing_email = $item_data['BillingEmail'];
+			if (!$billing_email) {
+				$billing_email = $this->Conn->GetOne('	SELECT Email FROM '.$this->Application->getUnitOption('u', 'TableName').'
+											WHERE PortalUserId = '.$this->Application->RecallVar('user_id'));
+			}
+			$post_fields['x_email'] = $billing_email;
+			$post_fields['x_phone'] = $item_data['BillingPhone'];
+			$sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = %s';
+			$post_fields['x_country']			=	$this->Conn->GetOne( sprintf($sql, $this->Conn->qstr($item_data['BillingCountry']) ) );
+
+			$post_fields['x_cust_id']			=	$item_data['PortalUserId'];
+			$post_fields['x_invoice_num']		=	$item_data['OrderNumber'];
+			$post_fields['x_description']		=	'Invoice #'.$item_data['OrderNumber'];
+			$post_fields['x_email_customer']	=	'FALSE';
+*/
+//			echo '<pre>';
+//			print_r($post_fields);
+//			exit;
+			$this->gw_responce = curl_post($gw_params['submit_url'], $post_fields);
+//			echo $this->gw_responce;
+//			exit;
+			$gw_responce = $this->parseGWResponce(null, $gw_params);
+			// gw_error_msg: $gw_response['responce_reason_text']
+			// gw_error_code: $gw_response['responce_reason_code']
+//			echo '<pre>';
+//			print_r($this->parsed_responce);
+//			exit;
+			return (isset($gw_responce['ACK']) && (substr($gw_responce['ACK'], 0, 7) == 'Success')) ? true : false;
+		}
+
+		/**
+		 * Perform SALE type transaction direct from php script wihtout redirecting to 3rd-party website
+		 *
+		 * @param Array $item_data
+		 * @param Array $gw_params
+		 * @return bool
+		 */
+/*
+		function Charge($item_data, $gw_params)
+		{
+			$gw_responce = unserialize( $item_data['GWResult1'] );
+
+			if( $item_data['PortalUserId'] != $gw_responce['customer_id'] ) return false;
+
+			if( ( strtolower($gw_responce['transaction_type']) == 'auth_only') )
+			{
+				$post_fields = Array();
+				// -- Login Information --
+				$post_fields['x_version']			=	'3.1';
+				$post_fields['x_delim_data']		=	'True';
+				$post_fields['x_encap_char']		=	$gw_params['encapsulate_char'];
+				$post_fields['x_relay_response']	=	'False';
+				$post_fields['x_type']				=	'PRIOR_AUTH_CAPTURE'; // $gw_params['shipping_control'] == SHIPPING_CONTROL_PREAUTH ? 'PRIOR_AUTH_CAPTURE' : 'AUTH_CAPTURE'; // AUTH_CAPTURE not fully impletemnted/needed here
+				$post_fields['x_login']				=	$gw_params['user_account'];
+				$post_fields['x_tran_key']			=	$gw_params['transaction_key'];
+				$post_fields['x_trans_id']			=	$gw_responce['transaction_id'];
+
+				if( $this->IsTestMode() ) $post_fields['x_test_request'] = 'True';
+
+				$this->gw_responce = curl_post($gw_params['submit_url'], $post_fields);
+				$gw_responce = $this->parseGWResponce(null, $gw_params);
+
+				// gw_error_msg: $gw_response['responce_reason_text']
+				// gw_error_code: $gw_response['responce_reason_code']
+				return (is_numeric($gw_responce['responce_code']) && $gw_responce['responce_code'] != 1 && !$this->IsTestMode()) ? false : true;
+			}
+			else
+			{
+				return true;
+			}
+		}
+*/
+		/**
+		 * Parse previosly saved gw responce into associative array
+		 *
+		 * @param string $gw_responce
+		 * @param Array $gw_params
+		 * @return Array
+		 */
+		function parseGWResponce($gw_responce = null, $gw_params)
+		{
+			if( !isset($gw_responce) ) $gw_responce = $this->gw_responce;
+
+			if ($this->Application->isDebugMode()) {
+				$this->Application->Debugger->appendHTML('Curl Error #'.$GLOBALS['curl_errorno'].'; Error Message: '.$GLOBALS['curl_error']);
+
+				$this->Application->Debugger->appendHTML('Authorize.Net Responce:');
+				$this->Application->Debugger->dumpVars($gw_responce);
+			}
+
+			$a_responce = explode('&', $gw_responce);
+			$ret = Array();
+			foreach($a_responce as $field)
+			{
+				$pos = strpos($field, '=');
+				if ($pos) {
+					$ret[substr($field, 0, $pos)] = urldecode(substr($field, $pos + 1));
+				}
+			}
+			$this->parsed_responce = $ret;
+//			$ret['unparsed'] = $gw_responce;
+			return $ret;
+		}
+
+		function getGWResponce()
+		{
+			return serialize($this->parsed_responce);
+		}
+
+		function getErrorMsg()
+		{
+			return $this->parsed_responce['L_LONGMESSAGE0'];
+		}
+
+		function GetTestCCNumbers()
+		{
+			return array('370000000000002', '6011000000000012', '5424000000000015', '4007000000027', '4222222222222');
+		}
+	}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gateways/gw_classes/paypal_direct.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gateways/gw_classes/authorizenet.php
===================================================================
--- branches/5.1.x/in-commerce/units/gateways/gw_classes/authorizenet.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gateways/gw_classes/authorizenet.php	(revision 12131)
@@ -0,0 +1,170 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	require_once GW_CLASS_PATH.'/gw_base.php';
+
+	class kGWAuthorizeNet extends kGWBase
+	{
+		function DirectPayment($item_data, $gw_params)
+		{
+			$post_fields = Array();
+			// -- Login Information --
+			$post_fields['x_version']			=	'3.1';
+			$post_fields['x_delim_data']		=	'True';
+			$post_fields['x_encap_char']		=	$gw_params['encapsulate_char'];
+			$post_fields['x_relay_response']	=	'False';
+			$post_fields['x_type']				=	$gw_params['shipping_control'] == SHIPPING_CONTROL_PREAUTH ? 'AUTH_ONLY' : 'AUTH_CAPTURE';
+			$post_fields['x_login']				=	$gw_params['user_account'];
+			$post_fields['x_tran_key']			=	$gw_params['transaction_key'];
+
+			if( $this->IsTestMode() ) $post_fields['x_test_request'] = 'True';
+
+			// -- Payment Details --
+			$names = explode(' ', $item_data['PaymentNameOnCard'], 2);
+			$post_fields['x_first_name']		=	getArrayValue($names, 0);
+			$post_fields['x_last_name']			=	getArrayValue($names, 1);
+			$post_fields['x_amount']			=	sprintf('%.2f', $item_data['TotalAmount']);
+			$post_fields['x_company']			=	$item_data['BillingCompany'];
+			$post_fields['x_card_num']			=	$item_data['PaymentAccount'];
+			$post_fields['x_card_code']			=	$item_data['PaymentCVV2'];
+			$post_fields['x_exp_date']			=	$item_data['PaymentCCExpDate'];
+			$post_fields['x_address']			=	$item_data['BillingAddress1'].' '.$item_data['BillingAddress2'];
+			$post_fields['x_city']				=	$item_data['BillingCity'];
+			$post_fields['x_state']				=	$item_data['BillingState'];
+			$post_fields['x_zip']				=	$item_data['BillingZip'];
+
+			$recurring = getArrayValue($item_data, 'IsRecurringBilling') ? 'YES' : 'NO';
+			$post_fields['x_recurring_billing'] = $recurring;
+
+			$billing_email = $item_data['BillingEmail'];
+			if (!$billing_email) {
+				$billing_email = $this->Conn->GetOne('	SELECT Email FROM '.$this->Application->getUnitOption('u', 'TableName').'
+											WHERE PortalUserId = '.$this->Application->RecallVar('user_id'));
+			}
+			$post_fields['x_email'] = $billing_email;
+			$post_fields['x_phone'] = $item_data['BillingPhone'];
+			$sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = %s';
+			$post_fields['x_country']			=	$this->Conn->GetOne( sprintf($sql, $this->Conn->qstr($item_data['BillingCountry']) ) );
+
+			$post_fields['x_cust_id']			=	$item_data['PortalUserId'];
+			$post_fields['x_invoice_num']		=	$item_data['OrderNumber'];
+			$post_fields['x_description']		=	'Invoice #'.$item_data['OrderNumber'];
+			$post_fields['x_email_customer']	=	'FALSE';
+
+			$this->gw_responce = curl_post($gw_params['submit_url'], $post_fields);
+			$gw_responce = $this->parseGWResponce(null, $gw_params);
+
+			// gw_error_msg: $gw_response['responce_reason_text']
+			// gw_error_code: $gw_response['responce_reason_code']
+			return (is_numeric($gw_responce['responce_code']) && $gw_responce['responce_code'] == 1) ? true : false;
+		}
+
+		/**
+		 * Perform SALE type transaction direct from php script wihtout redirecting to 3rd-party website
+		 *
+		 * @param Array $item_data
+		 * @param Array $gw_params
+		 * @return bool
+		 */
+		function Charge($item_data, $gw_params)
+		{
+			$gw_responce = unserialize( $item_data['GWResult1'] );
+
+			if( ($item_data['PortalUserId'] != $gw_responce['customer_id']) && ($gw_repsponce['customer_id'] != -2 && !$this->Application->IsAdmin())) return false;
+
+			if( ( strtolower($gw_responce['transaction_type']) == 'auth_only') )
+			{
+				$post_fields = Array();
+				// -- Login Information --
+				$post_fields['x_version']			=	'3.1';
+				$post_fields['x_delim_data']		=	'True';
+				$post_fields['x_encap_char']		=	$gw_params['encapsulate_char'];
+				$post_fields['x_relay_response']	=	'False';
+				$post_fields['x_type']				=	'PRIOR_AUTH_CAPTURE'; // $gw_params['shipping_control'] == SHIPPING_CONTROL_PREAUTH ? 'PRIOR_AUTH_CAPTURE' : 'AUTH_CAPTURE'; // AUTH_CAPTURE not fully impletemnted/needed here
+				$post_fields['x_login']				=	$gw_params['user_account'];
+				$post_fields['x_tran_key']			=	$gw_params['transaction_key'];
+				$post_fields['x_trans_id']			=	$gw_responce['transaction_id'];
+
+				if( $this->IsTestMode() ) $post_fields['x_test_request'] = 'True';
+
+				$this->gw_responce = curl_post($gw_params['submit_url'], $post_fields);
+				$gw_responce = $this->parseGWResponce(null, $gw_params);
+
+				// gw_error_msg: $gw_response['responce_reason_text']
+				// gw_error_code: $gw_response['responce_reason_code']
+				return (is_numeric($gw_responce['responce_code']) && $gw_responce['responce_code'] == 1) || $this->IsTestMode() ? true : false;
+			}
+			else
+			{
+				return true;
+			}
+		}
+
+		/**
+		 * Parse previosly saved gw responce into associative array
+		 *
+		 * @param string $gw_responce
+		 * @param Array $gw_params
+		 * @return Array
+		 */
+		function parseGWResponce($gw_responce = null, $gw_params)
+		{
+			if( !isset($gw_responce) ) $gw_responce = $this->gw_responce;
+
+			if ($this->Application->isDebugMode()) {
+				$this->Application->Debugger->appendHTML('Curl Error #'.$GLOBALS['curl_errorno'].'; Error Message: '.$GLOBALS['curl_error']);
+
+				$this->Application->Debugger->appendHTML('Authorize.Net Responce:');
+				$this->Application->Debugger->dumpVars($gw_responce);
+			}
+
+			$fields = Array('responce_code','responce_sub_code','responce_reason_code','responce_reason_text',
+							'approval_code','avs_result_code','transaction_id','invoice_number','description',
+							'amount','method','transaction_type','customer_id','first_name','last_name','company',
+							'address','city','state','zip','country','phone','fax','email');
+
+			$encapsulate_char = $gw_params['encapsulate_char'];
+			if($encapsulate_char)
+			{
+				$ec_length = strlen($encapsulate_char);
+				$gw_responce = substr($gw_responce, $ec_length, $ec_length * -1);
+			}
+
+			$gw_responce = explode($encapsulate_char.','.$encapsulate_char, $gw_responce);
+			$ret = Array();
+			foreach($fields as $field_index => $field_name)
+			{
+				$ret[$field_name] = $gw_responce[$field_index];
+				unset($gw_responce[$field_index]);
+			}
+			$this->parsed_responce = $ret;
+			return array_merge_recursive2($ret, $gw_responce); // returns unparsed fields with they original indexes together with parsed ones
+		}
+
+		function getGWResponce()
+		{
+			return serialize($this->parsed_responce);
+		}
+
+		function getErrorMsg()
+		{
+			return $this->parsed_responce['responce_reason_text'];
+		}
+
+		function GetTestCCNumbers()
+		{
+			return array('370000000000002', '6011000000000012', '5424000000000015', '4007000000027', '4222222222222');
+		}
+	}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gateways/gw_classes/authorizenet.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.17
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gateways/gw_classes/google_checkout.php
===================================================================
--- branches/5.1.x/in-commerce/units/gateways/gw_classes/google_checkout.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gateways/gw_classes/google_checkout.php	(revision 12131)
@@ -0,0 +1,940 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	require_once GW_CLASS_PATH.'/gw_base.php';
+
+	$class_name = 'kGWGoogleCheckout'; // for automatic installation
+
+	class kGWGoogleCheckout extends kGWBase
+	{
+		var $gwParams = Array ();
+
+		function InstallData()
+		{
+			$data = array(
+				'Gateway' => Array('Name' => 'Google Checkout', 'ClassName' => 'kGWGoogleCheckout', 'ClassFile' => 'google_checkout.php', 'RequireCCFields' => 0),
+				'ConfigFields' => Array(
+					'submit_url' => Array('Name' => 'Submit URL', 'Type' => 'text', 'ValueList' => '', 'Default' => 'https://checkout.google.com/api/checkout/v2'),
+					'merchant_id' => Array('Name' => 'Google merchant ID', 'Type' => 'text', 'ValueList' => '', 'Default' => ''),
+					'merchant_key' => Array('Name' => 'Google merchant key', 'Type' => 'text', 'ValueList' => '', 'Default' => ''),
+					'shipping_control' => Array('Name' => 'Shipping Control', 'Type' => 'select', 'ValueList' => '3=la_CreditDirect,4=la_CreditPreAuthorize', 'Default' => 3),
+				)
+			);
+			return $data;
+		}
+
+		/**
+		 * Returns payment form submit url
+		 *
+		 * @param Array $gw_params gateway params from payment type config
+		 * @return string
+		 */
+		function getFormAction($gw_params)
+		{
+			return $gw_params['submit_url'].'/checkout/Merchant/'.$gw_params['merchant_id'];
+		}
+
+		/**
+		 * Processed input data and convets it to fields understandable by gateway
+		 *
+		 * @param Array $item_data current order fields
+		 * @param Array $tag_params additional params for gateway passed through tag
+		 * @param Array $gw_params gateway params from payment type config
+		 * @return Array
+		 */
+		function getHiddenFields($item_data, $tag_params, $gw_params)
+		{
+			$ret = Array();
+			$this->gwParams = $gw_params;
+
+			$cart_xml = $this->getCartXML($item_data);
+
+			$ret['cart'] = base64_encode($cart_xml);
+    		$ret['signature'] = base64_encode( $this->CalcHmacSha1($cart_xml, $gw_params) );
+
+			return $ret;
+		}
+
+		function getCartXML($cart_fields)
+		{
+			// 1. prepare shopping cart content
+			$sql = 'SELECT *
+					FROM '.TABLE_PREFIX.'OrderItems oi
+					LEFT JOIN '.TABLE_PREFIX.'Products p ON p.ProductId = oi.ProductId
+					WHERE oi.OrderId = '.$cart_fields['OrderId'];
+			$order_items = $this->Conn->Query($sql);
+
+			$ml_formatter =& $this->Application->recallObject('kMultiLanguage');
+			/* @var $ml_formatter kMultiLanguage */
+
+			$cart_xml = Array ();
+			foreach ($order_items as $order_item) {
+				$cart_xml[] = '	<item>
+					        		<item-name>'.htmlspecialchars($order_item['ProductName']).'</item-name>
+					        		<item-description>'.htmlspecialchars($order_item[$ml_formatter->LangFieldName('DescriptionExcerpt')]).'</item-description>'.
+									$this->getPriceXML('unit-price', $order_item['Price']).'
+					        		<quantity>'.$order_item['Quantity'].'</quantity>
+								</item>';
+			}
+			$cart_xml = '<items>'.implode("\n", $cart_xml).'</items>';
+
+			// 2. add order identification info (for google checkout notification)
+			$cart_xml .= '	<merchant-private-data>
+								<session_id>'.$this->Application->GetSID().'</session_id>
+								<order_id>'.$cart_fields['OrderId'].'</order_id>
+							</merchant-private-data>';
+
+			// 3. add all shipping types (with no costs)
+			$sql = 'SELECT Name
+					FROM '.TABLE_PREFIX.'ShippingType
+					WHERE Status = '.STATUS_ACTIVE;
+			$shipping_types = $this->Conn->GetCol($sql);
+
+			$shipping_xml = '';
+			foreach ($shipping_types as $shipping_name) {
+				$shipping_xml .= '	<merchant-calculated-shipping name="'.htmlspecialchars($shipping_name).'">
+										<price currency="USD">0.00</price>
+									</merchant-calculated-shipping>';
+			}
+
+			$use_ssl = substr($this->gwParams['submit_url'], 0, 8) == 'https://' ? true : null;
+			$shipping_url = $this->Application->BaseURL('/in-commerce/units/gateways/gw_classes/notify_scripts', $use_ssl).'google_checkout_shippings.php';
+
+			$shipping_xml = '<merchant-checkout-flow-support>
+								<shipping-methods>'.$shipping_xml.'</shipping-methods>
+					      		<merchant-calculations>
+					      			<merchant-calculations-url>'.$shipping_url.'</merchant-calculations-url>
+					      		</merchant-calculations>
+					    	</merchant-checkout-flow-support>';
+
+			$xml = '<checkout-shopping-cart xmlns="http://checkout.google.com/schema/2">
+					  <shopping-cart>'.$cart_xml.'</shopping-cart>
+					  <checkout-flow-support>'.$shipping_xml.'</checkout-flow-support>
+					</checkout-shopping-cart>';
+
+			return $xml;
+		}
+
+		/**
+		 * Returns price formatted as xml tag
+		 *
+		 * @param string $tag_name
+		 * @param float $price
+		 * @return string
+		 */
+		function getPriceXML($tag_name, $price)
+		{
+			$currency = $this->Application->RecallVar('curr_iso');
+			return '<'.$tag_name.' currency="'.$currency.'">'.sprintf('%.2f', $price).'</'.$tag_name.'>';
+		}
+
+	    /**
+	     * Calculates the cart's hmac-sha1 signature, this allows google to verify
+	     * that the cart hasn't been tampered by a third-party.
+	     *
+	     * {@link http://code.google.com/apis/checkout/developer/index.html#create_signature}
+	     *
+	     * @param string $data the cart's xml
+	     * @return string the cart's signature (in binary format)
+	     */
+	    function CalcHmacSha1($data, $gw_params) {
+	      $key = $gw_params['merchant_key'];
+	      $blocksize = 64;
+	      $hashfunc = 'sha1';
+	      if (mb_strlen($key) > $blocksize) {
+	        $key = pack('H*', $hashfunc($key));
+	      }
+	      $key = str_pad($key, $blocksize, chr(0x00));
+	      $ipad = str_repeat(chr(0x36), $blocksize);
+	      $opad = str_repeat(chr(0x5c), $blocksize);
+	      $hmac = pack(
+	                    'H*', $hashfunc(
+	                            ($key^$opad).pack(
+	                                    'H*', $hashfunc(
+	                                            ($key^$ipad).$data
+	                                    )
+	                            )
+	                    )
+	                );
+	      return $hmac;
+	    }
+
+	    /**
+	     * Returns XML request, that GoogleCheckout posts to notification / shipping calculation scripts
+	     *
+	     * @return string
+	     */
+	    function getRequestXML()
+	    {
+	    	$xml_data = $GLOBALS['HTTP_RAW_POST_DATA'];
+
+	    	if ($this->Application->isDebugMode()) {
+		    	$fp = fopen(FULL_PATH.'/xml_request.html', 'a');
+				fwrite($fp, '--- '.adodb_date('Y-m-d H:i:s').' ---'."\n".$xml_data);
+				fclose($fp);
+	    	}
+
+	    	return $xml_data;
+
+	    	// for debugging
+	    	/*return '<order-state-change-notification xmlns="http://checkout.google.com/schema/2"
+					    serial-number="c821426e-7caa-4d51-9b2e-48ef7ecd6423">
+					    <google-order-number>434532759516557</google-order-number>
+					    <new-financial-order-state>CHARGEABLE</new-financial-order-state>
+					    <new-fulfillment-order-state>NEW</new-fulfillment-order-state>
+					    <previous-financial-order-state>REVIEWING</previous-financial-order-state>
+					    <previous-fulfillment-order-state>NEW</previous-fulfillment-order-state>
+					    <timestamp>2007-03-19T15:06:29.051Z</timestamp>
+					</order-state-change-notification>';*/
+	    }
+
+	    /**
+	     * Processes notifications from google checkout
+	     *
+	     * @param Array $gw_params
+	     * @return int
+	     */
+		function processNotification($gw_params)
+		{
+    		// parse xml & get order_id from there, like sella pay
+    		$this->gwParams = $gw_params;
+
+    		$xml_helper =& $this->Application->recallObject('kXMLHelper');
+    		/* @var $xml_helper kXMLHelper */
+
+			$root_node =& $xml_helper->Parse( $this->getRequestXML() );
+    		/* @var $root_node kXMLNode */
+
+    		$this->Application->XMLHeader();
+			define('DBG_SKIP_REPORTING', 1);
+
+			$order_approvable = false;
+
+			switch ($root_node->Name) {
+				case 'MERCHANT-CALCULATION-CALLBACK':
+					$xml_responce = $this->getShippingXML($root_node);
+					break;
+
+				case 'NEW-ORDER-NOTIFICATION':
+				case 'RISK-INFORMATION-NOTIFICATION':
+				case 'ORDER-STATE-CHANGE-NOTIFICATION':
+					// http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API_Notification_API.html#new_order_notifications
+					list ($order_approvable, $xml_responce) = $this->getNotificationResponceXML($root_node);
+					break;
+			}
+
+			echo $xml_responce;
+
+			if ($this->Application->isDebugMode()) {
+	    		$fp = fopen(FULL_PATH.'/xml_responce.html', 'a');
+				fwrite($fp, '--- '.adodb_date('Y-m-d H:i:s').' ---'."\n".$xml_responce."\n");
+				fclose($fp);
+			}
+
+    		return $order_approvable ? 1 : 0;
+		}
+
+		/**
+		 * Processes notification
+		 *
+		 * @param kXMLNode $root_node
+		 */
+		function getNotificationResponceXML(&$root_node)
+		{
+			// we can get notification type by "$root_node->Name"
+
+			$order_approvable = false;
+			switch ($root_node->Name) {
+				case 'NEW-ORDER-NOTIFICATION':
+					$order_approvable = $this->processNewOrderNotification($root_node);
+					break;
+
+				case 'RISK-INFORMATION-NOTIFICATION':
+					$order_approvable = $this->processRiskInformationNotification($root_node);
+					break;
+
+				case 'ORDER-STATE-CHANGE-NOTIFICATION':
+					$order_approvable = $this->processOrderStateChangeNotification($root_node);
+					break;
+			}
+
+
+
+			// !!! globally set order id, so gw_responce.php will not fail in setting TransactionStatus
+
+			// 1. receive new order notification
+			// put address & payment type in our order using id found in merchant-private-data (Make order status: Incomplete)
+
+			// 2. receive risk information
+			// don't know what to do, just mark order some how (Make order status: Incomplete)
+
+			// 3. receive status change notification to CHARGEABLE (Make order status: Pending)
+			// only mark order status
+
+			// 4. admin approves order
+			// make api call, that changes order state (fulfillment-order-state) to PROCESSING or DELIVERED (see manual)
+
+			// 5. admin declines order
+			// make api call, that changes order state (fulfillment-order-state) to WILL_NOT_DELIVER
+
+			// Before you ship the items in an order, you should ensure that you have already received the new order notification for the order,
+			// the risk information notification for the order and an order state change notification informing you that the order's financial
+			// state has been updated to CHARGEABLE
+
+			return Array ($order_approvable, '<notification-acknowledgment xmlns="http://checkout.google.com/schema/2" serial-number="'.$root_node->Attributes['SERIAL-NUMBER'].'" />');
+		}
+
+		/**
+		 * Returns shipping calculations and places part of shipping address into order (1st step)
+		 *
+		 * http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API_Merchant_Calculations_API.html#Returning_Merchant_Calculation_Results
+		 *
+		 * @param kXMLNode $node
+		 * @return string
+		 */
+		function getShippingXML(&$root_node)
+		{
+			// 1. extract data from xml
+			$search_nodes = Array (
+				'SHOPPING-CART:MERCHANT-PRIVATE-DATA',
+				'CALCULATE:ADDRESSES:ANONYMOUS-ADDRESS',
+				'CALCULATE:SHIPPING',
+			);
+
+			foreach ($search_nodes as $search_string) {
+				$found_node =& $root_node;
+				/* @var $found_node kXMLNode */
+
+				$search_string = explode(':', $search_string);
+				foreach ($search_string as $search_node) {
+					$found_node =& $found_node->FindChild($search_node);
+				}
+
+				$node_data = Array ();
+				$sub_node =& $found_node->firstChild;
+				/* @var $sub_node kXMLNode */
+
+				do {
+					if ($found_node->Name == 'SHIPPING') {
+						$node_data[] = $sub_node->Attributes['NAME'];
+					}
+					else {
+						$node_data[$sub_node->Name] = $sub_node->Data;
+					}
+				} while ( ($sub_node =& $sub_node->NextSibling()) );
+
+
+				switch ($found_node->Name) {
+					case 'MERCHANT-PRIVATE-DATA':
+						$order_id = $node_data['ORDER_ID'];
+						$session_id = $node_data['SESSION_ID'];
+						break;
+
+					case 'ANONYMOUS-ADDRESS':
+						$address_info = $node_data;
+						$address_id = $found_node->Attributes['ID'];
+						break;
+
+					case 'SHIPPING':
+						$process_shippings = $node_data;
+						break;
+				}
+			}
+
+			// 2. update shipping address in order
+			$order =& $this->Application->recallObject('ord', null, Array ('skip_autoload' => true));
+			/* @var $order OrdersItem */
+
+			$order->Load($order_id);
+
+			$shipping_address = Array (
+				'ShippingCity' => $address_info['CITY'],
+				'ShippingState' => $address_info['REGION'],
+				'ShippingZip' => $address_info['POSTAL-CODE'],
+			);
+
+			$shipping_address['ShippingCountry'] = $this->getCountryISO($address_info['COUNTRY-CODE']);
+
+			$order->SetDBFieldsFromHash($shipping_address);
+			$order->Update();
+
+			// 3. get shipping rates based on given address
+
+			$shipping_types_xml = '';
+			$shipping_types = $this->getOrderShippings($order);
+
+			// add available shipping types
+			foreach ($shipping_types as $shipping_type) {
+				$shipping_name = $shipping_type['ShippingName'];
+				$processable_shipping_index = array_search($shipping_name, $process_shippings);
+				if ($processable_shipping_index !== false) {
+					$shipping_types_xml .= '<result shipping-name="'.htmlspecialchars($shipping_name).'" address-id="'.$address_id.'">
+				    	        				<shipping-rate currency="USD">'.sprintf('%01.2f', $shipping_type['TotalCost']).'</shipping-rate>
+				        	    				<shippable>true</shippable>
+				        					</result>';
+
+					// remove available shipping type from processable list
+					unset($process_shippings[$processable_shipping_index]);
+				}
+			}
+
+			// add unavailable shipping types
+			foreach ($process_shippings as $shipping_name) {
+				$shipping_types_xml .= '<result shipping-name="'.htmlspecialchars($shipping_name).'" address-id="'.$address_id.'">
+											<shipping-rate currency="USD">0.00</shipping-rate>
+				            				<shippable>false</shippable>
+				        				</result>';
+			}
+
+			$shipping_types_xml = '<?xml version="1.0" encoding="UTF-8"?>
+									<merchant-calculation-results xmlns="http://checkout.google.com/schema/2">
+				  						<results>'.$shipping_types_xml.'</results>
+									</merchant-calculation-results>';
+			return $shipping_types_xml;
+		}
+
+		/**
+		 * Places all information from google checkout into order (2nd step)
+		 *
+		 * @param kXMLNode $root_node
+		 */
+		function processNewOrderNotification(&$root_node)
+		{
+			// 1. extract data from xml
+			$search_nodes = Array (
+				'SHOPPING-CART:MERCHANT-PRIVATE-DATA',
+				'ORDER-ADJUSTMENT:SHIPPING:MERCHANT-CALCULATED-SHIPPING-ADJUSTMENT',
+				'BUYER-ID',
+				'GOOGLE-ORDER-NUMBER',
+				'BUYER-SHIPPING-ADDRESS',
+				'BUYER-BILLING-ADDRESS',
+			);
+
+			$user_address = Array ();
+			foreach ($search_nodes as $search_string) {
+				$found_node =& $root_node;
+				/* @var $found_node kXMLNode */
+
+				$search_string = explode(':', $search_string);
+				foreach ($search_string as $search_node) {
+					$found_node =& $found_node->FindChild($search_node);
+				}
+
+				$node_data = Array ();
+				if ($found_node->Children) {
+					$sub_node =& $found_node->firstChild;
+					/* @var $sub_node kXMLNode */
+
+					do {
+						$node_data[$sub_node->Name] = $sub_node->Data;
+					} while ( ($sub_node =& $sub_node->NextSibling()) );
+				}
+
+				switch ($found_node->Name) {
+					case 'MERCHANT-PRIVATE-DATA':
+						$order_id = $node_data['ORDER_ID'];
+						$session_id = $node_data['SESSION_ID'];
+						break;
+
+					case 'MERCHANT-CALCULATED-SHIPPING-ADJUSTMENT':
+						$shpipping_info = $node_data;
+						break;
+
+					case 'BUYER-ID':
+						$buyer_id = $found_node->Data;
+						break;
+
+					case 'GOOGLE-ORDER-NUMBER':
+						$google_order_number = $found_node->Data;
+						break;
+
+					case 'BUYER-SHIPPING-ADDRESS':
+						$user_address['Shipping'] = $node_data;
+						break;
+
+					case 'BUYER-BILLING-ADDRESS':
+						$user_address['Billing'] = $node_data;
+						break;
+				}
+			}
+
+			// 2. update shipping address in order
+			$order =& $this->Application->recallObject('ord', null, Array ('skip_autoload' => true));
+			/* @var $order OrdersItem */
+
+			$order->Load($order_id);
+
+			if (!$order->isLoaded()) {
+				return false;
+			}
+
+			// 2.1. this is 100% notification from google -> mark order with such payment type
+			$order->SetDBField('PaymentType', $this->Application->GetVar('payment_type_id'));
+
+			$this->parsed_responce = Array (
+				'GOOGLE-ORDER-NUMBER' => $google_order_number,
+				'BUYER-ID' => $buyer_id
+			);
+
+			// 2.2. save google checkout order information (maybe needed for future notification processing)
+			$order->SetDBField('GWResult1', serialize($this->parsed_responce));
+			$order->SetDBField('GoogleOrderNumber', $google_order_number);
+
+			// 2.3. set user-selected shipping type
+			$shipping_types = $this->getOrderShippings($order);
+
+			foreach ($shipping_types as $shipping_type) {
+				if ($shipping_type['ShippingName'] == $shpipping_info['SHIPPING-NAME']) {
+					$order->SetDBField('ShippingInfo', serialize(Array (1 => $shipping_type))); // minimal package number is 1
+					$order->SetDBField('ShippingCost', $shipping_type['TotalCost']); // set total shipping cost
+					break;
+				}
+			}
+
+			// 2.4. set full shipping & billing address
+			$address_mapping = Array (
+				'CONTACT-NAME' => 'To',
+				'COMPANY-NAME' => 'Company',
+				'EMAIL' => 'Email',
+				'PHONE' => 'Phone',
+				'FAX' => 'Fax',
+				'ADDRESS1' => 'Address1',
+				'ADDRESS2' => 'Address2',
+				'CITY' => 'City',
+				'REGION' => 'State',
+				'POSTAL-CODE' => 'Zip',
+			);
+			foreach ($user_address as $field_prefix => $address_details) {
+				foreach ($address_mapping as $src_field => $dst_field) {
+					$order->SetDBField($field_prefix.$dst_field, $address_details[$src_field]);
+				}
+
+				if (!$order->GetDBField($field_prefix.'Phone')) {
+					$order->SetDBField($field_prefix.'Phone', '-'); // required field
+				}
+
+				$order->SetDBField($field_prefix.'Country', $this->getCountryISO($address_details['COUNTRY-CODE']));
+			}
+
+			$order->SetDBField('OnHold', 1);
+			$order->SetDBField('Status', ORDER_STATUS_PENDING);
+
+			$order->Update();
+
+			// unlink order, that GoogleCheckout used from shopping cart on site
+			$sql = 'DELETE
+					FROM '.TABLE_PREFIX.'SessionData
+					WHERE VariableName = "ord_id" AND VariableValue = '.$order->GetID();
+			$this->Conn->Query($sql);
+
+			// simulate visiting shipping screen
+			$sql = 'UPDATE '.TABLE_PREFIX.'OrderItems
+					SET PackageNum = 1
+					WHERE OrderId = '.$order->GetID();
+			$this->Conn->Query($sql);
+
+			return false;
+		}
+
+		/**
+		 * Saves risk information in order record (3rd step)
+		 *
+		 * @param kXMLNode $root_node
+		 */
+		function processRiskInformationNotification(&$root_node)
+		{
+			// 1. extract data from xml
+			$search_nodes = Array (
+				'GOOGLE-ORDER-NUMBER',
+				'RISK-INFORMATION',
+			);
+
+			foreach ($search_nodes as $search_string) {
+				$found_node =& $root_node;
+				/* @var $found_node kXMLNode */
+
+				$search_string = explode(':', $search_string);
+				foreach ($search_string as $search_node) {
+					$found_node =& $found_node->FindChild($search_node);
+				}
+
+				$node_data = Array ();
+				if ($found_node->Children) {
+					$sub_node =& $found_node->firstChild;
+					/* @var $sub_node kXMLNode */
+
+					do {
+						$node_data[$sub_node->Name] = $sub_node->Data;
+					} while ( ($sub_node =& $sub_node->NextSibling()) );
+				}
+
+				switch ($found_node->Name) {
+					case 'GOOGLE-ORDER-NUMBER':
+						$google_order_number = $found_node->Data;
+						break;
+
+					case 'RISK-INFORMATION':
+						$risk_information = $node_data;
+						unset( $risk_information['BILLING-ADDRESS'] );
+						break;
+				}
+			}
+
+			// 2. update shipping address in order
+			$order =& $this->Application->recallObject('ord', null, Array ('skip_autoload' => true));
+			/* @var $order OrdersItem */
+
+			$order->Load($google_order_number, 'GoogleOrderNumber');
+
+			if (!$order->isLoaded()) {
+				return false;
+			}
+
+			// 2.1. save risk information in order
+			$this->parsed_responce = unserialize($order->GetDBField('GWResult1'));
+			$this->parsed_responce = array_merge_recursive($this->parsed_responce, $risk_information);
+			$order->SetDBField('GWResult1', serialize($this->parsed_responce));
+
+			$order->Update();
+
+			return false;
+		}
+
+		/**
+		 * Perform PREAUTH/SALE type transaction direct from php script wihtout redirecting to 3rd-party website
+		 *
+		 * @param Array $item_data
+		 * @param Array $gw_params
+		 * @return bool
+		 */
+		function DirectPayment($item_data, $gw_params)
+		{
+			$this->gwParams = $gw_params;
+
+			if ($gw_params['shipping_control'] == SHIPPING_CONTROL_PREAUTH) {
+				// when shipping control is Pre-Authorize -> do nothing and charge when admin approves order
+				return true;
+			}
+
+			$this->_chargeOrder($item_data);
+
+			return false;
+		}
+
+		/**
+		 * Issue charge-order api call
+		 *
+		 * @param Array $item_data
+		 * @return bool
+		 */
+		function _chargeOrder($item_data)
+		{
+			$charge_xml = '	<charge-order xmlns="http://checkout.google.com/schema/2" google-order-number="'.$item_data['GoogleOrderNumber'].'">
+			    				<amount currency="USD">'.sprintf('%.2f', $item_data['TotalAmount']).'</amount>
+							</charge-order>';
+
+			$root_node =& $this->executeAPICommand($charge_xml);
+
+    		$this->parsed_responce = unserialize($item_data['GWResult1']);
+
+    		if ($root_node->Name == 'REQUEST-RECEIVED') {
+				$this->parsed_responce['FINANCIAL-ORDER-STATE'] = 'CHARGING';
+				return true;
+    		}
+
+    		return false;
+		}
+
+		/**
+		 * Perform SALE type transaction direct from php script wihtout redirecting to 3rd-party website
+		 *
+		 * @param Array $item_data
+		 * @param Array $gw_params
+		 * @return bool
+		 */
+		function Charge($item_data, $gw_params)
+		{
+			$this->gwParams = $gw_params;
+
+			if ($gw_params['shipping_control'] == SHIPPING_CONTROL_DIRECT) {
+				// when shipping control is Direct Payment -> do nothing and auto-charge on notification received
+				return true;
+			}
+
+			$this->_chargeOrder($item_data);
+
+			$order =& $this->Application->recallObject('ord.-item', null, Array ('skip_autoload' => true));
+			/* @var $order OrdersItem */
+
+			$order->Load($item_data['OrderId']);
+			if (!$order->isLoaded()) {
+				return false;
+			}
+
+			$order->SetDBField('OnHold', 1);
+			$order->Update();
+
+			return false;
+		}
+
+		/**
+		 * Executes API command for order and returns result
+		 *
+		 * @param string $command_xml
+		 * @return kXMLNode
+		 */
+		function &executeAPICommand($command_xml)
+		{
+			$submit_url = $this->gwParams['submit_url'].'/request/Merchant/'.$this->gwParams['merchant_id'];
+
+			$curl_helper =& $this->Application->recallObject('CurlHelper');
+			/* @var $curl_helper kCurlHelper */
+
+			$xml_helper =& $this->Application->recallObject('kXMLHelper');
+    		/* @var $xml_helper kXMLHelper */
+
+			$curl_helper->SetPostData($command_xml);
+			$auth_options = Array (
+				CURLOPT_USERPWD => $this->gwParams['merchant_id'].':'.$this->gwParams['merchant_key'],
+			);
+			$curl_helper->setOptions($auth_options);
+
+			$xml_responce = $curl_helper->Send($submit_url);
+
+			$root_node =& $xml_helper->Parse($xml_responce);
+    		/* @var $root_node kXMLNode */
+
+    		return $root_node;
+		}
+
+		/**
+		 * Marks order as pending, when it's google status becomes CHARGEABLE (4th step)
+		 *
+		 * @param kXMLNode $root_node
+		 */
+		function processOrderStateChangeNotification(&$root_node)
+		{
+			// 1. extract data from xml
+			$search_nodes = Array (
+				'GOOGLE-ORDER-NUMBER',
+				'NEW-FINANCIAL-ORDER-STATE',
+				'PREVIOUS-FINANCIAL-ORDER-STATE',
+			);
+
+			$order_state = Array ();
+			foreach ($search_nodes as $search_string) {
+				$found_node =& $root_node;
+				/* @var $found_node kXMLNode */
+
+				$search_string = explode(':', $search_string);
+				foreach ($search_string as $search_node) {
+					$found_node =& $found_node->FindChild($search_node);
+				}
+
+				switch ($found_node->Name) {
+					case 'GOOGLE-ORDER-NUMBER':
+						$google_order_number = $found_node->Data;
+						break;
+
+					case 'NEW-FINANCIAL-ORDER-STATE':
+						$order_state['new'] = $found_node->Data;
+						break;
+
+					case 'PREVIOUS-FINANCIAL-ORDER-STATE':
+						$order_state['old'] = $found_node->Data;
+						break;
+				}
+			}
+
+			// 2. update shipping address in order
+			$order =& $this->Application->recallObject('ord', null, Array ('skip_autoload' => true));
+			/* @var $order OrdersItem */
+
+			$order->Load($google_order_number, 'GoogleOrderNumber');
+
+			if (!$order->isLoaded()) {
+				return false;
+			}
+
+			$state_changed = ($order_state['old'] != $order_state['new']);
+
+			if ($state_changed) {
+				$order_charged = ($order_state['new'] == 'CHARGED') && ($order->GetDBField('Status') == ORDER_STATUS_PENDING);
+
+				$this->parsed_responce = unserialize($order->GetDBField('GWResult1'));
+				$this->parsed_responce['FINANCIAL-ORDER-STATE'] = $order_state['new'];
+				$order->SetDBField('GWResult1', serialize($this->parsed_responce));
+
+				if ($order_charged) {
+					// when using Pre-Authorize
+					$order->SetDBField('OnHold', 0);
+				}
+
+				$order->Update();
+
+				if ($order_charged) {
+					// when using Pre-Authorize
+					$order_eh =& $this->Application->recallObject('ord_EventHandler');
+					/* @var $order_eh OrdersEventHandler */
+
+					$order_eh->SplitOrder( new kEvent('ord:OnMassOrderApprove'), $order);
+				}
+			}
+
+			// update order record in "google_checkout_notify.php" only when such state change happens
+			$order_chargeable = ($order_state['new'] == 'CHARGEABLE') && $state_changed;
+
+			if ($order_chargeable) {
+				if ($this->gwParams['shipping_control'] == SHIPPING_CONTROL_PREAUTH) {
+					$order->SetDBField('OnHold', 0);
+					$order->Update();
+				}
+
+				$process_xml = '<process-order xmlns="http://checkout.google.com/schema/2" google-order-number="'.$order->GetDBField('GoogleOrderNumber').'"/>';
+				$root_node =& $this->executeAPICommand($process_xml);
+			}
+
+			return $order_chargeable;
+		}
+
+		/**
+		 * Returns 3 symbols ISO code from 2 symbols ISO code
+		 *
+		 * @param string $country_code
+		 * @return string
+		 */
+		function getCountryISO($country_code)
+		{
+			$sql = 'SELECT DestAbbr
+					FROM '.TABLE_PREFIX.'StdDestinations
+					WHERE DestAbbr2 = '.$this->Conn->qstr($country_code);
+			return $this->Conn->GetOne($sql);
+		}
+
+		/**
+		 * Retrieves shipping types available for given order
+		 *
+		 * @param OrdersItem $order
+		 * @return Array
+		 */
+		function getOrderShippings(&$order)
+		{
+			$weight_sql = 'IF(oi.Weight IS NULL, 0, oi.Weight * oi.Quantity)';
+
+			$query = '	SELECT
+							SUM(oi.Quantity) AS TotalItems,
+							SUM('.$weight_sql.') AS TotalWeight,
+							SUM(oi.Price * oi.Quantity) AS TotalAmount,
+							SUM(oi.Quantity) - SUM(IF(p.MinQtyFreePromoShipping > 0 AND p.MinQtyFreePromoShipping <= oi.Quantity, oi.Quantity, 0)) AS TotalItemsPromo,
+							SUM('.$weight_sql.') - SUM(IF(p.MinQtyFreePromoShipping > 0 AND p.MinQtyFreePromoShipping <= oi.Quantity, '.$weight_sql.', 0)) AS TotalWeightPromo,
+							SUM(oi.Price * oi.Quantity) - SUM(IF(p.MinQtyFreePromoShipping > 0 AND p.MinQtyFreePromoShipping <= oi.Quantity, oi.Price * oi.Quantity, 0)) AS TotalAmountPromo
+						FROM '.TABLE_PREFIX.'OrderItems oi
+						LEFT JOIN '.TABLE_PREFIX.'Products p ON oi.ProductId = p.ProductId
+						WHERE oi.OrderId = '.$order->GetID().' AND p.Type = 1';
+			$shipping_totals = $this->Conn->GetRow($query);
+
+			$this->Application->recallObject('ShippingQuoteEngine');
+			$quote_engine_collector =& $this->Application->recallObject('ShippingQuoteCollector');
+			/* @var $quote_engine_collector ShippingQuoteCollector */
+
+			$shipping_quote_params = Array(
+				'dest_country'	=>	$order->GetDBField('ShippingCountry'),
+				'dest_state'	=>	$order->GetDBField('ShippingState'),
+				'dest_postal'	=>	$order->GetDBField('ShippingZip'),
+				'dest_city'		=>	$order->GetDBField('ShippingCity'),
+				'dest_addr1'	=>	'',
+				'dest_addr2'	=>	'',
+				'dest_name'		=>	'user-' . $order->GetDBField('PortalUserId'),
+				'packages' 		=>	Array(
+										Array(
+											'package_key'	=>	'package1',
+											'weight'		=>	$shipping_totals['TotalWeight'],
+											'weight_unit'	=>	'KG',
+											'length'		=>	'',
+											'width'			=>	'',
+											'height'		=>	'',
+											'dim_unit'		=>	'IN',
+											'packaging'		=>	'BOX',
+											'contents'		=>	'OTR',
+											'insurance'		=>	'0'
+										),
+									),
+				'amount'		=>	$shipping_totals['TotalAmount'],
+				'items'			=>	$shipping_totals['TotalItems'],
+				'limit_types' 	=> 	serialize(Array ('ANY')),
+
+				'promo_params'	=>	Array (
+					'items'		=>	$shipping_totals['TotalItemsPromo'],
+					'amount'	=>	$shipping_totals['TotalAmountPromo'],
+					'weight'	=>	$shipping_totals['TotalWeightPromo'],
+				),
+			);
+
+			return $quote_engine_collector->GetShippingQuotes($shipping_quote_params);
+		}
+
+		/**
+		 * Returns gateway responce from last operation
+		 *
+		 * @return string
+		 */
+		function getGWResponce()
+		{
+			return serialize($this->parsed_responce);
+		}
+
+		/**
+		 * Informs payment gateway, that order has been shipped
+		 *
+		 * http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API_Order_Level_Shipping.html#Deliver_Order
+		 *
+		 * @param Array $item_data
+		 * @param Array $gw_params
+		 * @return bool
+		 */
+		function OrderShipped($item_data, $gw_params)
+		{
+			$this->gwParams = $gw_params;
+
+			$shipping_info = unserialize($item_data['ShippingInfo']);
+			if (getArrayValue($shipping_info, 'Code')) {
+				$traking_carrier = '<carrier>'.$item_data['Code'].'</carrier>';
+			}
+
+			if ($item_data['ShippingTracking']) {
+				$tracking_data = '<tracking-data>'.$traking_carrier.'
+        							 <tracking-number>'.$item_data['ShippingTracking'].'</tracking-number>
+        						  </tracking-data>';
+			}
+
+			$ship_xml = '	<deliver-order xmlns="http://checkout.google.com/schema/2" google-order-number="'.$item_data['GoogleOrderNumber'].'">
+								'.$traking_data.'
+    							<send-email>true</send-email>
+							</deliver-order>';
+			$root_node =& $this->executeAPICommand($ship_xml);
+		}
+
+		/**
+		 * Informs payment gateway, that order has been declined
+		 *
+		 * @param Array $item_data
+		 * @param Array $gw_params
+		 * @return bool
+		 */
+		function OrderDeclined($item_data, $gw_params)
+		{
+
+		}
+	}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gateways/gw_classes/google_checkout.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.9
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gateways/gw_classes/sella_guestpay.php
===================================================================
--- branches/5.1.x/in-commerce/units/gateways/gw_classes/sella_guestpay.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gateways/gw_classes/sella_guestpay.php	(revision 12131)
@@ -0,0 +1,159 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	require_once GW_CLASS_PATH.'/gw_base.php';
+
+	$class_name = 'kSellaGuestPayGW'; // for automatic installation
+
+	class kSellaGuestPayGW extends kGWBase
+	{
+		function InstallData()
+		{
+			$data = array(
+				'Gateway' => Array('Name' => 'Sella/GuestPay', 'ClassName' => 'kSellaGuestPayGW', 'ClassFile' => 'sella_guestpay.php', 'RequireCCFields' => 0),
+				'ConfigFields' => Array(
+					'merchant_id' => Array('Name' => 'Merchant ID', 'Type' => 'text', 'ValueList' => '', 'Default' => ''),
+					'merchant_country' => Array('Name' => 'Merchant Country Code', 'Type' => 'text', 'ValueList' => '', 'Default' => ''),
+					'currency_code' => Array('Name' => 'Currency Code', 'Type' => 'text', 'ValueList' => '', 'Default' => '978'),
+					'language_code' => Array('Name' => 'Language Code', 'Type' => 'text', 'ValueList' => '', 'Default' => '2'),
+					'shipping_control' => Array('Name' => 'Shipping Control', 'Type' => 'select', 'ValueList' => '3=la_CreditDirect,4=la_CreditPreAuthorize', 'Default' => '3'),
+				)
+			);
+			return $data;
+		}
+
+		/**
+		 * Returns payment form submit url
+		 *
+		 * @param Array $gw_params gateway params from payment type config
+		 * @return string
+		 */
+		function getFormAction($gw_params)
+		{
+			return 'https://ecomm.sella.it/gestpay/pagam.asp';
+		}
+
+		/**
+		 * Processed input data and convets it to fields understandable by gateway
+		 *
+		 * @param Array $item_data
+		 * @param Array $tag_params additional params for gateway passed through tag
+		 * @param Array $gw_params gateway params from payment type config
+		 * @return Array
+		 */
+		function getHiddenFields($item_data, $tag_params, $gw_params)
+		{
+			$a = $gw_params['merchant_id'];
+			$params['PAY1_UICCODE'] = $gw_params['currency_code'];
+			$params['PAY1_AMOUNT'] = $item_data['TotalAmount'];
+			$params['PAY1_SHOPTRANSACTIONID'] = $item_data['OrderId'];
+			$params['PAY1_IDLANGUAGE'] = $gw_params['language_code'];
+			$params['CUSTOM_INFO'] = $this->Application->GetSID().','.MD5($item_data['OrderId']);
+
+			$separator = '*P1*';
+			$b = array();
+			foreach ($params as $key=>$val) {
+				$b[] = $key.'='.urlencode(trim($val));
+			}
+			//the last one is CUSTOMINFO according to GW specs, passing the atosorigin-style 'caddie'
+			$b = join($separator, $b);
+			$url = 'https://ecomm.sella.it/CryptHTTPS/Encrypt.asp?a='.$a.'&b='.$b.'&c=2.0';
+
+			$res = curl_post($url, array(), null, 'GET');
+
+			preg_match('/#cryptstring#(.*)#\/cryptstring#/', $res, $matches);
+			$b = $matches[1];
+
+			$res = '<input type="hidden" name="a" value="'.$a.'"><input type="hidden" name="b" value="'.$b.'">';
+			return $res;
+		}
+
+		function NeedPlaceButton($item_data, $tag_params, $gw_params)
+		{
+			return true;
+		}
+
+		function processNotification($gw_params)
+		{
+			$a = $gw_params['merchant_id'];
+			$b = $_REQUEST['b'];
+			$url = 'https://ecomm.sella.it/CryptHTTPS/Decrypt.asp?a='.$a.'&b='.$b.'&c=2.0';
+
+			$ret = curl_post($url, array(), null, 'GET');
+			$result = $this->parseGWResponce($ret);
+
+			list ($sid, $auth_code) = explode(',', $result['CUSTOM_INFO']);
+			$session =& $this->Application->recallObject('Session');
+			$session->SID = $sid;
+
+			$order_id = $this->Conn->GetOne('SELECT OrderId FROM '.TABLE_PREFIX.'Orders WHERE md5(OrderId) = '.$this->Conn->qstr($auth_code));
+			$this->Application->SetVar('ord_id', $order_id);
+			$order =& $this->Application->recallObject('ord');
+			$order->Load($order_id);
+
+			if ($this->Application->GetVar('sella_ok')) {
+				if ($result['PAY1_TRANSACTIONRESULT'] == 'OK') {
+					$this->Application->Redirect('in-commerce/checkout/checkout_success', null, '_FRONT_END_', 'index.php');
+				}
+				else {
+					$this->Application->SetVar('sella_error', 1);
+				}
+			}
+			if ($this->Application->GetVar('sella_error')) {
+				$this->Application->StoreVar('gw_error', $this->getErrorMsg());
+				$this->Application->Redirect('in-commerce/checkout/billing', null, '_FRONT_END_', 'index.php');
+			}
+
+			return $result['PAY1_TRANSACTIONRESULT'] == 'OK' ? 1 : 0;
+		}
+
+		function parseGWResponce($str)
+		{
+			if (preg_match('/#decryptstring#(.*)#\/decryptstring#/', $str, $matches)) {
+				$separator = '*P1*';
+				$pairs = explode($separator, $matches[1]);
+				foreach ($pairs as $a_pair) {
+					list($key, $val) = explode('=', $a_pair);
+					$result[$key] = $val;
+				}
+			}
+			elseif (preg_match('/#error#(.*)#\/error#/', $str, $matches))
+			{
+				$result['PAY1_ERRORDESCRIPTION'] = $matches[1];
+			}
+			else { //unknown error
+				$result['PAY1_ERRORDESCRIPTION'] = 'Unknown error';
+			}
+
+			$this->parsed_responce = $result;
+			return $result;
+		}
+
+		function getGWResponce()
+		{
+			return serialize($this->parsed_responce);
+		}
+
+		function getErrorMsg()
+		{
+			$msg = $this->parsed_responce['PAY1_ERRORDESCRIPTION'];
+			if (!$msg) {
+				if ($this->parsed_responce['response_code'] != 'OK') {
+					$msg = 'Transaction failed';
+				}
+			}
+			return $msg;
+		}
+	}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gateways/gw_classes/sella_guestpay.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gateways/gw_classes/worldpay.php
===================================================================
--- branches/5.1.x/in-commerce/units/gateways/gw_classes/worldpay.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gateways/gw_classes/worldpay.php	(revision 12131)
@@ -0,0 +1,112 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	require_once GW_CLASS_PATH.'/gw_base.php';
+
+	$class_name = 'kGWWorldPay'; // for automatic installation
+
+	class kGWWorldPay extends kGWBase
+	{
+		function InstallData()
+		{
+			$data = array(
+				'Gateway' => Array('Name' => 'Worldpay', 'ClassName' => 'kGWWorldPay', 'ClassFile' => 'worldpay.php', 'RequireCCFields' => 0),
+				'ConfigFields' => Array(
+					'submit_url' => Array('Name' => 'Submit URL', 'Type' => 'text', 'ValueList' => '', 'Default' => 'https://select.worldpay.com/wcc/purchase'),
+					'instId' => Array('Name' => 'Installation ID', 'Type' => 'text', 'ValueList' => '', 'Default' => ''),
+					'callback_pw' => Array('Name' => 'Callback Password', 'Type' => 'text', 'ValueList' => '', 'Default' => ''),
+				)
+			);
+			return $data;
+		}
+
+		/**
+		 * Returns payment form submit url
+		 *
+		 * @param Array $gw_params gateway params from payment type config
+		 * @return string
+		 */
+		function getFormAction($gw_params)
+		{
+			return $gw_params['submit_url'];
+		}
+
+		/**
+		 * Processed input data and convets it to fields understandable by gateway
+		 *
+		 * @param Array $item_data
+		 * @param Array $tag_params additional params for gateway passed through tag
+		 * @param Array $gw_params gateway params from payment type config
+		 * @return Array
+		 */
+		function getHiddenFields($item_data, $tag_params, $gw_params)
+		{
+			$ret = Array();
+
+			$ret['instId'] = $gw_params['instId'];
+			$ret['cartId'] = $item_data['OrderNumber'];
+
+			if (!$this->IsTestMode()) {
+				$ret['amount'] = sprintf('%.2f', $item_data['TotalAmount']); // the total amount to be billed, in decimal form, without a currency symbol. (8 characters, decimal, 2 characters: Example: 99999999.99)
+			}
+			else {
+				$ret['testMode'] = 100; // 100 - success, 101 - failure
+				$ret['amount'] = 1;
+			}
+
+			$ret['currency'] = 'USD';
+			$ret['desc'] = 'Order #'.$item_data['OrderNumber'];
+
+			$ret['name'] = $item_data['BillingTo'];
+			$ret['address'] = $item_data['BillingAddress1'];
+			if ($item_data['BillingAddress2']) {
+				$ret['address'] .= '&#10;'.$item_data['BillingAddress2'];
+			}
+			$ret['postcode'] = $item_data['BillingZip'];
+
+			$sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = %s';
+			$ret['country'] = $this->Conn->GetOne( sprintf($sql, $this->Conn->qstr($item_data['BillingCountry']) ) );
+			$ret['tel'] = $item_data['BillingPhone'];
+			$ret['fax'] = $item_data['BillingFax'];
+			$ret['email'] = $item_data['BillingEmail'];
+			$ret['fixContact'] = 1; // contact-info not editable ?
+
+			$return_params = Array ('pass' => 'm', 'sid' => $this->Application->GetSID(), 'admin' => 1);
+			$ret['MC_return_page'] = $this->Application->HREF($tag_params['return_template'], '', $return_params);
+			$ret['MC_cancel_return_page'] = $this->Application->HREF($tag_params['cancel_template'], '', $return_params);
+
+			$ret['MC_callback'] = $this->Application->BaseURL('/in-commerce').'gw_notify.php?sid='.$this->Application->GetSID().'&admin=1&order_id='.$item_data['OrderId'];
+			return $ret;
+		}
+
+		function processNotification($gw_params)
+		{
+    		// http://support.worldpay.com/kb/integration_guides/junior/integration/help/appendicies/sjig_10100.html
+    		// SubmitURL: https://select.worldpay.com/wcc/purchase
+			// for Notification to work do this in gateway Admin Console:
+    		// Callback URL: <WPDISPLAY ITEM=MC_callback>
+    		// Callback enabled? [x]
+    		// Use callback response?[x]
+			$transaction_verified = ($this->Application->GetVar('callbackPW') == $gw_params['callback_pw']);
+    		if (!$transaction_verified) {
+    			return 0;
+    		}
+
+    		$transaction_status = $this->Application->GetVar('transStatus') == 'Y' ? 1 : 0;
+			echo curl_post($this->Application->GetVar($transaction_status ? 'MC_return_page' : 'MC_cancel_return_page'), '', null, 'GET');
+
+    		return $transaction_status;
+		}
+	}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gateways/gw_classes/worldpay.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.8.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gateways/gw_classes/paybox.php
===================================================================
--- branches/5.1.x/in-commerce/units/gateways/gw_classes/paybox.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gateways/gw_classes/paybox.php	(revision 12131)
@@ -0,0 +1,184 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	require_once GW_CLASS_PATH.'/gw_base.php';
+
+	$class_name = 'kPayboxGW'; // for automatic installation
+
+	class kPayboxGW extends kGWBase
+	{
+		function InstallData()
+		{
+			$data = array(
+				'Gateway' => Array('Name' => 'Paybox.com', 'ClassName' => 'kPayboxGW', 'ClassFile' => 'paybox.php', 'RequireCCFields' => 0),
+				'ConfigFields' => Array(
+					'binary' => Array('Name' => 'API Executable', 'Type' => 'text', 'ValueList' => '', 'Default' => ''),
+					'params_file' => Array('Name' => 'OPT Params File', 'Type' => 'text', 'ValueList' => '', 'Default' => ''),
+					'site_number' => Array('Name' => 'Site Number', 'Type' => 'text', 'ValueList' => '', 'Default' => ''),
+					'rank_number' => Array('Name' => 'Rank Number', 'Type' => 'text', 'ValueList' => '', 'Default' => ''),
+					'identity_number' => Array('Name' => 'Identity Number', 'Type' => 'text', 'ValueList' => '', 'Default' => ''),
+					'currency_code' => Array('Name' => 'Currency Code', 'Type' => 'text', 'ValueList' => '', 'Default' => '978'),
+					'shipping_control' => Array('Name' => 'Shipping Control', 'Type' => 'select', 'ValueList' => '3=la_CreditDirect,4=la_CreditPreAuthorize', 'Default' => '3'),
+				)
+			);
+			return $data;
+		}
+
+		/**
+		 * Returns payment form submit url
+		 *
+		 * @param Array $gw_params gateway params from payment type config
+		 * @return string
+		 */
+		function getFormAction($gw_params)
+		{
+			return $gw_params['submit_url'];
+		}
+
+		/**
+		 * Processed input data and convets it to fields understandable by gateway
+		 *
+		 * @param Array $item_data
+		 * @param Array $tag_params additional params for gateway passed through tag
+		 * @param Array $gw_params gateway params from payment type config
+		 * @return Array
+		 */
+		function getHiddenFields($item_data, $tag_params, $gw_params)
+		{
+			$params['PBX_MODE'] = $gw_params['params_file'] ? '34' : '4';
+			$params['PBX_OUTPUT'] = 'B';
+			$params['PBX_SITE'] = $gw_params['site_number'];
+			$params['PBX_RANG'] = $gw_params['rank_number'];
+			$params['PBX_IDENTIFIANT'] = $gw_params['identity_number'];
+			$params['PBX_OPT'] = $gw_params['params_file'];
+			$params['PBX_DEVISE'] = $gw_params['currency_code']; // 978 for the euro. 840 for the US dollar.
+
+			$params['PBX_RETOUR'] = 'amount:M;reference:R;trans:T;autorization:A;subscription:B;payment:P;card:C;trans_id:S;country:Y;error:E;expiration:D';
+
+			$params['PBX_EFFECTUE'] = $this->Application->HREF($tag_params['return_template'],'',Array('pass'=>'m'));
+			$params['PBX_REFUSE'] = $this->Application->HREF($tag_params['cancel_template'],'',Array('pass'=>'m'));
+
+			$txt_amount = sprintf("%.2f", $item_data['TotalAmount']);
+			$params['PBX_TOTAL'] = eregi_replace("[.,]", '', $txt_amount);
+			$params['PBX_CMD'] = $this->Application->GetSID().','.MD5($item_data['OrderId']);
+
+			/*$params['order_id'] = $item_data['OrderId'];
+			$params['customer_ip_address'] = $_SERVER['REMOTE_ADDR'];
+			$params['customer_id'] = $item_data['PortalUserId'];*/
+
+			$billing_email = $item_data['BillingEmail'];
+			if (!$billing_email) {
+				$billing_email = $this->Conn->GetOne('	SELECT Email FROM '.$this->Application->getUnitOption('u', 'TableName').'
+											WHERE PortalUserId = '.$this->Application->RecallVar('user_id'));
+			}
+			$params['PBX_PORTEUR'] = $billing_email;
+
+			$params_str = '';
+			foreach ($params as $key => $val) {
+				$params_str .= ' '.$key . '="'.$val.'"';
+			}
+			$run_line = $gw_params['binary'].' '.$params_str;
+
+//			$run_line = escapeshellcmd($run_line);
+//			echo escapeshellcmd($run_line);
+
+			exec ($run_line, $rets);
+
+			$ret = implode("\n", $rets);
+
+			$ret = eregi_replace("^.*\!\!", '', $ret);
+			$ret = chop($ret, '!');
+
+			return '</form>'.$ret.'<form>';
+		}
+
+		function NeedPlaceButton($item_data, $tag_params, $gw_params)
+		{
+			return false;
+		}
+
+		function processNotification($gw_params)
+		{
+			$result = $this->Application->HttpQuery->GetParams();
+			$this->parsed_responce = $result;
+
+			list ($sid, $auth_code) = explode(',', $result['reference']);
+			$session =& $this->Application->recallObject('Session');
+			$session->SID = $sid;
+
+			$order_id = $this->Conn->GetOne('SELECT OrderId FROM '.TABLE_PREFIX.'Orders WHERE md5(OrderId) = '.$this->Conn->qstr($auth_code));
+			$this->Application->SetVar('ord_id', $order_id);
+			$order =& $this->Application->recallObject('ord');
+			$order->Load($order_id);
+
+			return $result['error'] === '00000' ? 1 : 0;
+		}
+
+		function parseGWResponce($str)
+		{
+			$response = explode ("!", $str);
+
+			$result = Array (
+				'code' => $response[1],
+				'error' => $response[2],
+				'merchant_id' => $response[3],
+				'merchant_country' => $response[4],
+				'amount' => $response[5],
+				'transaction_id' => $response[6],
+				'payment_means' => $response[7],
+				'transmission_date' => $response[8],
+				'payment_time' => $response[9],
+				'payment_date' => $response[10],
+				'response_code' => $response[11],
+				'payment_certificate' => $response[12],
+				'authorisation_id' => $response[13],
+				'currency_code' => $response[14],
+				'card_number' => $response[15],
+				'cvv_flag' => $response[16],
+				'cvv_response_code' => $response[17],
+				'bank_response_code' => $response[18],
+				'complementary_code' => $response[19],
+				'complementary_info' => $response[20],
+				'return_context' => $response[21],
+				'caddie' => $response[22],
+				'receipt_complement' => $response[23],
+				'merchant_language' => $response[24],
+				'language' => $response[25],
+				'customer_id' => $response[26],
+				'order_id' => $response[27],
+				'customer_email' => $response[28],
+				'customer_ip_address' => $response[29],
+				'capture_day' => $response[30],
+				'capture_mode' => $response[31],
+				'data' => $response[32],
+			);
+			$this->parsed_responce = $result;
+			return $result;
+		}
+
+		function getGWResponce()
+		{
+			return serialize($this->parsed_responce);
+		}
+
+		function getErrorMsg()
+		{
+			$msg = '';
+			if ($this->parsed_responce['response_code'] != '00000') {
+				$msg = 'Transaction failed';
+			}
+			return $msg;
+		}
+	}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gateways/gw_classes/paybox.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gateways/gw_classes/paypal.php
===================================================================
--- branches/5.1.x/in-commerce/units/gateways/gw_classes/paypal.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gateways/gw_classes/paypal.php	(revision 12131)
@@ -0,0 +1,258 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	require_once GW_CLASS_PATH.'/gw_base.php';
+
+	class kGWPayPal extends kGWBase
+	{
+		/**
+		 * Returns payment form submit url
+		 *
+		 * @param Array $gw_params gateway params from payment type config
+		 * @return string
+		 */
+		function getFormAction($gw_params)
+		{
+			return $gw_params['submit_url'];
+		}
+
+		/**
+		 * Processed input data and convets it to fields understandable by gateway
+		 *
+		 * @param Array $item_data
+		 * @param Array $tag_params additional params for gateway passed through tag
+		 * @param Array $gw_params gateway params from payment type config
+		 * @return Array
+		 */
+		function getHiddenFields($item_data, $tag_params, $gw_params)
+		{
+			$ret = Array();
+			$ret['item_name'] = 'Order #'.$item_data['OrderNumber'];
+			$ret['item_number'] = 'order:'.$item_data['OrderNumber'];
+
+
+			$selected_cur = $this->Application->RecallVar('curr_iso');
+			$available = explode(',', $gw_params['currency_code']);
+			$target = in_array($selected_cur, $available) ? $selected_cur : $available[0];
+
+			if( !$this->IsTestMode() )
+			{
+				$currency_iso = $gw_params['currency_code'];
+				$ret['amount'] = $this->ConvertCurrency($item_data['SubTotal'], $target);
+				$ret['shipping'] =  $this->ConvertCurrency($item_data['ShippingCost'], $target);
+				$ret['tax'] = $this->ConvertCurrency($item_data['VAT'], $target);
+			}
+			else
+			{
+				$ret['amount'] = 1;
+				$ret['shipping'] = 0;
+				$ret['tax'] = 0;
+			}
+
+			$ret['quantity'] = 1;
+			$ret['cancel_return'] = $this->Application->HREF($tag_params['cancel_template'],'',Array('pass'=>'m'));
+			$ret['return'] = $this->Application->HREF($tag_params['return_template'],'',Array('pass'=>'m'));
+			$ret['no_note'] = 1;	// customer is not prompted for notes
+			$ret['no_shipping'] = 1;	// customer is not prompted for shipping address
+			$ret['rm'] = 2;	// return method - POST
+			$ret['currency_code'] = $target;
+			$ret['invoice'] = $item_data['OrderNumber'];
+			$ret['business'] = $gw_params['business_account'];
+
+			// prepopulated fields
+			$ret['address_override'] = 1; // override user's stored address
+			$ret['email'] = $item_data['BillingEmail'];
+			list($first_name, $last_name) = explode(' ', $item_data['BillingTo']);
+			$ret['first_name'] = $first_name;
+			$ret['last_name'] = $last_name;
+			$ret['address1'] = $item_data['BillingAddress1'];
+			$ret['address2'] = $item_data['BillingAddress2'];
+			$ret['city'] = $item_data['BillingCity'];
+			$ret['state'] = $item_data['BillingState'];
+			$ret['zip'] = $item_data['BillingZip'];
+			$sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = %s';
+			$ret['country'] = $this->Conn->GetOne( sprintf($sql, $this->Conn->qstr($item_data['BillingCountry']) ) );
+
+			$ret['notify_url'] = $this->Application->BaseURL('/in-commerce').'gw_notify.php?sid='.$this->Application->GetSID().'&admin=1&order_id='.$item_data['OrderId'];
+			$ret['cmd'] = '_xclick'; // act as "Buy Now" PayPal button
+			return $ret;
+		}
+
+		function getSubscriptionFields($item_data, $tag_params, $gw_params)
+		{
+
+			$ret = Array();
+			$ret['item_name'] = $item_data['item_name'];
+			$ret['item_number'] = $item_data['item_number'];
+			$ret['a1'] = $item_data['a1'];
+			$ret['p1'] = $item_data['p1'];
+			$ret['t1'] = $item_data['t1'];
+			$ret['a2'] = $item_data['a2'];
+			$ret['p2'] = $item_data['p2'];
+			$ret['t2'] = $item_data['t2'];
+
+			$ret['p3'] = $item_data['p3'];
+			$ret['t3'] = $item_data['t3'];
+			$ret['src'] = $item_data['src'];
+			$ret['sra'] = $item_data['sra'];
+			$ret['srt'] = $item_data['srt'];
+
+			$ret['custom'] = $item_data['OrderId'];
+
+			$currency_iso = $gw_params['currency_code'];
+			$ret['a3'] = $this->ConvertCurrency($item_data['a3'], $currency_iso);;
+			$ret['tax'] = $this->ConvertCurrency($item_data['VAT'], $currency_iso);
+			if( $this->Application->isDebugMode() )
+			{
+
+			}
+			else
+			{
+
+			}
+
+//			$ret['quantity'] = 1;
+			$ret['cancel_return'] = $this->Application->HREF($tag_params['cancel_template'],'',Array('pass'=>'m'));
+			$ret['return'] = $this->Application->HREF($tag_params['return_template'],'',Array('pass'=>'m'));
+			$ret['no_note'] = 1;	// customer is not prompted for notes
+			$ret['no_shipping'] = 1;	// customer is not prompted for shipping address
+			$ret['rm'] = 2;	// return method - POST
+			$ret['currency_code'] = $gw_params['currency_code'];
+			$ret['invoice'] = $item_data['OrderNumber'];
+			$ret['business'] = $gw_params['business_account'];
+
+			// prepopulated fields
+			$ret['address_override'] = 1; // override user's stored address
+			$ret['email'] = $item_data['BillingEmail'];
+			list($first_name, $last_name) = explode(' ', $item_data['BillingTo']);
+			$ret['first_name'] = $first_name;
+			$ret['last_name'] = $last_name;
+			$ret['address1'] = $item_data['BillingAddress1'];
+			$ret['address2'] = $item_data['BillingAddress2'];
+			$ret['city'] = $item_data['BillingCity'];
+			$ret['state'] = $item_data['BillingState'];
+			$ret['zip'] = $item_data['BillingZip'];
+			$sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = %s';
+			$ret['country'] = $this->Conn->GetOne( sprintf($sql, $this->Conn->qstr($item_data['BillingCountry']) ) );
+
+			$ret['notify_url'] = $this->Application->BaseURL('/in-commerce').'gw_notify.php?sid='.$this->Application->GetSID().'&admin=1&order_id='.$item_data['OrderId'].'&payment_type_id='.$tag_params['payment_type_id'];
+			$ret['cmd'] = '_xclick-subscriptions'; // act as "Buy Now" PayPal button
+
+			$real_ret = array();
+			foreach ($ret as $key => $val)
+			{
+				if ($val == '') continue;
+				$real_ret[$key] = $val;
+			}
+
+			return $real_ret;
+		}
+
+		function processNotification($gw_params)
+		{
+			$payment_status = $_POST['payment_status']; // save payment_status for later proceeding
+
+			$_POST['cmd'] = '_notify-validate';
+
+			// status, of that PayPal server really has sent such notification to us
+			$status_map = Array('INVALID' => 0, 'VERIFIED' => 1);
+
+			$n_status = curl_post($gw_params['submit_url'], $_POST); // INVALID, VERIFIED
+			$n_status = $status_map[$n_status];
+
+			$success = ($n_status == 1) && ($payment_status == 'Completed') ? 1:0 ; // 1:0 is on purpose, false will result an SQL error !
+
+			if (!$success) return;
+
+			$type = $_POST['txn_type'];
+			switch ($type)
+			{
+				case 'subscr_signup':
+					break;
+				case 'subscr_cancel':
+					break;
+				case 'subscr_failed':
+					break;
+				case 'subscr_payment':
+					$field_values = $this->Conn->GetRow('SELECT * FROM '.TABLE_PREFIX.'OrderItems WHERE OrderItemId = '.$_POST['item_number']);
+					$this->Application->HandleEvent($an_event, 'p:OnSubscriptionApprove', array('field_values' => $field_values));
+					$success = 0; //this will eliminate OnCompleteOrder in gw_notify!
+					
+					$org_order = $this->Application->recallObject('ord.-original', 'ord', Array('skip_autoload' => true));
+					$org_order->Load($field_values['OrderId']);
+
+					$order = $this->Application->recallObject('ord.-paypal', 'ord');
+					$order->SetDBFieldsFromHash($org_order->FieldValues);
+					$order->SetDBField('SubTotal', $field_values['Price']);
+					$order->SetDBField('OriginalAmout', $field_values['Price']);
+					$order->SetDBField('OrderDate', adodb_mktime());
+					$order->UpdateFormattersSubFields();
+
+					$dup_item = false;
+					if ($org_order->GetDBField('Status') >= ORDER_STATUS_PROCESSED) {
+						$sql = 'SELECT MAX(SubNumber) FROM '.TABLE_PREFIX.'Orders WHERE Number = '.$org_order->GetDBField('Number');
+						$num = $this->Conn->GetOne($sql) + 1;
+						$order->SetDBField('SubNumber', $num);
+						$dup_item = true;
+					}
+					else {
+						$sql = 'SELECT MAX(Number) FROM '.TABLE_PREFIX.'Orders';
+						$num = $this->Conn->GetOne($sql) + 1;
+						$order->SetDBField('Number', $num);
+						$order->SetDBField('SubNumber', 0);
+					}
+					$order->SetDBField('PaymentType', $this->Application->GetVar('payment_type_id'));
+					$info = array(
+						'BillingTo' => $_POST['first_name'].' '.$_POST['last_name'],
+						'BillingCompany' => 'n/a (PayPal)',
+						'BillingPhone' => 'n/a (PayPal)',
+						'BillingFax' => '',
+						'BillingEmail' => $_POST['payer_email'],
+						'BillingAddress1' => 'n/a (PayPal)',
+						'BillingCity' => 'n/a (PayPal)',
+						'BillingState' => 'n/a (PayPal)',
+						'BillingZip' => 'n/a (PayPal)',
+						'BillingCountry' => '???',
+					);
+
+					$order->SetFieldsFromHash($info);
+
+					$order->SetDBField('Status', ORDER_STATUS_PROCESSED);
+
+					$order->Create();
+					if ($dup_item) {
+						$query = 'INSERT INTO '.TABLE_PREFIX.'OrderItems
+											(OrderId, ProductId, ProductName, Quantity, QuantityReserved, FlatPrice, Price, BackOrderFlag, Weight, ShippingTypeId, ItemData, OptionsSalt)
+											SELECT
+												'.$order->GetId().' AS OrderId, ProductId, ProductName, Quantity, QuantityReserved, FlatPrice, Price, BackOrderFlag, Weight, ShippingTypeId, ItemData, OptionsSalt
+											FROM '.TABLE_PREFIX.'OrderItems
+											WHERE OrderItemId = '.$field_values['OrderItemId'];
+					}
+					else {
+						$query = 'UPDATE '.TABLE_PREFIX.'OrderItems SET OrderId = %s WHERE OrderItemId = %s';
+						$query = sprintf($query, $order->GetId(), $field_values['OrderItemId']);
+					}
+					$this->Conn->Query($query);
+
+					break;
+				case 'subscr_eot':
+					break;
+				case 'subscr_modify':
+					break;
+			}
+
+			return $success;
+		}
+	}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gateways/gw_classes/paypal.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gateways/gw_classes/gw_base.php
===================================================================
--- branches/5.1.x/in-commerce/units/gateways/gw_classes/gw_base.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gateways/gw_classes/gw_base.php	(revision 12131)
@@ -0,0 +1,261 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	class kGWBase extends kBase
+	{
+
+		/**
+		 * Connection to database
+		 *
+		 * @var kDBConnection
+		 */
+		var $Conn = null;
+
+		/**
+		 * gateway received responce
+		 *
+		 * @var string
+		 */
+		var $gw_responce = '';
+
+		var $parsed_responce = Array();
+
+		function kGWBase()
+		{
+			parent::kBase();
+			$this->Conn =& $this->Application->GetADODBConnection();
+		}
+
+		/**
+		 * Returns payment form submit url
+		 *
+		 * @return string
+		 */
+		function getFormAction($gw_params)
+		{
+			return $this->Application->ProcessParsedTag('m', 'FormAction', Array() );
+		}
+
+		/**
+		 * Processed input data and convets it to fields understandable by gateway
+		 *
+		 * @param Array $item_data
+		 * @param Array $tag_params additional params for gateway passed through tag
+		 * @param Array $gw_params gateway params from payment type config
+		 * @return Array
+		 */
+		function getHiddenFields($item_data, $tag_params, $gw_params)
+		{
+			return Array(	'events[ord]' => 'OnCompleteOrder',
+							'success_template' => $tag_params['return_template'],
+							'failure_template' => $tag_params['cancel_template']);
+		}
+
+		function NeedPlaceButton($item_data, $tag_params, $gw_params)
+		{
+			return true;
+		}
+
+		/**
+		 * Process notification about payment from payment gateway
+		 *
+		 */
+		function processNotification()
+		{
+
+		}
+
+		/**
+		 * Perform PREAUTH/SALE type transaction direct from php script wihtout redirecting to 3rd-party website
+		 *
+		 * @param Array $item_data
+		 * @param Array $gw_params
+		 * @return bool
+		 */
+		function DirectPayment($item_data, $gw_params)
+		{
+			return true;
+		}
+
+		/**
+		 * Perform SALE type transaction direct from php script wihtout redirecting to 3rd-party website
+		 *
+		 * @param Array $item_data
+		 * @param Array $gw_params
+		 * @return bool
+		 */
+		function Charge($item_data, $gw_params)
+		{
+			return true;
+		}
+
+		/**
+		 * Informs payment gateway, that order has been shipped
+		 *
+		 * @param Array $item_data
+		 * @param Array $gw_params
+		 * @return bool
+		 */
+		function OrderShipped($item_data, $gw_params)
+		{
+
+		}
+
+		/**
+		 * Informs payment gateway, that order has been declined
+		 *
+		 * @param Array $item_data
+		 * @param Array $gw_params
+		 * @return bool
+		 */
+		function OrderDeclined($item_data, $gw_params)
+		{
+
+		}
+
+		/**
+		 * Returns gateway responce from last operation
+		 *
+		 * @return string
+		 */
+		function getGWResponce()
+		{
+			return $this->gw_responce;
+		}
+
+		/**
+		 * Parse previosly saved gw responce into associative array
+		 *
+		 * @param string $gw_responce
+		 * @return Array
+		 */
+		function parseGWResponce($gw_responce, $gw_params)
+		{
+			return $this->gw_responce;
+		}
+
+		/**
+		 * Returns true if we should use testing mode
+		 *
+		 * @return bool
+		 */
+		function IsTestMode()
+		{
+			return defined('DEBUG_MODE') && constOn('DBG_PAYMENT_GW');
+		}
+
+		/**
+		 * Convery primary currency to selected (if they are the same, converter will just return)
+		 *
+		 * @param double $value
+		 * @param string $iso
+		 * @param bool $format_value
+		 * @return double
+		 */
+		function ConvertCurrency($value, $iso, $format_value = true)
+		{
+			$converter =& $this->Application->recallObject('kCurrencyRates');
+			$value = $converter->Convert($value, 'PRIMARY', $iso);
+			return $format_value ? sprintf('%.2f', $value) : $value;
+		}
+
+		function InstallData()
+		{
+			return array();
+		}
+
+		function Install()
+		{
+			if ($this->IsInstalled()) {
+				return;
+			}
+
+			$data = $this->InstallData();
+			if (!$data) {
+				return ;
+			}
+
+			// 1. create gateway record
+			$fields_hash = Array ();
+			$gw_fields = Array ('Name', 'ClassName', 'ClassFile', 'RequireCCFields');
+			foreach ($gw_fields as $gw_field) {
+				$fields_hash[$gw_field] = $data['Gateway'][$gw_field];
+			}
+			$this->Conn->doInsert($fields_hash, TABLE_PREFIX.'Gateways');
+			$gw_id = $this->Conn->getInsertID();
+
+			// 2. create DISABLED payment type, that uses this gateway (used for storing configuration properties of gateway)
+			$payment_type =& $this->Application->recallObject('pt.-item', null, Array ('skip_autoload' => true));
+			/* @var $payment_type kDBItem */
+
+			$payment_type->Clear();
+			$fields_hash = Array (
+				'Name' => $data['Gateway']['Name'],
+				'Description' => $data['Gateway']['Name'],
+				'BuiltIn' => 1,
+				'GatewayId' => $gw_id,
+			);
+			$payment_type->SetDBFieldsFromHash($fields_hash);
+			$created = $payment_type->Create();
+			if (!$created) {
+				return ;
+			}
+
+			// 3. create gateway configuration fields
+			foreach ($data['ConfigFields'] as $field => $properties) {
+				$fields_hash = Array (
+					'SystemFieldName' => $field,
+					'GatewayId' => $gw_id,
+					'FieldName' => $properties['Name'],
+					'ElementType' => $properties['Type'],
+					'ValueList' => $properties['ValueList'],
+				);
+				$this->Conn->doInsert($fields_hash, TABLE_PREFIX.'GatewayConfigFields');
+				$fld_id = $this->Conn->getInsertID();
+
+				// 4. set default value for configuration property of gateway
+				$fields_hash = Array (
+					'GWConfigFieldId' => $fld_id,
+					'PaymentTypeId' => $payment_type->GetID(),
+					'Value' => $properties['Default'],
+				);
+				$this->Conn->doInsert($fields_hash, TABLE_PREFIX.'GatewayConfigValues');
+			}
+		}
+
+		function IsInstalled()
+		{
+			$data = $this->InstallData();
+			if (!$data) {
+				return true;
+			}
+
+			$sql = 'SELECT GatewayId
+					FROM '.TABLE_PREFIX.'Gateways
+					WHERE ClassName = '.$this->Conn->qstr($data['Gateway']['ClassName']);
+			return $this->Conn->GetOne($sql);
+		}
+
+		function getErrorMsg()
+		{
+			return '';
+		}
+
+		function gettestccnumbers()
+		{
+			return array();
+		}
+
+	}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gateways/gw_classes/gw_base.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.12.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gateways/gw_classes/ideal_nl.php
===================================================================
--- branches/5.1.x/in-commerce/units/gateways/gw_classes/ideal_nl.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gateways/gw_classes/ideal_nl.php	(revision 12131)
@@ -0,0 +1,161 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+/* http://www.ideal.nl/ gateway class */
+
+	require_once GW_CLASS_PATH.'/gw_base.php';
+
+	$class_name = 'kGWiDEALnl'; // for automatic installation
+
+	class kGWiDEALnl extends kGWBase
+	{
+
+		function InstallData()
+		{
+			$data = array(
+				'Gateway' => Array('Name' => 'iDEAL.nl', 'ClassName' => 'kGWiDEALnl', 'ClassFile' => 'ideal_nl.php', 'RequireCCFields' => 0),
+				'ConfigFields' => Array(
+					'partner_id' => Array('Name' => 'Partner ID', 'Type' => 'text', 'ValueList' => '', 'Default' => ''),
+					'request_url' => Array('Name' => 'Request URL', 'Type' => 'text', 'ValueList' => '', 'Default' => 'http://www.mollie.nl/xml/ideals'),
+					'shipping_control' => Array('Name' => 'Shipping Control', 'Type' => 'select', 'ValueList' => '3=la_CreditDirect,4=la_CreditPreAuthorize', 'Default' => '3'),
+				)
+			);
+			return $data;
+		}
+
+		/**
+		 * Processed input data and convets it to fields understandable by gateway
+		 *
+		 * @param Array $item_data
+		 * @param Array $tag_params additional params for gateway passed through tag
+		 * @param Array $gw_params gateway params from payment type config
+		 * @return Array
+		 */
+		function getHiddenFields($item_data, $tag_params, $gw_params)
+		{
+			$this->Application->StoreVar('gw_success_template',$tag_params['return_template']);
+			$this->Application->StoreVar('gw_cancel_template',$tag_params['cancel_template']);
+
+			$banks_query = $gw_params['request_url'].'?a=banklist';
+
+			$banks = curl_post($banks_query, null, null, 'GET');
+
+			$parser =& $this->Application->recallObject('kXMLHelper');
+			/* @var $parser kXMLHelper */
+			$bank_data =& $parser->Parse($banks);
+
+			$bank_data->FindChild('response');
+			$banks = array();
+			foreach ($bank_data->Children as $a_child) {
+				if ($a_child->Name != 'BANK') continue;
+				$banks[$a_child->FindChildValue('bank_id')] = $a_child->FindChildValue('bank_name');
+			}
+
+			$ret = $this->Application->Phrase('lu_Select_iDEAL_bank').': <select name="ideal_nl_bank_id">';
+			foreach ($banks as $id => $name) {
+				$ret .= '<option value="'.$id.'">'.$name.'</option>';
+			}
+			$ret .= '</select>';
+			$ret .= '<input type="hidden" name="events[ord]" value="OnCompleteOrder" />'."\n";
+			return $ret;
+		}
+
+		function DirectPayment($item_data, $gw_params)
+		{
+			$fields = array();
+
+			$fields['a'] = 'fetch';
+			$fields['partnerid'] = $gw_params['partner_id'];
+			$txt_amount = sprintf("%.2f", $item_data['TotalAmount']);
+			$fields['amount'] = eregi_replace("[.,]", '', $txt_amount);
+			$fields['bank_id'] = $this->Application->GetVar('ideal_nl_bank_id');
+			$fields['description'] = 'Invoice #'.$item_data['OrderNumber'];
+
+			$fields['returnurl'] = $this->Application->BaseURL('/in-commerce').'gw_notify.php?order_id='.$item_data['OrderId'];
+			$fields['reporturl'] = $this->Application->BaseURL('/in-commerce').'gw_notify.php?mode=report&order_id='.$item_data['OrderId'];
+
+			$transaction_xml = curl_post($gw_params['request_url'], $fields, null, 'GET');
+
+			$parser =& $this->Application->recallObject('kXMLHelper');
+			/* @var $parser kXMLHelper */
+			$trans_data =& $parser->Parse($transaction_xml);
+			$transaction_id = $trans_data->FindChildValue('transaction_id');
+			$url = $trans_data->FindChildValue('url');
+
+			if ($transaction_id && $url) {
+				$this->Application->Redirect('external:'.$url);
+			}
+			else {
+				$error_msg = $trans_data->FindChildValue('message');
+				$this->parsed_responce['XML'] = $transaction_xml;
+				$this->Application->SetVar('failure_template', $this->Application->RecallVar('gw_cancel_template'));
+				$this->parsed_responce['MESSAGE'] = $error_msg ? $error_msg : 'Unknown gateway error ('.htmlspecialchars($transaction_xml).')';
+				return false;
+			}
+		}
+
+		function getErrorMsg()
+		{
+			return $this->parsed_responce['MESSAGE'];
+		}
+
+		function getGWResponce()
+		{
+			return serialize($this->parsed_responce);
+		}
+
+		function processNotification($gw_params)
+		{
+			// silent mode
+			if ($this->Application->GetVar('mode') == 'report') {
+				$fields = array();
+
+				$fields['a'] = 'check';
+				$fields['partnerid'] = $gw_params['partner_id'];
+				$fields['transaction_id'] =  $this->Application->GetVar('transaction_id');
+				$fields['bank_id'] = $this->Application->GetVar('ideal_nl_bank_id');
+
+				$check_xml = curl_post($gw_params['request_url'], $fields, null, 'GET');
+				$parser =& $this->Application->recallObject('kXMLHelper');
+				/* @var $parser kXMLHelper */
+				$trans_data =& $parser->Parse($check_xml);
+
+				$response = $trans_data->FindChild('order');
+				foreach ($response->Children as $a_child) {
+					$this->parsed_responce[$a_child->Name] = $a_child->Data;
+				}
+				$this->parsed_responce['XML'] = $check_xml;
+
+				$result = $trans_data->FindChildValue('payed') == 'true' ? 1:0;
+				return $result;
+			}
+			else {
+				$order =& $this->Application->recallObject('ord');
+				if ($order->GetDBField('Status') == ORDER_STATUS_INCOMPLETE) {
+					// error
+					$t = $this->Application->RecallVar('gw_cancel_template');
+					$this->parsed_responce = unserialize($order->GetDBField('GWResult1'));
+					$this->Application->StoreVar('gw_error', $this->getErrorMsg());
+					$this->Application->Redirect($t, array('pass'=>'m', 'm_cat_id'=>0));
+				}
+				else {
+					// ok
+					$t = $this->Application->RecallVar('gw_success_template');
+					$this->Application->Redirect($t, array('pass'=>'m', 'm_cat_id'=>0));
+
+				}
+			}
+		}
+	}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gateways/gw_classes/ideal_nl.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gateways/gw_classes/multicards.php
===================================================================
--- branches/5.1.x/in-commerce/units/gateways/gw_classes/multicards.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gateways/gw_classes/multicards.php	(revision 12131)
@@ -0,0 +1,126 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	require_once GW_CLASS_PATH.'/gw_base.php';
+
+	$class_name = 'kMultiCardsGW'; // for automatic installation
+
+	class kMultiCardsGW extends kGWBase
+	{
+
+		function InstallData()
+		{
+			$data = array(
+				'Gateway' => Array('Name' => 'Multicards', 'ClassName' => 'kMultiCardsGW', 'ClassFile' => 'multicards.php', 'RequireCCFields' => 0),
+				'ConfigFields' => Array(
+					'submit_url' => Array('Name' => 'Submit URL', 'Type' => 'text', 'ValueList' => '', 'Default' => 'https://secure.multicards.com/cgi-bin/order2/processorder1.pl'),
+					'merchant_id' => Array('Name' => 'Merchant ID', 'Type' => 'text', 'ValueList' => '', 'Default' => ''),
+					'merchant_url_idx' => Array('Name' => 'Merchant Order Page Id', 'Type' => 'text', 'ValueList' => '', 'Default' => ''),
+				)
+			);
+			return $data;
+		}
+
+		/**
+		 * Returns payment form submit url
+		 *
+		 * @param Array $gw_params gateway params from payment type config
+		 * @return string
+		 */
+		function getFormAction($gw_params)
+		{
+			return $gw_params['submit_url'];
+		}
+
+		/**
+		 * Processed input data and convets it to fields understandable by gateway
+		 *
+		 * @param Array $item_data
+		 * @param Array $tag_params additional params for gateway passed through tag
+		 * @param Array $gw_params gateway params from payment type config
+		 * @return Array
+		 */
+		function getHiddenFields($item_data, $tag_params, $gw_params)
+		{
+			$ret = Array();
+
+			$ret['mer_id'] = $gw_params['merchant_id'];
+			$ret['mer_url_idx'] = $gw_params['merchant_url_idx'];
+
+			$ret['num_items'] = 100;
+			$ret['item1_price'] = $item_data['TotalAmount'];
+			$ret['item1_desc'] = 'Order #'.$item_data['OrderNumber'];
+			$ret['item1_qty'] = 1;
+
+
+//			$ret['cancel_return'] = $this->Application->HREF($tag_params['cancel_template'],'',Array('pass'=>'m'));
+//			$ret['return'] = $this->Application->HREF($tag_params['return_template'],'',Array('pass'=>'m'));
+//			$ret['notify_url'] = $this->Application->BaseURL('/in-commerce').'gw_notify.php?sid='.$this->Application->GetSID().'&admin=1&order_id='.$item_data['OrderId'];
+//			$ret['cmd'] = '_xclick'; // act as "Buy Now" PayPal button
+
+			$ret['no_note'] = 1;	// customer is not prompted for notes
+			$ret['no_shipping'] = 1;	// customer is not prompted for shipping address
+			$ret['rm'] = 2;	// return method - POST
+			$ret['currency_code'] = $target;
+			$ret['invoice'] = $item_data['OrderNumber'];
+			$ret['business'] = $gw_params['business_account'];
+
+			// prepopulated fields
+			$billing_email = $item_data['BillingEmail'];
+			if (!$billing_email) {
+				$billing_email = $this->Conn->GetOne('	SELECT Email FROM '.$this->Application->getUnitOption('u', 'TableName').'
+											WHERE PortalUserId = '.$this->Application->RecallVar('user_id'));
+			}
+			$ret['cust_email'] = $billing_email;
+
+			$ret['cust_name'] = $item_data['BillingTo'];
+			$ret['cust_company'] = $item_data['BillingCompany'];
+			$ret['cust_phone'] = $item_data['BillingPhone'];
+			$ret['cust_address1'] = $item_data['BillingAddress1'];
+			$ret['cust_address2'] = $item_data['BillingAddress2'];
+			$ret['cust_city'] = $item_data['BillingCity'];
+			$ret['cust_state'] = $item_data['BillingState'];
+			$ret['cust_zip'] = $item_data['BillingZip'] ? $item_data['BillingZip'] : '99999';
+//			$sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = %s';
+//			$ret['country'] = $this->Conn->GetOne( sprintf($sql, $this->Conn->qstr($item_data['BillingCountry']) ) );
+			$ret['cust_country'] = $item_data['BillingCountry'];
+
+			$ret['user1'] = $this->Application->GetSID().','.MD5($item_data['OrderId']);
+
+			$url = $this->Application->HREF($tag_params['return_template'], '', array('pass'=>'m'));
+			$ret['user2'] = $url;
+
+			return $ret;
+		}
+
+		function processNotification($gw_params)
+		{
+			$this->parsed_responce = $_POST;
+
+			list ($sid, $auth_code) = explode(',', $this->Application->GetVar('user1'));
+			$session =& $this->Application->recallObject('Session');
+			$session->SID = $sid;
+
+			$order_id = $this->Conn->GetOne('SELECT OrderId FROM '.TABLE_PREFIX.'Orders WHERE md5(OrderId) = '.$this->Conn->qstr($auth_code));
+			$this->Application->SetVar('ord_id', $order_id);
+			$order =& $this->Application->recallObject('ord');
+			$order->Load($order_id);
+
+			$url =  $this->Application->GetVar('user2');
+			echo '<!--success--><a href="'.$url.'">'.$this->Application->Phrase('la_multicards_continue').'</a>';
+
+			return 1;
+		}
+	}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gateways/gw_classes/multicards.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gateways/gw_classes/rightconnect.php
===================================================================
--- branches/5.1.x/in-commerce/units/gateways/gw_classes/rightconnect.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gateways/gw_classes/rightconnect.php	(revision 12131)
@@ -0,0 +1,221 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	require_once GW_CLASS_PATH.'/gw_base.php';
+
+	class kGWRightConnect extends kGWBase
+	{
+
+	/*	function Install()
+		{
+			$query = "INSERT INTO `".TABLE_PREFIX."Gateways` ( `GatewayId` , `Name` , `ClassName` , `ClassFile` , `RequireCCFields` )
+								VALUES (
+									'', 'RightConnect', 'kGWRightConnect', 'rightconnect.php', '1'
+								)";
+			$this->Conn->Query($query);
+			$id = $this->Conn->getInsertID();
+
+			$query = "INSERT INTO `".TABLE_PREFIX."GatewayConfigFields` ( `GWConfigFieldId` , `SystemFieldName` , `FieldName` , `ElementType` , `ValueList` , `GatewayId` )
+								VALUES (
+								'', 'submit_url', 'Submit URL', 'text', '', '$id'
+								), (
+								'', 'user_account', 'User Account', 'text', '', '$id'
+								), (
+								'', 'password', 'User Account', 'text', '', '$id'
+								),
+								(
+								'', 'encapsulate_char', 'Encapsualte Char', 'text', '', '$id'
+								)";
+			$this->Conn->Query($query);
+		}*/
+
+		function DirectPayment($item_data, $gw_params)
+		{
+
+			/*$post_fields["card_holder"] = "test test";
+			$post_fields["cardtype"] = "Visa";
+			$post_fields["card_number"] = "4444333322221111";
+			$post_fields["cvv2"] = "123";
+			$post_fields["exp_mon"] = "05";
+			$post_fields["exp_year"] = "05";
+			$post_fields["address1"] = "test";
+			$post_fields["city"] = "test";
+			$post_fields["state"] = "CA";
+			$post_fields["zip"] = "90069";
+			$post_fields["country"] = "USA";
+			$post_fields["firstname"] = "test";
+			$post_fields["lastname"] = "test";
+			$post_fields["email"] = "customer@yourdomain.com";
+			$post_fields["merchant_account"] = "demo";
+			$post_fields["trans_amount"] = "8.98";
+			$post_fields["user1"] = "DELIM";
+			$post_fields["ALIAS"] = "www.yourdomain.com";
+			$post_fields["customer_ip"] = $_SERVER['REMOTE_ADDR'];
+			$post_fields["ADMIN_EMAIL"] = "admin@yourdomain.com";*/
+
+
+			$post_fields = Array();
+			// -- Login Information --
+			//$post_fields['x_version']			=	'3.1';
+			$post_fields["user1"] = "DELIM";
+
+			//$post_fields['x_type']				=	$gw_params['shipping_control'] == SHIPPING_CONTROL_PREAUTH ? 'AUTH_ONLY' : 'AUTH_CAPTURE';
+
+			$post_fields['merchant_account']	=	$gw_params['user_account'];
+			$post_fields['merchant_pass']			=	$gw_params['password'];
+
+			if( $this->IsTestMode() ) $post_fields['x_test_request'] = 'True';
+
+			// -- Payment Details --
+			$names = explode(' ', $item_data['BillingTo'], 2);
+			$post_fields['firstname']		=	getArrayValue($names, 0);
+			$post_fields['lastname']			=	getArrayValue($names, 1);
+			$post_fields['trans_amount']			=	sprintf('%.2f', $item_data['TotalAmount']);
+
+			//$post_fields['x_company']			=	$item_data['BillingCompany'];
+
+			$post_fields['card_number']			=	$item_data['PaymentAccount'];
+			$post_fields['card_holder']			=	$item_data['PaymentNameOnCard'];
+			$post_fields['cvv2']			=	$item_data['PaymentCVV2'];
+
+			list($exp_mon,$exp_year) = explode('/', $item_data['PaymentCCExpDate']);
+			$post_fields['exp_mon']			=	$exp_mon;
+			$post_fields['exp_year']			=	$exp_year;
+
+			$post_fields['address1']			=	$item_data['BillingAddress1'];
+			$post_fields['address2']			=	$item_data['BillingAddress2'];
+			$post_fields['city']				=	$item_data['BillingCity'];
+			$post_fields['state']				=	$item_data['BillingState'];
+			$post_fields['zip']				=	$item_data['BillingZip'];
+
+			$post_fields['country']			=	$item_data['BillingCountry'];
+
+			$post_fields['user2']			=	$item_data['PortalUserId'];
+			$post_fields['user3']		=	$item_data['OrderNumber'];
+			$post_fields['customer_email']	=	'FALSE';
+
+			$post_fields['customer_addr'] = $item_data['OrderIP']; // according to fields list in doc
+			$post_fields['customer_ip'] = $item_data['OrderIP']; // according to example from doc
+			$post_fields["email"] = $item_data['BillingEmail'];
+			$post_fields["ADMIN_EMAIL"] = $this->Application->ConfigValue('Smtp_AdminMailFrom');
+
+			$this->gw_responce = curl_post($gw_params['submit_url'], $post_fields);
+			$gw_responce = $this->parseGWResponce(null, $gw_params);
+
+			// gw_error_msg: $gw_response['responce_reason_text']
+			// gw_error_code: $gw_response['responce_reason_code']
+			return ($gw_responce['responce_code'] != 1) ? false : true;
+		}
+
+		/**
+		 * Captures Authorized transaction by transaction ID
+		 *
+		 * @param Array $item_data
+		 * @param Array $gw_params
+		 * @return bool
+		 */
+		function Charge($item_data, $gw_params)
+		{
+			return true;
+		}
+
+		/**
+		 * Parse previosly saved gw responce into associative array
+		 *
+		 * @param string $gw_responce
+		 * @param Array $gw_params
+		 * @return Array
+		 */
+		function parseGWResponce($gw_responce = null, $gw_params)
+		{
+			if( !isset($gw_responce) ) $gw_responce = $this->gw_responce;
+
+			$fields = Array(
+							'responce_code',  				// 0
+							'responce_sub_code',			// 1
+							'responce_reason_code',		// 2
+							'responce_reason_text',		// 3
+							'approval_code',					// 4
+							'avs_result_code',				// 5
+							'transaction_id',					// 6
+							'fraud_score',						// 7
+							'not_used8',							// 8
+							'amount',									// 9
+							'not_used10',							// 10
+							'transaction_type',				// 11
+							'not_used_customer_id',		// 12
+							'first_name',							// 13
+							'last_name',							// 14
+							'not_documented_empty_field', // 15 !!!!!!!!!!! DOES NOT MATCH DOCUMENTATION
+							'address',								// 16
+							'city',										// 17
+							'state',									// 18
+							'zip',										// 19
+							'country',								// 20
+							'phone',									// 21
+							'fax',										// 22
+							'email',									// 23
+							'ship_name',							// 24
+							'not_used25',							// 25
+							'not_used26',							// 26
+							'ship_address',						// 27
+							'ship_city',							// 28
+							'ship_state',							// 29
+							'ship_zip',								// 30
+							'ship_country',						// 31
+							'tax',										// 32
+							'not_used32',							// 33
+							'not_used33',							// 34
+							'not_used34',							// 35
+							'not_used35',							// 36
+							'not_used36',							// 37
+							'cvv_responce',						// 38
+							'receipt_number',					// 39
+							'passthru1',							// 40
+							'passthru2',							// 41
+							'passthru3',							// 42
+							'passthru4',							// 43
+							'passthru5',							// 44
+							'passthru6',							// 45
+							'passthru7',							// 46
+							'passthru8',							// 47
+							'passthru9',							// 48
+							'passthru10',							// 49
+							);
+
+			$encapsulate_char = $gw_params['encapsulate_char'];
+			if($encapsulate_char)
+			{
+				$ec_length = strlen($encapsulate_char);
+				$gw_responce = substr($gw_responce, $ec_length, $ec_length * -1);
+			}
+
+			$gw_responce = explode($encapsulate_char.','.$encapsulate_char, $gw_responce);
+			$ret = Array();
+			foreach($fields as $field_index => $field_name)
+			{
+				$ret[$field_name] = $gw_responce[$field_index];
+				unset($gw_responce[$field_index]);
+			}
+			$this->parsed_responce = $ret;
+			return array_merge_recursive2($ret, $gw_responce); // returns unparsed fields with they original indexes together with parsed ones
+		}
+
+		function getGWResponce()
+		{
+			return serialize($this->parsed_responce);
+		}
+
+	}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gateways/gw_classes/rightconnect.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gateways/gw_tag_processor.php
===================================================================
--- branches/5.1.x/in-commerce/units/gateways/gw_tag_processor.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gateways/gw_tag_processor.php	(revision 12131)
@@ -0,0 +1,114 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class GatewayTagProcessor extends kDBTagProcessor {
+
+	/**
+	 * Payment gateway config values for current payment type
+	 *
+	 * @var Array
+	 * @access private
+	 */
+	var $ConfigValues=Array();
+
+	/**
+	 * Payment type id for current gateway values
+	 *
+	 * @var int
+	 * @access private
+	 */
+	var $PaymentTypeID=0;
+
+
+	function initGWConfigValues()
+	{
+		$payment_type_id = $this->Application->GetVar('pt_id');
+		$GWConfigValue =& $this->Application->recallObject('gwfv');
+
+		$sql = 'SELECT Value, GWConfigFieldId FROM '.$GWConfigValue->TableName.' WHERE PaymentTypeId = '.$payment_type_id;
+		$this->ConfigValues = $this->Conn->GetCol($sql,'GWConfigFieldId');
+	}
+
+	function gwConfigValue($params)
+	{
+		$object =& $this->Application->recallObject($this->getPrefixSpecial(), $this->Prefix, $params);
+		$id = $object->GetID();
+
+		$value = isset($this->ConfigValues[$id]) ? $this->ConfigValues[$id] : '';
+		if( !$this->HasParam($params, 'no_special') ) $value = htmlspecialchars($value);
+		if( getArrayValue($params,'checked'	) ) $value = ($value == 1) ? 'checked' : '';
+		return $value;
+	}
+
+	function PrintList($params)
+	{
+		$list =& $this->Application->recallObject( $this->getPrefixSpecial(), $this->Prefix.'_List', $params);
+		$id_field = $this->Application->getUnitOption($this->Prefix,'IDField');
+
+		$list->Query();
+		$list->GoFirst();
+
+		$block_params=$this->prepareTagParams($params);
+		$block_params['name']=$params['block'];
+		$block_params['pass_params']='true';
+
+		$payment_type_object =& $this->Application->recallObject('pt');
+
+		$o = '';
+
+		while (!$list->EOL())
+		{
+			$this->Application->SetVar( $this->getPrefixSpecial().'_id', $list->GetDBField($id_field) );
+
+			$display_style = $payment_type_object->GetDBField('GatewayId') == $list->GetDBField('GatewayId') ? 'table-row' : 'none';
+			$block_params['input_block'] = $params['input_block_prefix'].$list->GetDBField('ElementType');
+			$block_params['gateway_id'] = $list->GetDBField('GatewayId');
+			$block_params['display'] = $display_style;
+
+			$o .= $this->Application->ParseBlock($block_params, 1);
+
+			$list->GoNext();
+		}
+
+		return $o;
+	}
+
+	function PredefinedOptions($params)
+	{
+		$object =& $this->Application->recallObject($this->getPrefixSpecial(),$this->Prefix, $params);
+
+		$value = $this->gwConfigValue($params);
+
+		$options = explode(',', $object->GetDBField('ValueList') );
+
+		$block_params = $this->prepareTagParams($params);
+
+		$block_params['name'] = $this->SelectParam($params, 'render_as,block');
+		$block_params['pass_params'] = 'true';
+
+		$o = '';
+		foreach ($options as $key_val)
+		{
+			list($key,$val) = explode('=', $key_val);
+			$block_params['key'] = $key;
+			$block_params['option'] = $val;
+			$block_params['selected'] = ( $key == $value ? ' '.$params['selected'] : '');
+			$block_params['PrefixSpecial'] = $this->getPrefixSpecial();
+			$o .= $this->Application->ParseBlock($block_params, 1);
+		}
+
+		return $o;
+	}
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gateways/gw_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/downloads/downloads_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/downloads/downloads_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/downloads/downloads_config.php	(revision 12131)
@@ -0,0 +1,107 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+$config	=	Array(
+					'Prefix'			=>	'down',
+					'ItemClass'			=>	Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'kDBEventHandler','file'=>'','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
+
+					'RegisterClasses'	=>	Array(
+						Array('pseudo'=>'DownloadHelper','class'=>'DownloadHelper','file'=>'download_helper.php','build_event'=>'','require_classes'=>'kHelper'),
+					),
+
+					'AutoLoad'			=>	true,
+					'Hooks'				=>	Array(
+												/*Array(
+													'Mode' => hBEFORE,
+													'Conditional' => true,
+													'HookToPrefix' => 'p',
+													'HookToSpecial' => '',
+													'HookToEvent' => Array( 'onPreSave' ),
+													'DoPrefix' => 'pr',
+													'DoSpecial' => 'tang',
+													'DoEvent' => 'OnArrange',
+												),*/
+											),
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'page',
+												3	=>	'event',
+											),
+					'TitlePresets'		=>	Array(
+												'downloads_list'=>Array(	'prefixes'				=> Array('down_List'),
+																			'format'				=>	"!la_title_FileDownloads!",
+																),
+											),
+
+					'PermSection'		=>	Array('main' => 'in-commerce:downloadlog'),
+
+					'Sections'			=>	Array(
+						'in-commerce:downloadlog'	=>	Array(
+							'parent'		=>	'in-portal:reports',
+							'icon'			=>	'download_log',
+							'label'			=>	'la_tab_DownloadLog',
+							'url'			=>	Array('t' => 'in-commerce/downloads/downloads_list', 'pass' => 'm'),
+							'permissions'	=>	Array('view', 'delete'),
+							'priority'		=>	7,
+							'type'			=>	stTREE,
+						),
+					),
+
+					'IDField'			=>	'DownloadId',
+					'TitleField'		=>	'Name',
+					'TableName'			=>	TABLE_PREFIX.'UserDownloads',
+
+					'ListSQLs'			=>	Array(	''=>'SELECT * FROM %s',
+																		), // key - special, value - list select sql
+					'ItemSQLs'			=>	Array(	''=>'SELECT * FROM %s',
+																		),
+					'ListSortings'	=> 	Array(
+																'' => Array(
+																	'Sorting' => Array('StartedOn' => 'desc'),
+																)
+															),
+					'Fields'			=>	Array(
+										'DownloadId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+							            'PortalUserId' => Array('type' => 'int','not_null' => 1, 'default' => 0),
+							            'Username' => Array('type' => 'string','not_null' => 1, 'default' => ''),
+							            'ProductId' => Array('type' => 'int','not_null' => 1, 'default' => 0),
+							            'ProductName' => Array('type' => 'string','not_null' => 1, 'default' => ''),
+							            'FileId' => Array('type' => 'int','not_null' => 1, 'default' => 0),
+							            'Filename' => Array('type' => 'string','not_null' => 1, 'default' => ''),
+							            'IPAddress' => Array('type' => 'string','not_null' => 1, 'default' => ''),
+							            'StartedOn' => Array('type' => 'int','formatter' => 'kDateFormatter','not_null' => 1, 'default' => 0),
+							            'EndedOn' => Array('type' => 'int','formatter' => 'kDateFormatter','not_null' => 1, 'default' => 0),
+											),
+					'VirtualFields'	=> 	Array(
+													),
+
+					'Grids'	=> Array(
+								'Default'		=>	Array(
+																	'Icons' => Array('default'=>'icon16_custom.gif'),	// icons for each StatusField values, if no matches or no statusfield selected, then "default" icon is used
+																	'Fields' => Array(
+																			'DownloadId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+																			'Username' => Array( 'title'=>'la_col_Username', 'filter_block' => 'grid_like_filter'),
+																			'ProductName' => Array( 'title'=>'la_col_DownloadedProductName', 'filter_block' => 'grid_like_filter'),
+																			'Filename' => Array( 'title'=>'la_col_DownloadedFileName', 'filter_block' => 'grid_like_filter'),
+																			'IPAddress' => Array( 'title'=>'la_col_IPAddress', 'filter_block' => 'grid_like_filter'),
+																			'StartedOn' => Array( 'title'=>'la_col_StartedOn', 'filter_block' => 'grid_date_range_filter'),
+																		),
+														),
+							),
+
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/downloads/downloads_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.12.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/downloads/download_helper.php
===================================================================
--- branches/5.1.x/in-commerce/units/downloads/download_helper.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/downloads/download_helper.php	(revision 12131)
@@ -0,0 +1,75 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class DownloadHelper extends kHelper {
+	function CheckAccess($file_id, $product_id)
+	{
+		$sql = 'SELECT FileAccessId FROM '.TABLE_PREFIX.'UserFileAccess
+						WHERE PortalUserId = '.$this->Application->RecallVar('user_id').'
+						AND ProductId = '.$product_id;
+		return $this->Conn->GetOne($sql);
+	}
+
+	function SendFile($file_id, $product_id)
+	{
+		$file_object =& $this->Application->recallObject('file', null, Array('skip_autoload' => true));
+
+		$sql = $file_id ?
+					'SELECT FileId, FilePath, RealPath, MIMEType FROM '.$this->Application->getUnitOption('file', 'TableName').'
+						WHERE FileId = '.$file_id :
+					'SELECT FileId, FilePath, RealPath, MIMEType FROM '.$this->Application->getUnitOption('file', 'TableName').'
+						WHERE ProductId = '.$product_id.' AND IsPrimary = 1';
+		$file_info = $this->Conn->GetRow($sql);
+
+		$field_options = $file_object->getFieldOptions('RealPath');
+		$file_info['real_path'] = FULL_PATH.$field_options['upload_dir'].'/'.$file_info['RealPath'];
+		$file_info = $this->DoSendFile($file_info);
+		return $file_info;
+	}
+
+	function DoSendFile($file_info)
+	{
+		$content_type = function_exists('mime_content_type') ? mime_content_type($file_info['real_path']) : $file_info['MIMEType'];
+
+		header('Content-type: '.$content_type);
+		header('Content-Disposition: attachment; filename="'.$file_info['FilePath'].'"');
+		header('Content-Length: '.filesize($file_info['real_path']));
+
+		$file_info['download_start'] = adodb_mktime();
+		readfile($file_info['real_path']);
+		flush();
+		$file_info['download_end'] = adodb_mktime(); // this is incorrect
+		define('SKIP_OUT_COMPRESSION', 1);
+		return $file_info;
+	}
+
+	function LogDownload($product_id, $file_info)
+	{
+		$down_object =& $this->Application->recallObject('down', null, Array('skip_autoload' => true));
+		$user_object =& $this->Application->recallObject('u.current');
+		$product_object =& $this->Application->recallObject( 'p' );
+
+		$down_object->SetDBField('PortalUserId', $this->Application->RecallVar('user_id'));
+		$down_object->SetDBField('Username', $user_object->GetDBField('Login'));
+		$down_object->SetDBField('ProductId', $product_id);
+		$down_object->SetDBField('ProductName', $product_object->GetField('Name'));
+		$down_object->SetDBField('FileId', $file_info['FileId']);
+		$down_object->SetDBField('Filename', $file_info['FilePath']);
+		$down_object->SetDBField('IPAddress', $_SERVER['REMOTE_ADDR']);
+		$down_object->SetDBField('StartedOn_date', $file_info['download_start']);
+		$down_object->SetDBField('StartedOn_time', $file_info['download_start']);
+
+		$down_object->Create();
+	}
+
+}
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/downloads/download_helper.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/product_options/product_options_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/product_options/product_options_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/product_options/product_options_event_handler.php	(revision 12131)
@@ -0,0 +1,77 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class ProductOptionsEventHandler extends kDBEventHandler{
+
+	function SetCustomQuery(&$event)
+	{
+		parent::SetCustomQuery($event);
+
+		$object =& $event->getObject();
+		$selectable_only = $event->getEventParam('selectable_only');
+		if ($selectable_only) {
+			$object->addFilter('types_filter', 'OptionType IN (1,3,6)');
+		}
+
+	}
+
+	/**
+	 * Updates temp_id to live_id in options combinations
+	 * 
+	 * !Not called when "po" doesn't have subitems (temp handler problem)
+	 *
+	 * @param kEvent $event
+	 */
+	function OnAfterCopyToLive(&$event)
+	{
+		$id = $event->getEventParam('id');
+		$temp_id = $event->getEventParam('temp_id');
+
+		if ($id == $temp_id) return;
+
+		$poc_table = $this->Application->GetTempName(TABLE_PREFIX.'ProductOptionCombinations', 'prefix:p');
+		$query = 'SELECT * FROM '.$poc_table;
+		$combs = $this->Conn->Query($query);
+		foreach ($combs as $a_comb) {
+			$comb_data = unserialize($a_comb['Combination']);
+			$n_combs = array();
+			foreach ($comb_data as $key => $val)
+			{
+				$n_key = $key == $temp_id ? $id : $key;
+				$n_combs[$n_key] = $val;
+			}
+			ksort($n_combs);
+			$n_combs = serialize($n_combs);
+			$n_crc = crc32($n_combs);
+			$query = 'UPDATE '.$poc_table.' SET
+								Combination = '.$this->Conn->qstr($n_combs).', CombinationCRC = '.$n_crc.' WHERE CombinationId = '.$a_comb['CombinationId'];
+			$this->Conn->Query($query);
+		}
+	}
+
+	function OnAfterClone(&$event)
+	{
+		$id = $event->getEventParam('id');
+		$org_id = $event->getEventParam('original_id');
+
+		// storing original to new ids mapping to use in poc:OnBeforeClone
+		$options_mapping = $this->Application->GetVar('poc_mapping');
+		if (!$options_mapping) $options_mapping = array();
+		$options_mapping[$org_id] = $id;
+		$this->Application->SetVar('poc_mapping', $options_mapping);
+	}
+
+
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/product_options/product_options_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.8
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/product_options/product_options_helper.php
===================================================================
--- branches/5.1.x/in-commerce/units/product_options/product_options_helper.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/product_options/product_options_helper.php	(revision 12131)
@@ -0,0 +1,86 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class kProductOptionsHelper extends kHelper {
+
+	function ExplodeOptionValues($option_row)
+	{
+		$values = getArrayValue($option_row, 'Values');
+		if (!$values) return false;
+
+		$values = explode(',', $values);
+
+		$prices = preg_split('/(?<!\\\)\|/', getArrayValue($option_row, 'Prices'));
+		foreach ($prices as $a_price) {
+			list($id, $price) = preg_split('/(?<!\\\)=/', $a_price);
+			$conv_prices[$id] = $price;
+		}
+		$price_types = preg_split('/(?<!\\\)\|/', getArrayValue($option_row, 'PriceTypes'));
+		foreach ($price_types as $a_price_type) {
+			list($id, $price_type) = preg_split('/(?<!\\\)=/', $a_price_type);
+			$conv_price_types[$id] = $price_type;
+		}
+		$conv_prices = $this->UnEscape($conv_prices);
+		$conv_price_types = $this->UnEscape($conv_price_types);
+
+		return array('Values'=>$values, 'Prices'=>$conv_prices, 'PriceTypes'=>$conv_price_types);
+	}
+
+	function UnEscape($data)
+	{
+		$res = array();
+		foreach ($data as $key=>$val)
+		{
+			$n_key = str_replace('\\|', '|', $key);
+			$n_key = str_replace('\\=', '=', $n_key);
+			$n_val = str_replace('\\|', '|', $val);
+			$n_val = str_replace('\\=', '=', $n_val);
+			$res[$n_key] = $n_val;
+		}
+		return $res;
+	}
+
+	function ConvertKey($key, $product_id, $use_temp=0)
+	{
+		static $mapping = null;
+		if (is_null($mapping) || !isset($mapping[$product_id])) {
+			$table = TABLE_PREFIX.'ProductOptions';
+			if ($use_temp) $table = $this->Application->GetTempName($table, 'prefix:p');
+			$sql = 'SELECT * FROM '.$table.' WHERE ProductId = '.$product_id;
+			$conn =& $this->Application->GetADODBConnection();
+			$mapping[$product_id] = $conn->Query($sql, 'ProductOptionId');
+		}
+		return $mapping[$product_id][$key];
+	}
+
+	function OptionsSalt($options, $comb_only=false)
+	{
+		if (!is_array($options)) return 0;
+		if (!$comb_only) {
+			ksort($options);
+			return crc32(serialize($options));
+		}
+
+		$option_keys = array_keys($options);
+		if (!$option_keys) return ;
+		$included = $this->Conn->GetCol('SELECT ProductOptionId FROM '.TABLE_PREFIX.'ProductOptions WHERE ProductOptionId IN ('.join(',', $option_keys).') AND OptionType IN (1,3,6)');
+		foreach ($option_keys as $key) {
+			if (!in_array($key, $included)) {
+				unset($options[$key]);
+			}
+		}
+		return $this->OptionsSalt($options);
+	}
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/product_options/product_options_helper.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/product_options/product_options_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/product_options/product_options_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/product_options/product_options_config.php	(revision 12131)
@@ -0,0 +1,92 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+$config	=	Array(
+					'Prefix'			=>	'po',
+					'ItemClass'			=>	Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'ProductOptionsEventHandler','file'=>'product_options_event_handler.php','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'ProductOptionsTagProcessor','file'=>'product_options_tag_processor.php','build_event'=>'OnBuild'),
+					'RegisterClasses'	=>	Array(
+												Array('pseudo'=>'kProductOptionsHelper','class'=>'kProductOptionsHelper','file'=>'product_options_helper.php','build_event'=>''),
+											),
+					'AutoLoad'			=>	true,
+					'Hooks'				=>	Array(
+
+											),
+					'AggregateTags' => Array(
+												Array(
+														'AggregateTo' => '#PARENT#',
+														'AggregatedTagName' => 'ListOptions',
+														'LocalTagName' => 'ListOptions',
+													),
+										),
+
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'page',
+												3	=>	'event',
+											),
+					'TitleField' => 'Name',
+					'IDField'			=>	'ProductOptionId',
+					'TableName'			=>	TABLE_PREFIX.'ProductOptions',
+					'ForeignKey'	=>	'ProductId',
+					'ParentTableKey' => 'ProductId',
+					'ParentPrefix' => 'p',
+					'AutoDelete'	=>	true,
+					'AutoClone'	=> true,
+					'SubItems' => array('poc'),
+					'ListSQLs'			=>	Array(	''=>'SELECT * FROM %s',
+																		), // key - special, value - list select sql
+					'ItemSQLs'			=>	Array(	''=>'SELECT * FROM %s',
+																		),
+					'ListSortings'	=> 	Array(
+																'' => Array(
+																	'Sorting' => Array('Name' => 'asc'),
+																	'ForcedSorting' => Array('Priority' => 'desc'),
+																)
+															),
+					'Fields' => Array (
+						'ProductOptionId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+						'ProductId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+						'Name' => Array('type' => 'string', 'required' => 1, 'max_len' => 255, 'not_null' => 1, 'default' => '',),
+						'OptionType' => Array('type' => 'int', 'required' => 1, 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options'=>Array(0 => '!la_EmptyValue!', 1 => '!la_type_select!', 5 => '!la_type_text!', 4 => '!la_type_textarea!', 3 => '!la_type_radio!', 6 => '!la_type_checkbox!' /*,  2 => '!la_type_password!' */), 'not_null' => 1, 'default' => 0),
+						'Required' => Array('type' => 'int', 'not_null'=>1, 'default'=>0, 'formatter'=>'kOptionsFormatter', 'use_phrases'=>1, 'options'=>array(0=>'la_No', 1=>'la_Yes')),
+						'Listable' => Array('type' => 'int', 'not_null'=>1, 'default'=>0, 'formatter'=>'kOptionsFormatter', 'use_phrases'=>1, 'options'=>array(0=>'la_No', 1=>'la_Yes')),
+						'Priority' => Array('type' => 'int', 'not_null'=>1, 'default'=>0),
+						'Values' => Array ('type' => 'string', 'default' => NULL),
+						'Prices' => Array ('type' => 'string', 'default' => NULL),
+						'PriceTypes' => Array ('type' => 'string', 'default' => NULL),
+					),
+
+					'VirtualFields' => Array (
+					),
+
+					'Grids'	=> Array(
+
+								'Default'		=>	Array(
+																	'Icons' => Array('default'=>'icon16_custom.gif'),	// icons for each StatusField values, if no matches or no statusfield selected, then "default" icon is used
+																	'Fields' => Array(
+																			'ProductOptionId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+																			'Name' => Array( 'title'=>'la_col_Name', 'data_block' => 'option_name_td', 'filter_block' => 'grid_like_filter'),
+																			'OptionType' => Array( 'title'=>'la_col_OptionType', 'filter_block' => 'grid_options_filter'),
+																			'Required' => Array( 'title'=>'la_col_Required', 'filter_block' => 'grid_options_filter'),
+																			/*'Listable' => Array( 'title'=>'la_col_Listable', 'filter_block' => 'grid_options_filter'),*/
+																			),
+
+																),
+													),
+
+		);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/product_options/product_options_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.10.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/product_options/product_options_tag_processor.php
===================================================================
--- branches/5.1.x/in-commerce/units/product_options/product_options_tag_processor.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/product_options/product_options_tag_processor.php	(revision 12131)
@@ -0,0 +1,155 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class ProductOptionsTagProcessor extends kDBTagProcessor{
+	function ShowOptions($params){
+		$object =& $this->Application->recallObject($this->getPrefixSpecial());
+
+		$opt_helper =& $this->Application->recallObject('kProductOptionsHelper');
+
+		$parsed = $opt_helper->ExplodeOptionValues($object->GetFieldValues());
+		if (!$parsed) return;
+		$values = $parsed['Values'];
+		$conv_prices = $parsed['Prices'];
+		$conv_price_types = $parsed['PriceTypes'];
+
+		$options =& $this->GetOptions();
+
+		$mode = $this->SelectParam($params, 'mode');
+		$combination_prefix = $this->SelectParam($params, 'combination_prefix');
+		$combination_field = $this->SelectParam($params, 'combination_field');
+		if ($mode == 'selected') {
+			$comb =& $this->Application->recallObject($combination_prefix);
+			$options = unserialize($comb->GetDBField($combination_field));
+		}
+
+		$block_params['name'] = $params['render_as'];
+		$block_params['selected'] = '';
+		$block_params['pass_params'] = 1;
+
+		$lang =& $this->Application->recallObject('lang.current');
+
+		$o = '';
+		$first_selected = false;
+		foreach ($values as $option) {
+//			list($val, $label) = explode('|', $option);
+			$val = $option;
+			if (getArrayValue($params, 'js')) {
+				$block_params['id'] = addslashes($val);
+				$block_params['value'] = htmlspecialchars($val);
+			}
+			else {
+				$block_params['id'] = htmlspecialchars($val);
+				$block_params['value'] = htmlspecialchars($val);
+			}
+			if ($conv_prices[$val]) {
+				if ($conv_price_types[$val] == '$' && !getArrayValue($params, 'js') && !getArrayValue($params, 'no_currency')) {
+					$iso = $this->GetISO($params['currency']);
+					$value = sprintf("%.2f", $this->ConvertCurrency($conv_prices[$val], $iso));
+
+					$value = $this->AddCurrencySymbol($lang->formatNumber($value, 2), $iso, true); // true to force sign
+					$block_params['price'] = $value;
+					$block_params['price_type'] = '';
+					$block_params['sign'] = ''; //sign is included in the formatted value
+				}
+				else {
+					$block_params['price'] = isset($params['js']) ? $conv_prices[$val] : $lang->formatNumber($conv_prices[$val],2);
+					$block_params['price_type'] = $conv_price_types[$val];
+					$block_params['sign'] = $conv_prices[$val] >= 0 ? '+' : '-';
+				}
+			}
+			else {
+				$block_params['price'] = '';
+				$block_params['price_type'] = '';
+				$block_params['sign'] = '';
+			}
+
+			/*if ($mode == 'selected') {
+				$selected = $combination[$object->GetId()] == $val;
+			}
+			else*/
+			$selected = false;
+			if (!$options && isset($params['preselect_first']) && $params['preselect_first'] && !$first_selected) {
+				$selected = true;
+				$first_selected = true;
+			}
+			if (is_array($options)) {
+				if ($object->GetDBField('OptionType') == 6) { // checkboxeS
+					$selected = in_array(htmlspecialchars($val), $options[$object->GetId()]);
+				}
+				else { // radio buttons ?
+					$selected = unhtmlentities($options[$object->GetId()]) == $val;
+				}
+			}
+			if ($selected) {
+				if ($mode == 'selected') {
+					if ($object->GetDBField('OptionType') != 6) {
+						$block_params['selected'] = ' selected="selected" ';
+					}
+					else {
+						$block_params['selected'] = ' checked="checked" ';
+					}
+				}
+				else {
+					switch ($object->GetDBField('OptionType')) {
+						case 1: //drop-down
+							$block_params['selected'] = ' selected="selected" ';
+							break;
+						case 3: //radio
+						case 6: //checkboxes
+							$block_params['selected'] = ' checked="checked" ';
+							break;
+					}
+				}
+			}
+			else {
+				$block_params['selected'] = '';
+			}
+
+			$o .= $this->Application->ParseBlock($block_params);
+		}
+
+		return $o;
+	}
+
+	function &GetOptions()
+	{
+		$opt_data = $this->Application->GetVar('options');
+		$options = getArrayValue($opt_data, $this->Application->GetVar('p_id'));
+		if (!$options && $this->Application->GetVar('orditems_id')) {
+			$ord_item =& $this->Application->recallObject('orditems.-opt', null, Array ('skip_autoload' => true));
+			/* @var $ord_item kDBItem */
+
+			$ord_item->Load($this->Application->GetVar('orditems_id'));
+			$item_data = unserialize($ord_item->GetDBField('ItemData'));
+			$options = getArrayValue($item_data, 'Options');
+		}
+		return $options;
+	}
+
+	function OptionData($params)
+	{
+		$object =& $this->getObject($params);
+		$options =& $this->GetOptions();
+		return getArrayValue($options, $object->GetId());
+	}
+
+
+	function ListOptions($params)
+	{
+		return $this->PrintList2($params);
+	}
+
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/product_options/product_options_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.10.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/pricing/pricing_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/pricing/pricing_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/pricing/pricing_event_handler.php	(revision 12131)
@@ -0,0 +1,462 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+// include globals.php from current folder
+k4_include_once(FULL_PATH.'/in-commerce/units/pricing/globals.php');
+
+class PricingEventHandler extends kDBEventHandler{
+
+	/**
+	 * Allows to override standart permission mapping
+	 *
+	 */
+	function mapPermissions()
+	{
+		parent::mapPermissions();
+		$permissions = Array(
+			'OnMoreBrackets'	=>	Array('subitem' => 'add|edit'),
+			'OnInfinity'		=>	Array('subitem' => 'add|edit'),
+			'OnArrange'			=>	Array('subitem' => 'add|edit'),
+		);
+		$this->permMapping = array_merge($this->permMapping, $permissions);
+	}
+
+	function mapEvents()
+	{
+		parent::mapEvents();	// ensure auto-adding of approve/decine and so on events
+		$brackets_events = Array(	'OnMoreBrackets'		=>	'PricingBracketsAction',
+		'OnArrange'				=>	'PricingBracketsAction',
+		'OnInfinity'			=>	'PricingBracketsAction');
+
+		$this->eventMethods = array_merge($this->eventMethods, $brackets_events);
+	}
+
+	function PricingBracketsAction(&$event)
+	{
+		$event->redirect=false;
+		$temp = $this->Application->GetVar($event->getPrefixSpecial(true));
+
+//		$object =& $event->GetObject();
+//		$formatter =& $this->Application->recallObject('kFormatter');
+//		$temp = $formatter->TypeCastArray($temp, $object);
+
+		//uasort($temp, 'pr_bracket_comp');
+		$bracket =& $this->Application->recallObject($event->getPrefixSpecial());
+		foreach($temp as $id => $record)
+		{
+			if( $record['MaxQty'] == '&#8734;' || $record['MaxQty'] == '∞')
+			{
+				$temp[$id]['MaxQty'] = -1;
+			}
+		}
+
+		$group_id = $this->Application->getVar('group_id');
+		if($group_id>0){
+			$where_group=' GroupId = '.$group_id.' ';
+		}
+		else {
+			$where_group= ' TRUE ';
+		}
+
+		switch ($event->Name)
+		{
+			case 'OnMoreBrackets':
+
+				$new_id = (int)$this->Conn->GetOne('SELECT MIN('.$bracket->IDField.') FROM '.$bracket->TableName);
+				if($new_id > 0) $new_id = 0;
+				do
+				{
+					$new_id--;
+				} while
+				($this->check_array($this->Application->GetVar($event->getPrefixSpecial(true)), 'PriceId', $new_id));
+
+
+				$last_max_qty = $this->Conn->GetOne('SELECT MAX(MaxQty) FROM '.$bracket->TableName.' WHERE '.$where_group);
+				$min_qty = $this->Conn->GetOne('SELECT MIN(MaxQty) FROM '.$bracket->TableName.' WHERE '.$where_group);
+
+				if ($min_qty==-1) $last_max_qty = -1;
+				if (!$last_max_qty) $last_max_qty=1;
+
+				for($i = $new_id; $i > $new_id - 5; $i--)
+				{
+					$temp[$i]['PriceId'] = $i;
+					$temp[$i]['MinQty'] = ($i == $new_id-4 && $last_max_qty != -1) ? $last_max_qty : '';
+					$temp[$i]['MaxQty'] = ($i == $new_id-4 && $last_max_qty != -1) ? -1 : '';
+					$temp[$i]['Price'] = '';
+					$temp[$i]['Cost'] = '';
+					$temp[$i]['Points'] = '';
+					$temp[$i]['Negotiated'] = '0';
+					$temp[$i]['IsPrimary'] = '0';
+					$temp[$i]['GroupId'] = $group_id;
+
+
+				}
+
+				$this->Application->SetVar($event->getPrefixSpecial(true), $temp);
+				$event->CallSubEvent('OnPreSaveBrackets');
+				break;
+
+			case 'OnArrange':
+				$temp=$this->OnArrangeBrackets($event, $temp, $bracket);
+				$this->Application->SetVar($event->getPrefixSpecial(true), $temp);
+				$event->CallSubEvent('OnPreSaveBrackets');
+				break;
+
+			case 'OnInfinity':
+				$temp=$this->OnArrangeBrackets($event, $temp, $bracket);
+				$this->Application->SetVar($event->getPrefixSpecial(true), $temp);
+				$event->CallSubEvent('OnPreSaveBrackets');
+
+				$infinite_exists = $this->Conn->GetOne('SELECT count(*) FROM '.$bracket->TableName.' WHERE MaxQty=-1 '.' AND '.$where_group);
+
+				if($infinite_exists==0){
+					reset($temp);
+					$last_bracket=end($temp);
+					$new_id = (int)$this->Conn->GetOne('SELECT MIN('.$bracket->IDField.') FROM '.$bracket->TableName);
+
+					$brackets_exist = (int)$this->Conn->GetOne('SELECT COUNT(*) FROM '.$bracket->TableName.' WHERE '.$where_group);
+
+					if($new_id > 0) $new_id = 0;
+					do
+					{
+						$new_id--;
+					} while
+					($this->check_array($this->Application->GetVar($event->getPrefixSpecial(true)), 'PriceId', $new_id));
+
+
+					$infinite_bracket['PriceId'] = $new_id;
+					$infinite_bracket['MinQty'] = ($brackets_exist>0)?$last_bracket['MaxQty']:1;
+					$infinite_bracket['MaxQty'] = '-1';
+					$infinite_bracket['Price'] = '';
+					$infinite_bracket['Cost'] = '';
+					$infinite_bracket['Points'] = '';
+					$infinite_bracket['Negotiated'] = '0';
+					$infinite_bracket['IsPrimary'] = '0';
+					$infinite_bracket['GroupId'] = $group_id;
+					$temp[$new_id]=$infinite_bracket;
+					reset($temp);
+				}
+
+				$this->Application->SetVar($event->getPrefixSpecial(true), $temp);
+				$event->CallSubEvent('OnPreSaveBrackets');
+				break;
+
+			default:
+		}
+
+		$this->Application->SetVar($event->getPrefixSpecial(true), $temp);
+	}
+
+	function OnPreSaveBrackets(&$event)
+	{
+		if( $this->Application->GetVar('pr_tang'))
+		{
+			$object =& $event->GetObject();
+
+			$group_id = $this->Application->getVar('group_id');
+			if($group_id>0){
+				$where_group=' AND GroupId = '.$group_id.' ';
+			}
+
+			$stored_ids = $this->Conn->GetCol("SELECT PriceId FROM ".$object->TableName." WHERE ProductId=".$this->Application->GetVar("p_id").' '.$where_group);
+
+			$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true));
+
+
+			uasort($items_info, 'pr_bracket_comp');
+
+
+			foreach ($items_info as $item_id=>$values)
+			{
+
+				if (in_array($item_id, $stored_ids)) { //if it's already exist
+					$object->SetDefaultValues();
+					$object->Load($item_id);
+					$object->SetFieldsFromHash($values);
+					if (!$object->Validate()) {
+						unset($stored_ids[array_search($item_id, $stored_ids)]);
+						$event->redirect = false;
+						continue;
+					}
+					if( $object->Update($item_id) )
+					{
+						$event->status=erSUCCESS;
+					}
+					else
+					{
+						$event->status=erFAIL;
+						$event->redirect=false;
+						break;
+					}
+					unset($stored_ids[array_search($item_id, $stored_ids)]);
+				}
+				else {
+					$object->SetDefaultValues();
+					$object->SetFieldsFromHash($values);
+					$object->SetDBField('ProductId', $this->Application->GetVar("p_id"));
+
+					if( $object->Create() )
+					{
+						$object->setTempID();
+						$event->status=erSUCCESS;
+					}
+				}
+			}
+
+			// delete
+			foreach ($stored_ids as $stored_id){
+				$this->Conn->Query("DELETE FROM ".$object->TableName." WHERE PriceId=".$stored_id);
+			}
+
+		}
+	}
+
+	function customProcessing(&$event,$type)
+	{
+		$bracket =& $event->getObject();
+		switch ($type)
+		{
+			case 'before':
+				$bracket->SetDBField('ProductId', $this->Application->GetVar('p_id'));
+				if( $bracket->GetDBField('MaxQty') == '&#8734;' || $bracket->GetDBField('MaxQty') == '∞' )
+				{
+					$bracket->SetDBField('MaxQty', -1);
+				}
+				break;
+			case 'after':
+
+				break;
+			default:
+		}
+	}
+
+	function OnArrangeBrackets(&$event, &$temp, &$bracket)
+	{
+		$temp_orig = $temp;
+		reset($temp);
+		if (is_array($temp))
+		{
+			// array to store max values (2nd column)
+			$end_values = Array();
+
+			// get minimal value of Min
+			$first_elem=current($temp);
+			$start = $first_elem['MinQty'];
+			if (!$start){
+				$start = 1;
+			}
+			foreach($temp as $id => $record)
+			{
+
+				/*
+				This 3-ifs logic fixes collision with invalid input values having
+				1 pricing record.
+				The logic is:
+				1) If we got Max less than Min, we set Min to 1 that gives us
+				integrity.
+				2) If we got equal values for Min and Max, we set range 1..Max like
+				in previous. But if Min was 1 and Max was 1 we set full range 1..infinity
+				3) If we got Max = 0 we just set it tom infinity because we can't
+				guess what user meant
+				*/
+
+				if (sizeof($temp) == 1 && $record['MinQty'] > ($record['MaxQty'] == -1 ? $record['MinQty']+1 : $record['MaxQty']) ){
+					$record['MinQty'] = 1;
+					$temp[$id]['MinQty'] = 1;
+					$start = 1;
+				}
+
+				if (sizeof($temp) == 1 && $record['MinQty'] == $record['MaxQty']){
+					if ($record['MaxQty'] == 1){
+						$record['MaxQty'] = -1;
+						$temp[$id]['MaxQty'] = -1;
+					}
+					else {
+						$record['MinQty'] = 1;
+						$temp[$id]['MinQty'] = 1;
+					}
+				}
+
+				if (sizeof($temp) == 1 && $record['MaxQty'] == 0){
+					$record['MaxQty'] = -1;
+					$temp[$id]['MaxQty'] = -1;
+				}
+
+				if(
+				// MAX is less than start
+				($record['MaxQty'] <= $start && $record['MaxQty'] != -1) ||
+				// Max is empty
+				!$record['MaxQty'] ||
+				// Max already defined in $end_values
+				(array_search($record['MaxQty'], $end_values) !== false)
+				) {	// then delete from brackets list
+					unset($temp[$id]);
+				}
+				else {	// this is when ok - add to end_values list
+					$end_values[] = $record['MaxQty'];
+				}
+			}
+
+			// sort brackets by 2nd column (Max values)
+			uasort($temp, 'pr_bracket_comp');
+			reset($temp);
+			$first_item=each($temp);
+			$first_item_key=$first_item['key'];
+
+			$group_id = $this->Application->getVar('group_id');
+
+
+			$default_group = $this->Application->ConfigValue('User_LoggedInGroup');
+			if($group_id>0){
+				$where_group=' AND GroupId = '.$group_id.' ';
+			}
+
+			$ids = $this->Conn->GetCol('SELECT PriceId FROM '.$bracket->TableName.' WHERE ProductId='.$this->Application->GetVar('p_id').' '.$where_group);
+			if(is_array($ids)) {
+				usort($ids, 'pr_bracket_id_sort');
+			}
+			$min_id = min( min($ids) - 1, -1 );
+
+
+			foreach($temp as $key => $record)
+			{
+				$temp[$key]['MinQty']=$start;
+				$temp[$key]['IsPrimary']=0;
+				$temp[$key]['GroupId']=$group_id;
+				$start=$temp[$key]['MaxQty'];
+
+			}
+			if ($temp[$first_item_key]['GroupId'] == $default_group) {
+				$temp[$first_item_key]['IsPrimary']=1;
+			}
+
+		}
+		return $temp;
+	}
+
+	/**
+	 * Set's price as primary for product
+	 *
+	 * @param kEvent $event
+	 */
+	function OnSetPrimary(&$event)
+	{
+		$object =& $event->getObject( Array('skip_autoload' => true) );
+		$this->StoreSelectedIDs($event);
+		$ids=$this->getSelectedIDs($event);
+		if($ids)
+		{
+			$id = array_shift($ids);
+			$table_info = $object->getLinkedInfo();
+
+			$this->Conn->Query('UPDATE '.$object->TableName.' SET IsPrimary = 0 WHERE '.$table_info['ForeignKey'].' = '.$table_info['ParentId']);
+			$this->Conn->Query('UPDATE '.$object->TableName.' SET IsPrimary = 1 WHERE ('.$table_info['ForeignKey'].' = '.$table_info['ParentId'].') AND (PriceId = '.$id.')');
+		}
+		$event->redirect_params = Array('opener' => 's'); //stay!
+	}
+
+	function OnBeforeItemUpdate(&$event)
+	{
+		// TODO: during import special of product is not empty as usual and this raises problems to getLinkedInfo
+		$object =& $event->getObject();
+		$table_info = $object->getLinkedInfo();
+
+		$table_info['ParentId'] = ($table_info['ParentId']?$table_info['ParentId']:0);
+
+		if ( $object->GetDBField('IsPrimary') == 1 ){
+			$this->Conn->Query('UPDATE '.$object->TableName.' SET IsPrimary = 0 WHERE '.$table_info['ForeignKey'].' = '.$table_info['ParentId']);
+		}
+
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnBeforeItemCreate(&$event)
+	{
+		$object =& $event->getObject();
+		$table_info = $object->getLinkedInfo($event->Special);
+
+		$table_info['ParentId'] = ($table_info['ParentId']?$table_info['ParentId']:0);
+
+		if ( $object->GetDBField('IsPrimary') == 1 ){
+			$this->Conn->Query('UPDATE '.$object->TableName.' SET IsPrimary = 0 WHERE '.$table_info['ForeignKey'].' = '.$table_info['ParentId']);
+		}
+		else {
+			$prices_qty = $this->Conn->GetOne('SELECT COUNT(*) FROM '.$object->TableName.' WHERE '.$table_info['ForeignKey'].' = '.$table_info['ParentId']);
+
+			if ($prices_qty == 0) {
+				$object->SetDBField('IsPrimary', 1);
+			}
+		}
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function SetCustomQuery(&$event){
+		$object =& $event->getObject();
+
+		if (!$this->Application->IsAdmin()){
+			$user_groups = $this->Application->RecallVar('UserGroups');
+
+			$pricing_method = $this->Application->ConfigValue('Comm_PriceBracketCalculation');
+			if ($pricing_method == 1){
+				$primary_group = $this->Conn->GetOne('SELECT GroupId FROM '.TABLE_PREFIX.'UserGroup WHERE PortalUserId='.$this->Application->GetVar('u_id').' AND PrimaryGroup=1');
+				$pricing_group = $primary_group;
+				if ($pricing_group) {
+					$pricing_for_group_exists = $this->Conn->GetOne('SELECT COUNT(*) FROM '.TABLE_PREFIX.'ProductsPricing WHERE ProductId='.$this->Application->GetVar('p_id').' AND GroupId='.$primary_group.' AND Price IS NOT NULL');
+				}
+				if ($pricing_group && $pricing_for_group_exists > 0){
+					$pricing_group = $primary_group;
+				}
+				else {
+					$pricing_group = $this->Application->ConfigValue('User_LoggedInGroup');
+				}
+
+
+			}
+			else {
+				//$cheapest_group = $this->Conn->GetOne('SELECT GroupId FROM '.$object->TableName.' WHERE ProductId='.$this->Application->GetVar('p_id').' AND Price IS NOT NULL AND GroupId IN ('.$user_groups.') AND MinQty = 1 GROUP BY GroupId ORDER BY Price ASC');
+				$effective_brackets = $this->Conn->Query('SELECT PriceId, Price, GroupId FROM '.$object->TableName.'
+					WHERE ProductId='.$this->Application->GetVar('p_id').' AND Price IS NOT NULL AND GroupId IN ('.$user_groups.') ORDER BY GroupId ASC, MinQty ASC', 'PriceId');
+				$group_prices = array();
+				$min_price = -1;
+				$cheapest_group = 0;
+
+				foreach ($effective_brackets as $bracket) {
+					if (!isset($group_prices[$bracket['GroupId']])) {
+						$group_prices[$bracket['GroupId']] = $bracket['Price'];
+						if ($bracket['Price'] < $min_price || $min_price == -1) {
+							$min_price = $bracket['Price'];
+							$cheapest_group = $bracket['GroupId'];
+						}
+					}
+				}
+
+				if (!$cheapest_group) $cheapest_group = $this->Application->ConfigValue('User_LoggedInGroup');
+
+				$pricing_group = $cheapest_group;
+			}
+
+			$object->addFilter('price_user_group', $object->TableName.'.GroupId='.$pricing_group);
+		}
+	}
+
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/pricing/pricing_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.22
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/pricing/pricing_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/pricing/pricing_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/pricing/pricing_config.php	(revision 12131)
@@ -0,0 +1,131 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+$config	=	Array(
+					'Prefix'			=>	'pr',
+					'ItemClass'			=>	Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'PricingEventHandler','file'=>'pricing_event_handler.php','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'PricingTagProcessor','file'=>'pricing_tag_processor.php','build_event'=>'OnBuild'),
+					'AutoLoad'			=>	true,
+
+					'Hooks'				=>	Array(
+												// for tangible products: pricings are always aranged before saveing product
+												Array(
+													'Mode' => hBEFORE,
+													'Conditional' => true,
+													'HookToPrefix' => '#PARENT#',
+													'HookToSpecial' => '',
+													'HookToEvent' => Array('OnPreSave'),
+													'DoPrefix' => '',
+													'DoSpecial' => 'tang',
+													'DoEvent' => 'OnArrange',
+												),
+											),
+
+					'AggregateTags' => Array(
+												Array(
+													'AggregateTo' => '#PARENT#',
+													'AggregatedTagName' => 'Price',
+													'LocalTagName' => 'ProductPrice',
+												),
+												Array(
+													'AggregateTo' => '#PARENT#',
+													'AggregatedTagName' => 'ListPriceBrackets',
+													'LocalTagName' => 'Product_ListPriceBrackets',
+												),
+												Array(
+													'AggregateTo' => '#PARENT#',
+													'AggregatedTagName' => 'HasQuantityPricing',
+													'LocalTagName' => 'Product_HasQuantityPricing',
+												),
+										),
+
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'page',
+												3	=>	'event',
+											),
+					'StatusField'		=>	Array('IsPrimary'),
+					'IDField'			=>	'PriceId',
+					'TableName'			=>	TABLE_PREFIX.'ProductsPricing',
+
+					'ForeignKey'		=>	'ProductId',
+					'ParentTableKey'	=>	'ProductId',
+					'ParentPrefix'		=>	'p',
+					'AutoDelete'		=>	true,
+					'AutoClone'			=>	true,
+
+					'ListSQLs'			=>	Array(	''=>'SELECT * FROM %s',
+																		), // key - special, value - list select sql
+					'ItemSQLs'			=>	Array(	''=>'SELECT * FROM %s',
+																		),
+					'ListSortings'	=> 	Array(
+																'' => Array(
+																	'Sorting' => Array('MinQty' => 'asc'),
+																)
+															),
+					'Fields'			=>	Array(
+											    'PriceId'		=>	Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
+											    'ProductId'		=>	Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+											    'MinQty'		=>	Array('type' => 'int', 'default' => 0),
+											    'MaxQty'		=>	Array('type' => 'int', 'default' => 0),
+											    'Cost'			=>	Array('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0),
+											    'Price'			=>	Array('type' => 'float', 'not_null' => 1, 'formatter' => 'kFormatter', 'min_value_inc' => 0, 'format' => '%.2f', 'default' => 0),
+											    'Negotiated'	=>	Array('type' => 'int', 'default' => 0),
+											    'Points'		=>	Array('type' => 'int', 'default' => 0),
+											    'AccessDuration'=>	Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
+											    'AccessUnit'	=>	Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(1 => 'la_opt_sec', 2 => 'la_opt_min', 3 => 'la_opt_hour', 4 => 'la_opt_day', 5 => 'la_opt_week', 6 => 'la_opt_month', 7 => 'la_opt_year'), 'not_null' => 1, 'default' => 0,),
+											    'Description'	=>	Array('type' => 'string', 'max_len' => 255, 'default' => NULL),
+											    'IsPrimary'		=>	Array('type' => 'int', 'default' => 0, 'not_null' => 1),
+											    'GroupId'		=>	Array('type' => 'int', 'default' => 0, 'not_null' => 1),
+											//    'AccessRebillDate'				=>	Array('type'=>'integer', 'min_value' => 0, 'max_value' => 31, 'not_null'=>'1', 'default'=>0),
+											    // Customization healtheconomics.org
+//											    'DurationType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(1 => 'la_opt_interval', 2 => 'la_opt_date'), 'not_null' => 1, 'default' => 1),
+//											    'AccessExpiration' => Array('type' => 'int', 'formatter' => 'kDateFormatter'),
+											    // Customization healtheconomics.org --
+
+											),
+					'VirtualFields'	=> 	Array(
+													),
+
+					'Grids'	=> Array(
+					/*
+								'Default'		=>	Array(
+																	'Icons' => Array('default'=>'icon16_custom.gif'),	// icons for each StatusField values, if no matches or no statusfield selected, then "default" icon is used
+																	'Fields' => Array(
+																			'MinQty' => Array( 'title'=>'la_col_MinQty', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+																			'MaxQty' => Array( 'title'=>'la_col_MaxQty', 'filter_block' => 'grid_range_filter'),
+																			'Price' => Array( 'title'=>'la_col_Price', 'filter_block' => 'grid_range_filter'),
+																			'Points' => Array( 'title'=>'la_col_Points', 'filter_block' => 'grid_range_filter'),
+																			'Cost' => Array( 'title'=>'la_col_Cost', 'filter_block' => 'grid_range_filter'),
+																			'Negotiated' => Array( 'title'=>'la_col_Negotiated', 'data_block' => 'negotiated_td', 'filter_block' => 'grid_options_filter'),
+																			),
+
+																),
+					*/
+								'Access'		=>	Array(
+																	'Icons' => Array('default'=>'icon16_pricing.gif','0'=>'icon16_pricing.gif','1'=>'icon16_pricing_primary.gif'),
+																	'Fields' => Array(
+																			'AccessDuration' => Array( 'title'=>'la_col_AccessDuration', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+																			'AccessUnit' => Array( 'title'=>'la_col_AccessDurationUnit', 'filter_block' => 'grid_options_filter'),
+																			'Description' => Array( 'title'=>'la_col_Description', 'filter_block' => 'grid_like_filter'),
+																			'Price' => Array( 'title'=>'la_col_Price', 'filter_block' => 'grid_float_range_filter'),
+																			),
+
+																),
+													),
+
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/pricing/pricing_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.20.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/pricing/globals.php
===================================================================
--- branches/5.1.x/in-commerce/units/pricing/globals.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/pricing/globals.php	(revision 12131)
@@ -0,0 +1,71 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+function pr_bracket_comp($elem1, $elem2)
+{
+	
+	if ($elem1['MinQty']!="" && $elem1['MaxQty']=="" && $elem2['MinQty']!="" && $elem2['MaxQty']!="")	return 1;
+	if ($elem1['MinQty']!="" && $elem1['MaxQty']=="" && $elem2['MinQty']=="" && $elem2['MaxQty']=="")	return -1;
+
+	
+	if ($elem1['MaxQty']=="" && $elem2['MaxQty']!="")	return 1;
+	if ($elem1['MaxQty']!="" && $elem2['MaxQty']=="")	return -1;
+	
+	
+	if( ($elem1['MaxQty']>$elem2['MaxQty'] && $elem2['MaxQty']!=-1) || ($elem1['MaxQty'] == -1 && $elem2['MaxQty'] != -1 ))
+	{
+		return 1;
+	}
+	elseif ( ($elem1['MaxQty']<$elem2['MaxQty']) || ($elem2['MaxQty'] == -1 && $elem1['MaxQty'] != -1 ))
+	{
+		return -1;
+	}
+	else 
+	{
+		return 0;
+	}
+}
+
+function pr_bracket_id_sort($first_id, $second_id)
+{
+	$first_abs = abs($first_id);
+	$second_abs = abs($second_id);
+	$first_sign = ($first_id == 0) ? 0 : $first_id / $first_abs;
+	$second_sign = ($second_id == 0) ? 0 : $second_id / $second_abs;
+	if($first_sign != $second_sign)
+	{
+		if($first_id > $second_id) {
+			$bigger =& $first_abs;
+			$smaller =& $second_abs;
+		}
+		else {
+			$bigger =& $second_abs;
+			$smaller =& $first_abs;
+		}
+		$smaller = $bigger + $smaller;
+	}
+	
+	if($first_abs > $second_abs) {
+		return 1;
+	}
+	elseif ($first_abs < $second_abs)
+	{
+		return -1;
+	}
+	else 
+	{
+		return 0;
+	}
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/pricing/globals.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/pricing/pricing_tag_processor.php
===================================================================
--- branches/5.1.x/in-commerce/units/pricing/pricing_tag_processor.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/pricing/pricing_tag_processor.php	(revision 12131)
@@ -0,0 +1,165 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class PricingTagProcessor extends kDBTagProcessor{
+
+	function ProductPrice($params)
+	{
+		$object =& $this->Application->recallObject($params['PrefixSpecial']);
+		$price = $object->GetField('Price');
+
+		// display selected currency by default
+		if (!isset($params['currency']) || $params['currency'] == 'selected') {
+			$iso = $this->Application->RecallVar('curr_iso');
+		}
+		elseif ($params['currency'] == 'primary') {
+			$iso = 'USD';
+		}
+		else { //explicit currency
+			$iso = $params['currency'];
+		}
+
+		// convert primary currency to selected (if they are the same, converter will just return)
+
+		$converter =& $this->Application->recallObject('kCurrencyRates');
+		$price = $converter->Convert($price, 'PRIMARY', $iso);
+
+		$currency =& $this->Application->recallObject('curr.-'.$iso, null, Array('skip_autoload' => true));
+		if( !$currency->isLoaded() ) $currency->Load($iso, 'ISO');
+
+		$symbol = $currency->GetDBField('Symbol');
+		if (!$symbol) $symbol = $currency->GetDBField('ISO');
+		$formatted = '';
+		if ($currency->GetDBField('SymbolPosition') == 0) {
+			$formatted .= $symbol;
+		}
+		$formatted .= $price;
+		if ($currency->GetDBField('SymbolPosition') == 1) {
+			$formatted .= $symbol;
+		}
+
+		return $formatted;
+	}
+
+	function Product_ListPriceBrackets($params)
+	{
+		return $this->PrintList2($params);
+	}
+
+	function Field($params)
+	{
+		$field = $this->SelectParam($params, 'name,field');
+		$value = parent::Field($params);
+		if (($field == 'MaxQty') && ($value == -1)) {
+			$value = '&infin;';
+		}
+		return $value;
+	}
+
+	function Product_HasQuantityPricing($params)
+	{
+		return (int)$this->TotalRecords($params) > 1;
+	}
+
+
+	function ShowPricingForm($params)
+	{
+		$br_object =& $this->getObject( Array('skip_autoload' => true) );
+
+		$br_data = $this->Application->GetVar("pr_tang");
+
+		$group_id = $this->Application->getVar('group_id');
+		if($group_id>0){
+			$where_group=' AND GroupId = '.$group_id.' ';
+		}
+
+		if(!$br_data)
+		{
+			$sql = 	'SELECT * FROM '.$br_object->TableName.' WHERE ProductId = '.$this->Application->GetVar('p_id').' '.$where_group;
+			$brackets = $this->Conn->Query($sql, 'PriceId');
+
+			usort($brackets, 'pr_bracket_comp');
+
+			$dummy =& $this->Application->recallObject($this->Prefix.'.-dummy', null, array('skip_autoload' => true));
+			/* @var $dummy kDBItem */
+
+			foreach($brackets as $id => $values)
+			{
+				foreach($values as $value_key=>$value_val){
+					$dummy->SetDBField($value_key, $value_val);
+					$brackets[$id][$value_key] = $dummy->GetField($value_key);
+				}
+			}
+
+			$br_data=$brackets;
+			$this->Application->SetVar($this->getPrefixSpecial(true), $brackets);
+		}
+		else
+		{
+			usort($br_data , 'pr_bracket_comp');
+
+		}
+
+		$ret = '';
+		if( is_array($br_data) )
+		{
+
+			$block_params=$this->prepareTagParams($params);
+			$block_params['IdField']='PriceId';
+			$block_params['name'] = $params['block'];
+			$first = true;
+
+			// this is needed to find next id
+			$br_data_copy=$br_data;
+			foreach($br_data as $id => $values)
+			{
+
+				foreach($values as $value_key=>$value_val){
+					$block_params[$value_key] = $value_val;
+				}
+				reset($values);
+
+				next($br_data_copy);
+				$next_bracket=current($br_data_copy);
+
+				$block_params['id']	= $values["PriceId"];
+				$block_params['min']	= ($id == -1) ? ($values['MinQty'] ? $values['MinQty'] : 0) : $values['MinQty'];
+				$block_params['max'] = ($values['MaxQty'] == -1) ? '&infin;' : $values['MaxQty'];
+				$block_params['next_min_id']=$next_bracket['PriceId'];
+
+				if ($first)
+				{
+					$block_params['first'] = 1;
+					$first = false;
+				}
+				else
+				{
+					$block_params['first'] = 0;
+				}
+				$ret .= $this->Application->ParseBlock($block_params, 1);
+			}
+		}
+		return $ret;
+	}
+
+	function AddToCartLink($params)
+	{
+		$value = $this->Field(array('name'=>'PriceId'));
+		//$this->Application->SetVar('p_id', $this->Application->GetVar($this->getPrefixSpecial().'_id'));
+		$this->Application->SetVar('pr_id', $value);
+		return $this->Application->HREF($params['template'], '', Array('pass' => 'm,p,pr,ord', 'ord_event' => 'OnAddToCart'));
+	}
+
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/pricing/pricing_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.15.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/reports/reports_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/reports/reports_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/reports/reports_event_handler.php	(revision 12131)
@@ -0,0 +1,830 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class ReportsEventHandler extends kDBEventHandler {
+
+	function mapPermissions()
+	{
+		parent::mapPermissions();
+		$permissions = Array(
+			// user can view any form on front-end
+			'OnRunReport' => Array ('self' => 'view'),
+			'OnUpdateConfig' => Array ('self' => 'view'),
+			'OnChangeStatistics' => Array ('self' => 'view'),
+			'OnPieChart' => Array ('self' => 'view'),
+			'OnPrintChart' => Array ('self' => 'view'),
+			'OnExportReport' => Array ('self' => 'view'),
+		);
+
+		$this->permMapping = array_merge($this->permMapping, $permissions);
+	}
+
+	function OnRunReport(&$event)
+	{
+		$this->Application->LinkVar('reports_finish_t');
+		$progress_t = $this->Application->GetVar('progress_t');
+		$event->redirect = $progress_t;
+
+		$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
+		if($items_info) $field_values = array_shift($items_info);
+
+		$object =& $event->getObject( Array('skip_autoload' => true) );
+		$object->SetFieldsFromHash($field_values);
+		$object->UpdateFormattersMasterFields();
+
+		$field_values['offset'] = 0;
+		$table_name = TABLE_PREFIX.'ses_'.$this->Application->GetSID().'_SaleReport';
+		$field_values['table_name'] = $table_name;
+		$this->Conn->Query('DROP TABLE IF EXISTS '.$table_name);
+
+		$filter_value = '';
+		$from = $object->GetDBField('FromDateTime');
+		$to = $object->GetDBField('ToDateTime');
+
+		$day_seconds = 23 * 60 * 60 + 59 * 60 + 59;
+		if ($from && !$to) {
+			$to = $from + $day_seconds;
+		}
+		elseif (!$from && $to) {
+			$from = $to - $day_seconds;
+		}
+
+		if ($from && $to) {
+			$filter_value = 'AND o.OrderDate >= '.$from.' AND o.OrderDate <= '.$to;
+		}
+
+		$ebay_table_fields = '';
+		$ebay_joins = '';
+		$ebay_query_fields = '';
+
+		$user_id = $this->Application->RecallVar('user_id');
+		$sql = 'DELETE FROM '.TABLE_PREFIX.'PersistantSessionData
+			WHERE
+				PortalUserId = "'.$user_id.'"
+				AND VariableName LIKE \'rep_columns_%\'';
+		$this->Conn->Query($sql);
+
+		if ($this->Application->isModuleEnabled('in-auction'))
+		{
+			if (in_array($field_values['ReportType'], Array(1,5)))  // not overall.
+			{
+				$ebay_table_fields = ',
+					StoreQty int(11) NOT NULL DEFAULT 0,
+					eBayQty int(11) NOT NULL DEFAULT 0,
+					StoreAmount double(10,4) NOT NULL DEFAULT 0,
+					eBayAmount double(10,4) NOT NULL DEFAULT 0,
+					StoreProfit double(10,4) NOT NULL DEFAULT 0,
+					eBayProfit double(10,4) NOT NULL DEFAULT 0';
+
+				$ebay_joins = '
+					LEFT JOIN '.TABLE_PREFIX.'eBayOrderItems AS eod
+					ON od.OptionsSalt = eod.OptionsSalt
+				';
+
+				$ebay_query_fields = ',
+					SUM(IF(ISNULL(eod.OptionsSalt), od.Quantity, 0)) as StoreQty,
+					SUM(IF(ISNULL(eod.OptionsSalt), 0, od.Quantity)) as eBayQty,
+					SUM(IF(ISNULL(eod.OptionsSalt), od.Price * od.Quantity, 0)) as StoreAmount,
+					SUM(IF(ISNULL(eod.OptionsSalt), 0, od.Price * od.Quantity)) as eBayAmount,
+					SUM(IF(ISNULL(eod.OptionsSalt), (od.Price - od.Cost) * od.Quantity, 0)) as StoreProfit,
+					SUM(IF(ISNULL(eod.OptionsSalt), 0, (od.Price - od.Cost) * od.Quantity)) as eBayProfit
+				';
+			}
+
+		}
+
+		if ($field_values['ReportType'] == 1) { // by Category
+			$q = 'CREATE TABLE '.$table_name.' (
+							CategoryId int(11) NOT NULL DEFAULT 0,
+							Qty int(11) NOT NULL DEFAULT 0,
+							Cost double(10,4) NOT NULL DEFAULT 0,
+							Amount double(10,4) NOT NULL DEFAULT 0,
+							Tax double(10,4) NOT NULL DEFAULT 0,
+							Shipping double(10,4) NOT NULL DEFAULT 0,
+							Processing double(10,4) NOT NULL DEFAULT 0,
+							Profit double(10,4) NOT NULL DEFAULT 0
+							'.$ebay_table_fields.'
+						)';
+			$field_values['total'] = $this->Conn->GetOne('SELECT COUNT(*) FROM '.TABLE_PREFIX.'Category');
+			$this->Conn->Query($q);
+
+			$q = 'INSERT INTO '.$field_values['table_name'].'
+						SELECT
+							c.CategoryId,
+							SUM(od.Quantity) as Qty,
+							SUM(od.Cost * od.Quantity) as Cost,
+							SUM(od.Price * od.Quantity) as SaleAmount,
+							SUM(o.VAT * od.Price * od.Quantity / o.SubTotal) as Tax,
+							SUM(o.ShippingCost * od.Price * od.Quantity / o.SubTotal) as Shipping,
+							SUM(o.ProcessingFee * od.Price * od.Quantity / o.SubTotal) as Processing,
+							SUM((od.Price - od.Cost) * od.Quantity) as Profit'
+							.$ebay_query_fields.'
+						FROM '.TABLE_PREFIX.'Orders AS o
+						LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
+						ON od.OrderId = o.OrderId
+						LEFT JOIN '.TABLE_PREFIX.'Products AS p
+						ON p.ProductId = od.ProductId
+						LEFT JOIN '.TABLE_PREFIX.'CategoryItems AS ci
+						ON ci.ItemResourceId = p.ResourceId
+						LEFT JOIN '.TABLE_PREFIX.'Category AS c
+						ON c.CategoryId = ci.CategoryId
+						'.$ebay_joins.'
+						WHERE
+							o.Status IN (4,6)
+							AND
+							ci.PrimaryCat = 1
+							'.$filter_value.'
+						GROUP BY c.CategoryId
+						HAVING NOT ISNULL(CategoryId)
+						';
+			$this->Conn->Query($q);
+		}
+		elseif ($field_values['ReportType'] == 2) { // by User
+			$q = 'CREATE TABLE '.$table_name.' (
+							PortalUserId int(11) NOT NULL DEFAULT 0,
+							Qty int(11) NOT NULL DEFAULT 0,
+							Cost double(10,4) NOT NULL DEFAULT 0,
+							Amount double(10,4) NOT NULL DEFAULT 0,
+							Tax double(10,4) NOT NULL DEFAULT 0,
+							Shipping double(10,4) NOT NULL DEFAULT 0,
+							Processing double(10,4) NOT NULL DEFAULT 0,
+							Profit double(10,4) NOT NULL DEFAULT 0
+						)';
+			$field_values['total'] = $this->Conn->GetOne('SELECT COUNT(*) FROM '.TABLE_PREFIX.'Category');
+			$this->Conn->Query($q);
+
+			$q = 'INSERT INTO '.$field_values['table_name'].'
+						SELECT
+							u.PortalUserId,
+							SUM(od.Quantity) as Qty,
+							SUM(od.Cost * od.Quantity) as Cost,
+							SUM(od.Price * od.Quantity) as SaleAmount,
+							SUM(o.VAT * od.Price * od.Quantity / o.SubTotal) as Tax,
+							SUM(o.ShippingCost * od.Price * od.Quantity / o.SubTotal) as Shipping,
+							SUM(o.ProcessingFee * od.Price * od.Quantity / o.SubTotal) as Processing,
+							SUM((od.Price - od.Cost) * od.Quantity) as Profit
+						FROM '.TABLE_PREFIX.'Orders AS o
+						LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
+						ON od.OrderId = o.OrderId
+						LEFT JOIN '.TABLE_PREFIX.'PortalUser AS u
+						ON u.PortalUserId = o.PortalUserId
+						WHERE
+							o.Status IN (4,6)
+							'.$filter_value.'
+						GROUP BY u.PortalUserId
+						HAVING NOT ISNULL(PortalUserId)
+						';
+			$this->Conn->Query($q);
+		}
+		elseif ($field_values['ReportType'] == 5) { // by Product
+			$q = 'CREATE TABLE '.$table_name.' (
+							ProductId int(11) NOT NULL DEFAULT 0,
+							Qty int(11) NOT NULL DEFAULT 0,
+							Cost double(10,4) NOT NULL DEFAULT 0,
+							Amount double(10,4) NOT NULL DEFAULT 0,
+							Tax double(10,4) NOT NULL DEFAULT 0,
+							Shipping double(10,4) NOT NULL DEFAULT 0,
+							Processing double(10,4) NOT NULL DEFAULT 0,
+							Profit double(10,4) NOT NULL DEFAULT 0'
+							.$ebay_table_fields.'
+						)';
+			$field_values['total'] = $this->Conn->GetOne('SELECT COUNT(*) FROM '.TABLE_PREFIX.'Products');
+			$this->Conn->Query($q);
+
+			$q = 'INSERT INTO '.$field_values['table_name'].'
+						SELECT
+							p.ProductId,
+							SUM(od.Quantity) as Qty,
+							SUM(od.Cost * od.Quantity) as Cost,
+							SUM(od.Price * od.Quantity) as SaleAmount,
+							SUM(o.VAT * od.Price * od.Quantity / o.SubTotal) as Tax,
+							SUM(o.ShippingCost * od.Price * od.Quantity / o.SubTotal) as Shipping,
+							SUM(o.ProcessingFee * od.Price * od.Quantity / o.SubTotal) as Processing,
+							SUM((od.Price - od.Cost)  * od.Quantity) as Profit'
+							.$ebay_query_fields.'
+						FROM '.TABLE_PREFIX.'Orders AS o
+						LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
+						ON od.OrderId = o.OrderId
+						LEFT JOIN '.TABLE_PREFIX.'Products AS p
+						ON p.ProductId = od.ProductId
+						'.$ebay_joins.'
+						WHERE
+							o.Status IN (4,6)
+							'.$filter_value.'
+						GROUP BY p.ProductId
+						HAVING NOT ISNULL(ProductId)
+						';
+			$this->Conn->Query($q);
+		}
+		elseif ($field_values['ReportType'] == 12) { // Overall
+			$q = 'CREATE TABLE '.$table_name.' (
+							Marketplace tinyint(1) NOT NULL DEFAULT 0,
+							Qty int(11) NOT NULL DEFAULT 0,
+							Cost double(10,4) NOT NULL DEFAULT 0,
+							Amount double(10,4) NOT NULL DEFAULT 0,
+							Tax double(10,4) NOT NULL DEFAULT 0,
+							Shipping double(10,4) NOT NULL DEFAULT 0,
+							Processing double(10,4) NOT NULL DEFAULT 0,
+							Profit double(10,4) NOT NULL DEFAULT 0
+						)';
+			$this->Conn->Query($q);
+
+			if ($this->Application->isModuleEnabled('in-auction'))
+			{
+				$field_values['total'] = 2;
+
+				$q = 'INSERT INTO '.$field_values['table_name'].'
+							SELECT
+								1 AS Marketplace,
+								SUM(IF(ISNULL(eod.OptionsSalt), od.Quantity, 0)) as Qty,
+								SUM(IF(ISNULL(eod.OptionsSalt), od.Cost * od.Quantity, 0)) as Cost,
+								SUM(IF(ISNULL(eod.OptionsSalt), od.Price * od.Quantity, 0)) as SaleAmount,
+								SUM(IF(ISNULL(eod.OptionsSalt), o.VAT * od.Price * od.Quantity / o.SubTotal, 0)) as Tax,
+								SUM(IF(ISNULL(eod.OptionsSalt), o.ShippingCost * od.Price * od.Quantity / o.SubTotal, 0)) as Shipping,
+								SUM(IF(ISNULL(eod.OptionsSalt), o.ProcessingFee * od.Price * od.Quantity / o.SubTotal, 0)) as Processing,
+								SUM(IF(ISNULL(eod.OptionsSalt), (od.Price - od.Cost)  * od.Quantity, 0)) as Profit
+							FROM '.TABLE_PREFIX.'Orders AS o
+							LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
+							ON od.OrderId = o.OrderId
+							LEFT JOIN '.TABLE_PREFIX.'eBayOrderItems AS eod
+							ON od.OptionsSalt = eod.OptionsSalt
+							WHERE
+								o.Status IN (4,6)
+								'.$filter_value;
+				$this->Conn->Query($q);
+
+
+				$q = 'INSERT INTO '.$field_values['table_name'].'
+							SELECT
+								2 AS Marketplace,
+								SUM(IF(ISNULL(eod.OptionsSalt), 0, od.Quantity)) as Qty,
+								SUM(IF(ISNULL(eod.OptionsSalt), 0, od.Cost * od.Quantity)) as Cost,
+								SUM(IF(ISNULL(eod.OptionsSalt), 0, od.Price * od.Quantity)) as SaleAmount,
+								SUM(IF(ISNULL(eod.OptionsSalt), 0, o.VAT * od.Price * od.Quantity / o.SubTotal)) as Tax,
+								SUM(IF(ISNULL(eod.OptionsSalt), 0, o.ShippingCost * od.Price * od.Quantity / o.SubTotal)) as Shipping,
+								SUM(IF(ISNULL(eod.OptionsSalt), 0, o.ProcessingFee * od.Price * od.Quantity / o.SubTotal)) as Processing,
+								SUM(IF(ISNULL(eod.OptionsSalt), 0, (od.Price - od.Cost)  * od.Quantity)) as Profit
+							FROM '.TABLE_PREFIX.'Orders AS o
+							LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
+							ON od.OrderId = o.OrderId
+							LEFT JOIN '.TABLE_PREFIX.'eBayOrderItems AS eod
+							ON od.OptionsSalt = eod.OptionsSalt
+							WHERE
+								o.Status IN (4,6)
+								'.$filter_value;
+				$this->Conn->Query($q);
+			} else {
+				$field_values['total'] = 1;
+				$q = 'INSERT INTO '.$field_values['table_name'].'
+							SELECT
+								1 AS Marketplace,
+								SUM(od.Quantity) as Qty,
+								SUM(od.Cost * od.Quantity) as Cost,
+								SUM(od.Price * od.Quantity) as SaleAmount,
+								SUM(o.VAT * od.Price * od.Quantity / o.SubTotal) as Tax,
+								SUM(o.ShippingCost * od.Price * od.Quantity / o.SubTotal) as Shipping,
+								SUM(o.ProcessingFee * od.Price * od.Quantity / o.SubTotal) as Processing,
+								SUM((od.Price - od.Cost)  * od.Quantity) as Profit
+							FROM '.TABLE_PREFIX.'Orders AS o
+							LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
+							ON od.OrderId = o.OrderId
+							WHERE
+								o.Status IN (4,6)
+								'.$filter_value;
+				$this->Conn->Query($q);
+
+			}
+		}
+
+		$vars = array('rep_Page', 'rep_Sort1', 'rep_Sort1_Dir', 'rep_Sort2', 'rep_Sort2_Dir');
+		foreach ($vars as $var_name) {
+			$this->Application->RemoveVar($var_name);
+		}
+
+		//temporary
+		$event->redirect = $this->Application->GetVar('reports_finish_t');
+
+		$field_values['from'] = $from;
+		$field_values['to'] = $to;
+
+		$this->Application->StoreVar('report_options', serialize($field_values));
+	}
+
+	function OnUpdateConfig(&$event)
+	{
+		$report = $this->Application->RecallVar('report_options');
+		if (!$report) {
+			return ;
+		}
+
+		$field_values = unserialize($report);
+
+		$rep_options = $this->Application->getUnitOptions('rep');
+		$new_options = Array ();
+
+		$new_options['TableName'] = $field_values['table_name'];
+
+		$new_options['Fields'] = Array (
+			'Qty' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%d', 'default' => 0, 'totals' => 'sum'),
+			'Cost' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0, 'totals' => 'sum'),
+			'Amount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0, 'totals' => 'sum'),
+			'Tax' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0, 'totals' => 'sum'),
+			'Shipping' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0, 'totals' => 'sum'),
+			'Processing' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0, 'totals' => 'sum'),
+			'Profit' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0, 'totals' => 'sum'),
+		);
+
+		if ( $this->Application->isModuleEnabled('in-auction') ) {
+			if ( in_Array ($field_values['ReportType'], Array (1, 5)) ) {
+				$new_options['Fields'] += Array (
+					'StoreQty' => Array ('type' => 'int', 'formatter' => 'kFormatter', 'format' => '%d', 'default' => 0, 'totals' => 'sum'),
+					'StoreAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0, 'totals' => 'sum'),
+					'StoreProfit' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0, 'totals' => 'sum'),
+					'eBayQty' => Array ('type' => 'int', 'formatter' => 'kFormatter', 'format' => '%d', 'default' => 0, 'totals' => 'sum'),
+					'eBayAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0, 'totals' => 'sum'),
+					'eBayProfit' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0, 'totals' => 'sum'),
+				);
+			}
+		}
+
+		if ($field_values['ReportType'] == 1) { // by Category
+
+			$new_options['ListSQLs'][''] =
+				'SELECT %1$s.* %2$s FROM %1$s
+				 LEFT JOIN '.TABLE_PREFIX.'Category AS c
+				 ON c.CategoryId = %1$s.CategoryId';
+			$new_options['Grids']['Default'] = Array (
+				'Icons' => Array ('default' => 'icon16_custom.gif'),
+				'Fields' => Array (
+					'CategoryName' => Array ('title' => 'la_col_CategoryName', 'filter_block' => 'grid_like_filter'),
+					'Qty' => Array ('title' => 'la_col_Qty', 'td_style' => 'text-align: center', 'total' => 'sum', 'filter_block' => 'grid_range_filter'),
+					'StoreQty' => Array ('title' => 'la_col_StoreQty', 'td_style' => 'text-align: center', 'total' => 'sum', 'filter_block' => 'grid_range_filter'),
+					'eBayQty' => Array ('title' => 'la_col_eBayQty', 'td_style' => 'text-align: center', 'total' => 'sum', 'filter_block' => 'grid_range_filter'),
+					'Cost' => Array ('title' => 'la_col_Cost', 'td_style' => 'text-align: right', 'total' => 'sum', 'hidden' => 1, 'filter_block' => 'grid_float_range_filter'),
+					'Amount' => Array ('title' => 'la_col_GMV', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
+					'StoreAmount' => Array ('title' => 'la_col_StoreGMV', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
+					'eBayAmount' => Array ('title' => 'la_col_eBayGMV', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
+					'Tax' => Array ('title' => 'la_col_Tax', 'td_style' => 'text-align: right', 'total' => 'sum', 'hidden' => 1, 'filter_block' => 'grid_float_range_filter'),
+					'Shipping' => Array ('title' => 'la_col_Shipping', 'td_style' => 'text-align: right', 'total' => 'sum', 'hidden' => 1, 'filter_block' => 'grid_float_range_filter'),
+					'Processing' => Array ('title' => 'la_col_Processing', 'td_style' => 'text-align: right', 'total' => 'sum', 'hidden' => 1, 'filter_block' => 'grid_float_range_filter'),
+					'Profit' => Array ('title' => 'la_col_Profit', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
+					'StoreProfit' => Array ('title' => 'la_col_StoreProfit', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
+					'eBayProfit' => Array ('title' => 'la_col_eBayProfit', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
+				),
+
+			);
+
+			if (!$this->Application->isModuleEnabled('in-auction')) {
+				$a_fields =& $new_options['Grids']['Default']['Fields'];
+				unset($a_fields['StoreQty']);
+				unset($a_fields['eBayQty']);
+				unset($a_fields['StoreAmount']);
+				unset($a_fields['eBayAmount']);
+				unset($a_fields['StoreProfit']);
+				unset($a_fields['eBayProfit']);
+			}
+
+			$new_options['VirtualFields'] = array_merge($rep_options['VirtualFields'], Array (
+				'CategoryName' => Array ('type' => 'string', 'default' => ''),
+	            'Metric' => Array (
+	            	'type' => 'int',
+	            	'formatter' => 'kOptionsFormatter',
+	            	'options' => $this->GetMetricOptions($new_options, 'CategoryName'),
+	            	'use_phrases' => 1,
+	            	'default' => 0,
+	            ),
+			));
+
+			$lang = $this->Application->GetVar('m_lang');
+
+			// products root category
+			$products_category_id = $this->Application->findModule('Name', 'In-Commerce', 'RootCat');
+			// get root category name
+			$sql = 'SELECT LENGTH(l' . $lang . '_CachedNavbar)
+					FROM ' . TABLE_PREFIX . 'Category
+					WHERE CategoryId = '.$products_category_id;
+			$root_length = $this->Conn->GetOne($sql) + 4;
+
+			$new_options['CalculatedFields'][''] = array(
+				'CategoryName' => 'REPLACE(SUBSTR(c.l'.$lang.'_CachedNavbar, '.$root_length.'), "&|&", " > ")',
+			);
+		}
+		elseif ($field_values['ReportType'] == 2) { // by User
+			$new_options['ListSQLs'][''] =
+				'SELECT %1$s.* %2$s FROM %1$s
+				 LEFT JOIN '.TABLE_PREFIX.'PortalUser AS u
+				 ON u.PortalUserId = %1$s.PortalUserId';
+
+			$new_options['Grids']['Default'] = Array (
+				'Icons' => Array ('default' => 'icon16_custom.gif'),
+				'Fields' => Array (
+					'Login' => Array ('title' => 'la_col_Login', 'filter_block' => 'grid_like_filter'),
+					'FirstName' => Array ('title' => 'la_col_FirstName', 'filter_block' => 'grid_like_filter'),
+					'LastName' => Array ('title' => 'la_col_LastName', 'filter_block' => 'grid_like_filter'),
+					'Qty' => Array ('title' => 'la_col_Qty', 'td_style' => 'text-align: center', 'total' => 'sum', 'filter_block' => 'grid_range_filter'),
+					'Cost' => Array ('title' => 'la_col_Cost', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
+					'Amount' => Array ('title' => 'la_col_GMV', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
+					'Tax' => Array ('title' => 'la_col_Tax', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
+					'Shipping' => Array ('title' => 'la_col_Shipping', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
+					'Processing' => Array ('title' => 'la_col_Processing', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
+					'Profit' => Array ('title' => 'la_col_Profit', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
+				),
+			);
+
+			$new_options['VirtualFields'] = array_merge($rep_options['VirtualFields'], Array (
+				'Login' => Array ('type' => 'string', 'default' => ''),
+				'FirstName' => Array ('type' => 'string', 'default' => ''),
+				'LastName' => Array ('type' => 'string', 'default' => ''),
+			));
+
+			$new_options['CalculatedFields'][''] = Array (
+				'Login' => 'u.Login',
+				'FirstName' => 'u.FirstName',
+				'LastName' => 'u.LastName',
+			);
+		}
+		elseif ($field_values['ReportType'] == 5) { // by Product
+
+			$new_options['ListSQLs'][''] =
+				'SELECT %1$s.* %2$s FROM %1$s
+				 LEFT JOIN '.TABLE_PREFIX.'Products AS p
+				 ON p.ProductId = %1$s.ProductId';
+
+			$new_options['Grids']['Default'] = Array (
+				'Icons' => Array ('default' => 'icon16_custom.gif'),
+				'Fields' => Array (
+					'ProductName' => Array ('title' => 'la_col_ProductName', 'filter_block' => 'grid_like_filter'),
+					'Qty' => Array ('title' => 'la_col_Qty', 'td_style' => 'text-align: center', 'total' => 'sum', 'filter_block' => 'grid_range_filter'),
+					'StoreQty' => Array ('title' => 'la_col_StoreQty', 'td_style' => 'text-align: center', 'total' => 'sum', 'filter_block' => 'grid_range_filter'),
+					'eBayQty' => Array ('title' => 'la_col_eBayQty', 'td_style' => 'text-align: center', 'total' => 'sum', 'filter_block' => 'grid_range_filter'),
+					'Cost' => Array ('title' => 'la_col_Cost', 'td_style' => 'text-align: right', 'total' => 'sum', 'hidden' => 1, 'filter_block' => 'grid_float_range_filter'),
+					'Amount' => Array ('title' => 'la_col_GMV', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
+					'StoreAmount' => Array ('title' => 'la_col_StoreGMV', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
+					'eBayAmount' => Array ('title' => 'la_col_eBayGMV', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
+					'Tax' => Array ('title' => 'la_col_Tax', 'td_style' => 'text-align: right', 'total' => 'sum', 'hidden' => 1, 'filter_block' => 'grid_float_range_filter'),
+					'Shipping' => Array ('title' => 'la_col_Shipping', 'td_style' => 'text-align: right', 'total' => 'sum', 'hidden' => 1, 'filter_block' => 'grid_float_range_filter'),
+					'Processing' => Array ('title' => 'la_col_Processing', 'td_style' => 'text-align: right', 'total' => 'sum', 'hidden' => 1, 'filter_block' => 'grid_float_range_filter'),
+					'Profit' => Array ('title' => 'la_col_Profit', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
+					'StoreProfit' => Array ('title' => 'la_col_StoreProfit', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
+					'eBayProfit' => Array ('title' => 'la_col_eBayProfit', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
+				),
+
+			);
+
+			if (!$this->Application->isModuleEnabled('in-auction'))
+			{
+				$a_fields =& $new_options['Grids']['Default']['Fields'];
+				unset($a_fields['StoreQty']);
+				unset($a_fields['eBayQty']);
+				unset($a_fields['StoreAmount']);
+				unset($a_fields['eBayAmount']);
+				unset($a_fields['StoreProfit']);
+				unset($a_fields['eBayProfit']);
+			}
+
+
+			$new_options['VirtualFields'] = array_merge($rep_options['VirtualFields'], Array (
+				'ProductName' => Array ('type' => 'string', 'default' => ''),
+	            'Metric' => Array (
+	            	'type' => 'int',
+	            	'formatter' => 'kOptionsFormatter',
+	            	'options' => $this->GetMetricOptions($new_options, 'ProductName'),
+	            	'use_phrases' => 1,
+	            	'default' => 0
+	            ),
+			));
+
+			$lang = $this->Application->GetVar('m_lang');
+
+			$new_options['CalculatedFields'][''] = Array (
+				'ProductName' => 'p.l'.$lang.'_Name',
+			);
+		}
+		elseif ($field_values['ReportType'] == 12) { // Overall
+
+			$new_options['ListSQLs'][''] =
+				'SELECT %1$s.* %2$s FROM %1$s';
+
+			$new_options['Fields']['Marketplace'] = Array (
+				'formatter' => 'kOptionsFormatter',
+				'options' => Array (
+					1 => 'la_OnlineStore',
+					2 => 'la_eBayMarketplace',
+				),
+				'use_phrases' => 1,
+				'default' => 1
+			);
+
+			$new_options['Grids']['Default'] = Array(
+				'Icons' => Array('default' => 'icon16_custom.gif'),
+				'Fields' => Array(
+					'Marketplace' => Array ('title' => 'la_col_Marketplace', 'filter_block' => 'grid_options_filter'),
+					'Qty' => Array ('title' => 'la_col_Qty', 'td_style' => 'text-align: center', 'total' => 'sum', 'filter_block' => 'grid_range_filter'),
+					'Cost' => Array ('title' => 'la_col_Cost', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
+					'Amount' => Array ('title' => 'la_col_GMV', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
+					'Tax' => Array ('title' => 'la_col_Tax', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
+					'Shipping' => Array ('title' => 'la_col_Shipping', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
+					'Processing' => Array ('title' => 'la_col_Processing', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
+					'Profit' => Array ('title' => 'la_col_Profit', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
+				),
+
+			);
+
+
+			$new_options['VirtualFields'] = array_merge($rep_options['VirtualFields'], array(
+	            'Metric' => Array (
+	            	'type' => 'int',
+	            	'formatter' => 'kOptionsFormatter',
+	            	'options' => $this->GetMetricOptions($new_options, 'Marketplace'),
+	            	'use_phrases' => 1,
+	            	'default' => 0
+	            ),
+			));
+
+			$lang = $this->Application->GetVar('m_lang');
+
+		}
+
+		$new_options['ListSortings'] = Array(
+			'' => Array(
+				'Sorting' => Array('Amount' => 'desc'),
+			)
+		);
+
+		foreach ($new_options as $key => $val) {
+			$this->Application->setUnitOption('rep', $key, $val);
+		}
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kdbItem $object
+	 * @param string $search_field
+	 * @param string $value
+	 * @param string $type
+	 */
+	function processRangeField(&$object, $search_field, $type)
+	{
+		$value = $object->GetField($search_field);
+		if (!$value) return false;
+
+		$lang_current =& $this->Application->recallObject('lang.current');
+		$dt_separator = getArrayValue($object->GetFieldOptions($search_field), 'date_time_separator');
+		if (!$dt_separator) {
+			$dt_separator = ' ';
+		}
+
+		$time = ($type == 'from') ? adodb_mktime(0, 0, 0) : adodb_mktime(23, 59, 59);
+		$time = adodb_date($lang_current->GetDBField('InputTimeFormat'), $time);
+
+		$full_value = $value.$dt_separator.$time;
+
+		$formatter =& $this->Application->recallObject($object->Fields[$search_field]['formatter']);
+
+		$value_ts = $formatter->Parse($full_value, $search_field, $object);
+		$pseudo = getArrayValue($object->FieldErrors, $search_field, 'pseudo');
+		if ($pseudo) {
+			unset($object->FieldErrors[$search_field]); // remove error!
+			// invalid format -> ignore this date in search
+			return false;
+		}
+		return $value_ts;
+	}
+
+	/**
+	 * Generate Metric Field Options
+	 *
+	 * @param array $a_config_options
+	 * @param string $exclude_field
+	 */
+	function GetMetricOptions(&$a_config_options, $exclude_field)
+	{
+		$a_ret = Array();
+		foreach ($a_config_options['Grids']['Default']['Fields'] AS $field => $a_options)
+		{
+			if ($field == $exclude_field)
+			{
+				continue;
+			}
+			$a_ret[$field] = $a_options['title'];
+		}
+		return $a_ret;
+	}
+
+	function OnChangeStatistics(&$event)
+	{
+		$this->Application->StoreVar('ChartMetric', $this->Application->GetVar('metric'));
+	}
+
+	function OnPieChart(&$event)
+	{
+
+		$ChartHelper =& $this->Application->RecallObject('ChartHelper');
+
+		header("Content-type: image/png");
+
+		$width = $event->getEventParam('width');
+		if ($width == 0)
+		{
+			$width = 800;
+		}
+
+		$height = $event->getEventParam('height');
+		if ($height == 0)
+		{
+			$height = 600;
+		}
+
+		$a_data = unserialize($this->Application->RecallVar('graph_data'));
+		$chart = new LibchartPieChart($width, $height);
+
+		$dataSet = new LibchartXYDataSet();
+		foreach ($a_data AS $key=>$a_values)
+		{
+			$dataSet->addPoint(new LibchartPoint($a_values['Name'], $a_values['Metric']));
+//			$dataSet->addPoint(new LibchartPoint($a_values['Name'].' ('.$a_values['Metric'].')', $a_values['Metric']));
+		}
+
+		$chart->setDataSet($dataSet);
+
+		$chart->setTitle($this->Application->RecallVar('graph_metric'));
+		$chart->render();
+		$event->status = erSTOP;
+	}
+
+	/** Generates png-chart output
+	 *
+	 * @param kEvent $event
+	 */
+
+	function OnPrintChart(&$event)
+	{
+		$ChartHelper =& $this->Application->RecallObject('ChartHelper');
+
+		header("Content-type: image/png");
+
+		$width = $this->Application->GetVar('width');
+		if ($width == 0)
+		{
+			$width = 800;
+		}
+
+		$height = $this->Application->GetVar('height');
+		if ($height == 0)
+		{
+			$height = 400;
+		}
+
+		$chart = new LibchartLineChart($width, $height);
+
+		$a_labels = unserialize($this->Application->RecallVar('graph_labels'));
+
+		if ($this->Application->isModuleEnabled('in-auction'))
+		{
+			$serie1 = new LibchartXYDataSet();
+			$a_serie = unserialize($this->Application->RecallVar('graph_serie1'));
+			foreach ($a_labels AS $key=>$value)
+			{
+				$serie1->addPoint(new LibchartPoint($value, $a_serie[$key]));
+			}
+		}
+
+		$serie2 = new LibchartXYDataSet();
+		$a_serie = unserialize($this->Application->RecallVar('graph_serie2'));
+		foreach ($a_labels AS $key=>$value)
+		{
+			$serie2->addPoint(new LibchartPoint($value, $a_serie[$key]));
+		}
+
+		$dataSet = new LibchartXYSeriesDataSet();
+		if ($this->Application->isModuleEnabled('in-auction'))
+		{
+			$dataSet->addSerie($this->Application->RecallVar('graph_serie1_label'), $serie1);
+		}
+
+		$dataSet->addSerie($this->Application->RecallVar('graph_serie2_label'), $serie2);
+
+		$chart->setDataSet($dataSet);
+
+		$chart->setTitle($this->Application->RecallVar('graph_metric'));
+		$Plot =& $chart->getPlot();
+		$Plot->setGraphCaptionRatio(0.7);
+		$chart->render();
+
+		$event->status = erSTOP;
+
+	}
+
+	function OnExportReport(&$event)
+	{
+		$report =& $this->Application->recallObject($event->getPrefixSpecial(),'rep_List',Array('skip_counting'=>true,'per_page'=>-1) );
+		/* @var $report kDBList*/
+		$ReportItem =& $this->Application->recallObject('rep.item', 'rep', Array('skip_autoload' => true));
+		/* @var $ReportItem kDBItem*/
+ 		$a_grids = $this->Application->getUnitOption('rep', 'Grids');
+ 		$a_fields = $a_grids['Default']['Fields'];
+		$ret = '';
+
+		foreach ($a_fields AS $field => $a_props)
+		{
+			$ret .= '<commas>'.$field.'<commas><tab>';
+		}
+
+		$ret = substr($ret, 0, strlen($ret) - 5).'<cr>';
+
+
+		$report->Query(true);
+		$report->GoFirst();
+
+		$counter = 0;
+		$a_totals = Array();
+
+		foreach ($a_fields AS $field => $a_props)
+		{
+			$counter++;
+			if ($counter == 1)
+			{
+				continue;
+			}
+			$a_totals[$field] = 0;
+		}
+
+		foreach($report->Records as $a_row)
+		{
+//			echo '<pre>';
+//			print_r($a_row);
+//			print_r($ReportItem->FieldValues);
+			$ReportItem->SetFieldsFromHash($a_row);
+//			echo '2222222222';
+			$row = '';
+			foreach ($a_fields AS $field => $a_props)
+			{
+				$row .= '<commas>'.$ReportItem->GetField($field).'<commas><tab>';
+				$a_totals[$field] += $a_row[$field];
+			}
+			$ret .= substr($row, 0, strlen($row) - 5).'<cr>';
+		}
+		// totals
+		$ReportItem->SetFieldsFromHash($a_totals);
+		$counter = 0;
+		foreach ($a_fields AS $field => $a_props)
+		{
+			$counter++;
+			if ($counter == 1)
+			{
+				$row = '<commas><commas><tab>';
+				continue;
+			}
+			$row .= '<commas>'.$ReportItem->GetField($field).'<commas><tab>';
+		}
+		$ret .= substr($row, 0, strlen($row) - 5).'<cr>';
+
+		$ret = str_replace("\r",'', $ret);
+		$ret = str_replace("\n",'', $ret);
+		$ret = str_replace('"','\'\'', $ret);
+
+		$ret = str_replace('<commas>','"', $ret);
+		$ret = str_replace('<tab>',',', $ret);
+		$ret = str_replace('<cr>',"\r", $ret);
+
+		$report_options = unserialize($this->Application->RecallVar('report_options'));
+
+		switch ($report_options['ReportType'])
+		{
+			case 1:
+				$file_name = '-ByCategory';
+				break;
+			case 2:
+				$file_name = '-ByUser';
+				break;
+			case 5:
+				$file_name = '-ByProduct';
+				break;
+			case 12:
+				$file_name = '';
+				break;
+		}
+
+
+
+		header("Content-type: application/txt");
+		header("Content-length: ".(string)strlen($ret));
+		header("Content-Disposition: attachment; filename=\"".html_entity_decode('SalesReport'.$file_name.'-'.date('d-M-Y').'.csv')."\"");
+		header("Pragma: no-cache"); //some IE-fixing stuff
+		echo $ret;
+		exit();
+
+	}
+
+}
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/reports/reports_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.4.3
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/reports/reports_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/reports/reports_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/reports/reports_config.php	(revision 12131)
@@ -0,0 +1,135 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+$config	=	Array(
+					'Prefix'			=>	'rep',
+					'ItemClass'			=>	Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'ReportsEventHandler','file'=>'reports_event_handler.php','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'ReportsTagProcessor','file'=>'reports_tag_processor.php','build_event'=>'OnBuild'),
+					'AutoLoad'			=>	true,
+
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'page',
+												3	=>	'event',
+												4 =>	'mode', // 't' for temp '' for normal
+											),
+
+					'Hooks' => Array(
+						Array(
+							'Mode' => hAFTER,
+							'Conditional' => false,
+							'HookToPrefix' => 'rep',
+							'HookToSpecial' => '*',
+							'HookToEvent' => Array('OnAfterConfigRead'),
+							'DoPrefix' => '',
+							'DoSpecial' => '',
+							'DoEvent' => 'OnUpdateConfig',
+						),
+					),
+
+					'IDField' => 'CategoryId',
+
+					'TitlePresets'		=>	Array(
+												'default'	=>	Array(	'new_status_labels'		=> Array('d'=>'!la_title_Adding_Discount!'),
+																		'edit_status_labels'	=> Array('d'=>'!la_title_Editing_Discount!'),
+																		'new_titlefield'		=> Array('d'=>'!la_title_New_Discount!'),
+																),
+
+												'report_options'=>Array('format'				=>	"!la_title_ReportOptions!"),
+												'report_results'=>Array('format'				=>	"!la_title_ReportResults!"),
+												'report_chart'=>Array('format'				=>	"!la_title_SalesReportChart!"),
+													),
+
+					'PermSection'		=>	Array('main' => 'in-commerce:reports'),
+
+					'Sections'			=>	Array(
+						'in-commerce:reports'	=>	Array(
+							'parent'		=>	'in-commerce',
+							'icon'			=>	'in-commerce:summary_logs',
+							'label'			=>	'la_tab_SaleReports',
+							'url'			=>	Array('t' => 'in-commerce/reports/reports', 'pass' => 'm,rep', 'rep_event'=>'OnNew'),
+							'permissions'	=>	Array('view', 'add'),
+							'priority'		=>	3,
+							'type'			=>	stTREE,
+						),
+					),
+
+					'FilterMenu'		=>	Array(
+												'Groups' => Array(
+													Array('mode' => 'AND', 'filters' => Array(0,1,2), 'type' => WHERE_FILTER),
+													Array('mode' => 'AND', 'filters' => Array(4,5,6), 'type' => WHERE_FILTER),
+												),
+												'Filters' => Array(
+													0	=>	Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => 'Status != 1' ),
+													1	=>	Array('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => 'Status != 2'  ),
+													2	=>	Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => 'Status != 0'  ),
+													3	=>	Array(),
+													4	=>	Array('label' => 'la_Flat', 'on_sql' => '', 'off_sql' => 'Type != 1'  ),
+													5	=>	Array('label' => 'la_Percent', 'on_sql' => '', 'off_sql' => 'Type != 2'  ),
+													6	=>	Array('label' => 'la_FreeShipping', 'on_sql' => '', 'off_sql' => 'Type != 3'  ),
+												)
+											),
+
+					'ListSQLs'			=>	Array(	''=>'SELECT %1$s.* %2$s FROM %1$s',
+																		), // key - special, value - list select sql
+					'ItemSQLs'			=>	Array(	''=>'SELECT * FROM %1$s',
+																		),
+
+					'ListSortings'	=> 	Array(
+																'' => Array(
+																	'Sorting' => Array('Name' => 'asc'),
+																)
+															),
+
+					'CalculatedFields' => Array (
+						'' => Array (
+							'CategoryId' => '0',
+						),
+					),
+
+					'Fields'			=>	Array(
+
+											),
+					'VirtualFields'			=>	Array(
+						'ReportType' => array('formatter'=>'kOptionsFormatter','options'=>array(
+								12 => 'la_Overall',
+								1 => 'la_ByCategory',
+								2 => 'la_ByUser',
+								5 => 'la_byProduct'
+							),'use_phrases'=>1,'default'=>12
+						),
+						'FromDateTime'	=>	Array('formatter'=>'kDateFormatter','default'=>'','filter_type'=>'range_from','filter_field'=>'OrderDate' ),
+						'ToDateTime'	=>	Array('formatter'=>'kDateFormatter','default'=>'','filter_type'=>'range_to','filter_field'=>'OrderDate', 'empty_time' => adodb_mktime(23,59,59) ),
+						'Recursive' => array('default'=>1),
+						'SkipEmpty' => array('default'=>1),
+						'CategoryId' => Array ('type' => 'int', 'default' => 0),
+					),
+					'Grids'	=> Array(
+								'Default'		=>	Array(
+															'Icons' => Array('default'=>'icon16_custom.gif',1=>'icon16_discount.gif',2=>'icon16_discount_pending.gif',0=>'icon16_discount_disabled.gif'),
+															'Fields' => Array(
+																			'Name' => Array( 'title'=>'la_col_Name', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+																			'Start' => Array( 'title'=>'la_col_Start', 'filter_block' => 'grid_date_range_filter'),
+																			'End' => Array( 'title'=>'la_col_End', 'filter_block' => 'grid_date_range_filter'),
+																			'GroupId' => Array( 'title'=>'la_col_Group', 'filter_block' => 'grid_options_filter'),
+																			'Type' => Array( 'title'=>'la_col_Type', 'filter_block' => 'grid_options_filter'),
+																			'Amount' => Array( 'title'=>'la_col_Amount', 'filter_block' => 'grid_float_range_filter'),
+																		),
+
+													),
+								),
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/reports/reports_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.4.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/reports/reports_tag_processor.php
===================================================================
--- branches/5.1.x/in-commerce/units/reports/reports_tag_processor.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/reports/reports_tag_processor.php	(revision 12131)
@@ -0,0 +1,441 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class ReportsTagProcessor extends kDBTagProcessor {
+
+	function ReportStatus($params)
+	{
+		$field_values = $this->CalcReport($params);
+
+		if ($field_values['offset'] == $field_values['total']) {
+			$this->Application->Redirect($this->Application->RecallVar('reports_finish_t'));
+			$this->Application->RemoveVar('report_options');
+		}
+		else {
+			$this->Application->StoreVar('report_options', serialize($field_values));
+		}
+
+		return $field_values['offset']  * 100 / $field_values['total'];
+	}
+
+	function CalcReport($params)
+	{
+		$field_values = unserialize($this->Application->RecallVar('report_options'));
+		$per_step = 20;
+
+		$cats = $this->Conn->Query('SELECT * FROM '.TABLE_PREFIX.'Category ORDER BY CategoryId LIMIT '.$field_values['offset'].', '.$per_step);
+
+		foreach ($cats as $a_cat) {
+			if ($field_values['Recursive']) {
+				$cat_filter = 'c.ParentPath LIKE '.$this->Conn->qstr($a_cat['ParentPath'].'%');
+			}
+			else {
+				$cat_filter = 'c.CategoryId = '.$a_cat['CategoryId'];
+			}
+
+			$q = 'INSERT INTO '.$field_values['table_name'].'
+						SELECT
+							c.CategoryId,
+							SUM(od.Quantity) as Qty,
+							SUM(od.Cost) as Cost,
+							SUM(od.Price) as SaleAmount,
+							0 as Tax,
+							0 as Shipping,
+							0 as Processing,
+							SUM(od.Price - od.Cost) as Profit
+						FROM '.TABLE_PREFIX.'Orders AS o
+						LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
+						ON od.OrderId = o.OrderId
+						LEFT JOIN '.TABLE_PREFIX.'Products AS p
+						ON p.ProductId = od.ProductId
+						LEFT JOIN '.TABLE_PREFIX.'CategoryItems AS ci
+						ON ci.ItemResourceId = p.ResourceId
+						LEFT JOIN '.TABLE_PREFIX.'Category AS c
+						ON c.CategoryId = ci.CategoryId
+						WHERE
+							o.Status = 4
+							AND
+							ci.PrimaryCat = 1
+							AND
+							'.$cat_filter.'
+						GROUP BY c.CategoryId';
+			$this->Conn->Query($q);
+
+			$field_values['offset']++;
+		}
+
+		return $field_values;
+	}
+
+	function ReportTypeEquals($params)
+	{
+		$field_values = unserialize($this->Application->RecallVar('report_options'));
+		return ($field_values['ReportType'] == $params['value']);
+	}
+
+	function CalculateChart($params)
+	{
+
+		$a_report_options = unserialize($this->Application->RecallVar('report_options'));
+		$metric = $this->Application->RecallVar('ChartMetric');
+		if ($metric == '')
+		{
+			// get first option from unit config
+			$a_virtual_fields = $this->Application->getUnitOption('rep', 'VirtualFields');
+			foreach ($a_virtual_fields['Metric']['options'] AS $field => $label)
+			{
+				$metric = $field;
+				break;
+			}
+		}
+
+
+		$object =& $this->Application->recallObject('rep.params', null, Array('skip_autoload' => true));
+		$object->ID = 1;
+		$object->SetDBField('Metric', $metric);
+
+//		echo '<pre>';
+//		print_r($a_report_options);
+//		echo date('m/d/Y H:i:s', $a_report_options['from']).'<br>';
+//		echo date('m/d/Y H:i:s', $a_report_options['to']).'<br>';
+
+		if (!($a_report_options['from'] && $a_report_options['to'])) {
+			// calculate from & to as extreme order dates
+			$sql = 'SELECT MAX(OrderDate) AS date_to, MIN(OrderDate) AS date_frm
+				FROM '.TABLE_PREFIX.'Orders
+				WHERE
+					Status IN (4,6)
+			';
+			$a_dates = $this->Conn->GetRow($sql);
+			$a_report_options['from'] = adodb_mktime(0, 0, 0, date('m', $a_dates['date_frm']), date('d', $a_dates['date_frm']), date('Y', $a_dates['date_frm']));
+			$a_report_options['to'] = adodb_mktime(0, 0, 0, date('m', $a_dates['date_to']), date('d', $a_dates['date_to']) + 1, date('Y', $a_dates['date_to'])) - 1;
+		}
+
+		$filter_value = 'AND o.OrderDate >= '.$a_report_options['from'].' AND o.OrderDate <= '.$a_report_options['to'];
+
+
+		if ($a_report_options['ReportType'] == 12)
+		{
+			// Overall
+
+			$selected_days = round(($a_report_options['to'] - $a_report_options['from'] + 1) / 3600 / 24);
+			// determine date interval
+			if ($selected_days < 2)
+			{
+				$step_seconds = 3600;
+				$step_labels = Array();
+				for ($i=0; $i<24; $i++)
+				{
+					$hour = str_pad($i, 2, '0', STR_PAD_LEFT);
+					$step_labels[$i] = $hour;
+				}
+			} elseif (
+				($selected_days < 31)
+				|| (date('mY', $a_report_options['from']) == date('mY', $a_report_options['to']))
+			)
+			{
+				$step_seconds = 24*3600;
+				$step_labels = Array();
+				$curr_date = $a_report_options['from'];
+				while ($curr_date <= $a_report_options['to'])
+				{
+					$curr_date += $step_seconds;
+					$step_labels[] = date('d-M', $curr_date);
+				}
+			} else {
+				$start_year = date('Y', $a_report_options['from']);
+				$start_month = date('m', $a_report_options['from']);
+				$end_month_year = date('Ym', $a_report_options['to']);
+				// big interval - move from date to the first day ot the month
+				$a_report_options['from'] = adodb_mktime(0, 0, 0, date('m', $a_report_options['from']), 1, date('Y', $a_report_options['from']));
+				$curr_time = $a_report_options['from'];
+				while (date('Ym', $curr_time) <= $end_month_year)
+				{
+					$step_labels[date('Ym', $curr_time)] = date('M-Y', $curr_time);
+					// add month
+					$curr_time = adodb_mktime(0,0,0, date('m', $curr_time) + 1, 1, date('Y', $curr_time));
+				}
+				$step_seconds = 0;
+			}
+
+			$a_expressions = Array(
+				'Qty' => 'od.Quantity',
+				'Cost' => 'od.Cost * od.Quantity',
+				'Amount' => 'od.Price * od.Quantity',
+				'Tax' => 'o.VAT * od.Price * od.Quantity / o.SubTotal',
+				'Shipping' => 'o.ShippingCost * od.Price * od.Quantity / o.SubTotal',
+				'Processing' => 'o.ProcessingFee * od.Price * od.Quantity / o.SubTotal',
+				'Profit' => '(od.Price - od.Cost)  * od.Quantity',
+			);
+
+			if ($step_seconds)
+			{
+				$period_sql = 'FLOOR(
+								(o.OrderDate - '.$a_report_options['from'].')
+								/'.$step_seconds.'
+							)';
+			} else {
+				$period_sql = 'CONCAT(YEAR(FROM_UNIXTIME(o.OrderDate)),LPAD(MONTH(FROM_UNIXTIME(o.OrderDate)), 2, \'0\'))';
+			}
+
+			if ($this->Application->isModuleEnabled('in-auction'))
+			{
+				$sql = 'SELECT
+							'.$period_sql.' AS Period,
+							SUM(IF(ISNULL(eod.OptionsSalt), '.$a_expressions[$metric].', 0)) as StoreMetric,
+							SUM(IF(ISNULL(eod.OptionsSalt), 0, '.$a_expressions[$metric].')) as eBayMetric
+					FROM '.TABLE_PREFIX.'Orders AS o
+					LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
+					ON od.OrderId = o.OrderId
+					LEFT JOIN '.TABLE_PREFIX.'eBayOrderItems AS eod
+					ON od.OptionsSalt = eod.OptionsSalt
+					WHERE
+						o.Status IN (4,6)
+						'.$filter_value.'
+						GROUP BY Period';
+			} else 	{
+
+				$sql = 'SELECT
+							'.$period_sql.' AS Period,
+							SUM('.$a_expressions[$metric].') as StoreMetric,
+							0 as eBayMetric
+					FROM '.TABLE_PREFIX.'Orders AS o
+					LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
+					ON od.OrderId = o.OrderId
+					WHERE
+						o.Status IN (4,6)
+						'.$filter_value.'
+						GROUP BY Period';
+
+			}
+
+			$a_data = $this->Conn->Query($sql, 'Period');
+
+			// create series array
+			$a_serie1 = Array();
+			$a_serie2 = Array();
+			foreach ($step_labels AS $key => $label)
+			{
+				$a_serie1[$key] = (isset($a_data[$key]['eBayMetric']) && !is_null($a_data[$key]['eBayMetric'])) ? $a_data[$key]['eBayMetric'] : 0;
+				$a_serie2[$key] = (isset($a_data[$key]['StoreMetric']) && !is_null($a_data[$key]['StoreMetric'])) ? $a_data[$key]['StoreMetric'] : 0;
+			}
+
+			$show_date_from = date('m/d/Y', $a_report_options['from']);
+			$show_date_to = date('m/d/Y', $a_report_options['to']);
+			$show_date = ($show_date_from == $show_date_to) ? $show_date_to : $show_date_from.' - '.$show_date_to;
+
+			$this->Application->StoreVar('graph_metric', $object->GetField('Metric').' :: ('.$show_date.') :: '.DOMAIN);
+			$this->Application->StoreVar('graph_serie1', serialize($a_serie1));
+			$this->Application->StoreVar('graph_serie2', serialize($a_serie2));
+
+			$this->Application->StoreVar('graph_serie1_label', $this->Application->Phrase('la_eBayMarketplace'));
+			$this->Application->StoreVar('graph_serie2_label', $this->Application->Phrase('la_OnlineStore'));
+			$this->Application->StoreVar('graph_labels', serialize($step_labels));
+
+			return;
+
+		}
+
+
+		$ebay_joins = '';
+		if ($this->Application->isModuleEnabled('in-auction'))
+		{
+			$ebay_joins = '
+				LEFT JOIN '.TABLE_PREFIX.'eBayOrderItems AS eod
+				ON od.OptionsSalt = eod.OptionsSalt
+			';
+		}
+
+		if ($a_report_options['ReportType'] == 1)
+		{
+			// pie chart by category
+
+			$a_expressions = Array(
+				'Qty' => 'od.Quantity',
+				'Cost' => 'od.Cost * od.Quantity',
+				'Amount' => 'od.Price * od.Quantity',
+				'Tax' => 'o.VAT * od.Price * od.Quantity / o.SubTotal',
+				'Shipping' => 'o.ShippingCost * od.Price * od.Quantity / o.SubTotal',
+				'Processing' => 'o.ProcessingFee * od.Price * od.Quantity / o.SubTotal',
+				'Profit' => '(od.Price - od.Cost)  * od.Quantity',
+				'StoreQty' => 'IF(ISNULL(eod.OptionsSalt), od.Quantity, 0)',
+				'eBayQty' => 'IF(ISNULL(eod.OptionsSalt), 0, od.Quantity)',
+				'StoreAmount' => 'IF(ISNULL(eod.OptionsSalt), od.Price * od.Quantity, 0)',
+				'eBayAmount' => 'IF(ISNULL(eod.OptionsSalt), 0, od.Price * od.Quantity)',
+				'StoreProfit' => 'IF(ISNULL(eod.OptionsSalt), (od.Price - od.Cost) * od.Quantity, 0)',
+				'eBayProfit' => 'IF(ISNULL(eod.OptionsSalt), 0, (od.Price - od.Cost) * od.Quantity)',
+			);
+
+			$lang = $this->Application->GetVar('m_lang');
+
+			$sql = 'SELECT
+						LEFT(c.l'.$lang.'_Name, 60) AS Name,
+						c.CategoryId,
+						SUM('.$a_expressions[$metric].') as Metric
+				FROM '.TABLE_PREFIX.'Orders AS o
+				LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
+				ON od.OrderId = o.OrderId
+				LEFT JOIN '.TABLE_PREFIX.'Products AS p
+				ON p.ProductId = od.ProductId
+				LEFT JOIN '.TABLE_PREFIX.'CategoryItems AS ci
+				ON ci.ItemResourceId = p.ResourceId
+				LEFT JOIN '.TABLE_PREFIX.'Category AS c
+				ON c.CategoryId = ci.CategoryId
+				'.$ebay_joins.'
+				WHERE
+					o.Status IN (4,6)
+					'.$filter_value.'
+				GROUP BY c.CategoryId
+				HAVING NOT ISNULL(CategoryId)
+				ORDER BY Metric DESC
+				LIMIT 0,8
+				';
+			$a_data = $this->Conn->Query($sql, 'CategoryId');
+
+			$other_metric = 0;
+			if (count($a_data) > 7)
+			{
+				// gather ids for "others" call
+				$ids = join(',', array_keys($a_data));
+				$sql = 'SELECT
+							SUM('.$a_expressions[$metric].')
+					FROM '.TABLE_PREFIX.'Orders AS o
+					LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
+					ON od.OrderId = o.OrderId
+					LEFT JOIN '.TABLE_PREFIX.'Products AS p
+					ON p.ProductId = od.ProductId
+					LEFT JOIN '.TABLE_PREFIX.'CategoryItems AS ci
+					ON ci.ItemResourceId = p.ResourceId
+					LEFT JOIN '.TABLE_PREFIX.'Category AS c
+					ON c.CategoryId = ci.CategoryId
+					'.$ebay_joins.'
+					WHERE
+						o.Status IN (4,6)
+						'.$filter_value.'
+						AND c.CategoryId NOT IN ('.$ids.')
+					';
+				$other_metric = $this->Conn->GetOne($sql);
+				if ($other_metric != 0)
+				{
+					$a_data[0] = Array(
+						'Metric' => $other_metric,
+						'Name' => $this->Application->Phrase('la_Others'),
+					);
+				}
+			}
+
+
+			$show_date_from = date('m/d/Y', $a_report_options['from']);
+			$show_date_to = date('m/d/Y', $a_report_options['to']);
+			$show_date = ($show_date_from == $show_date_to) ? $show_date_to : $show_date_from.' - '.$show_date_to;
+
+			$this->Application->StoreVar('graph_metric', $this->Application->Phrase('la_TopCategories_by').' '.$object->GetField('Metric').' :: ('.$show_date.') :: '.DOMAIN);
+			$this->Application->StoreVar('graph_data', serialize($a_data));
+			return;
+		}
+
+
+		if ($a_report_options['ReportType'] == 5)
+		{
+			// pie chart by product
+
+			$a_expressions = Array(
+				'Qty' => 'od.Quantity',
+				'Cost' => 'od.Cost * od.Quantity',
+				'Amount' => 'od.Price * od.Quantity',
+				'Tax' => 'o.VAT * od.Price * od.Quantity / o.SubTotal',
+				'Shipping' => 'o.ShippingCost * od.Price * od.Quantity / o.SubTotal',
+				'Processing' => 'o.ProcessingFee * od.Price * od.Quantity / o.SubTotal',
+				'Profit' => '(od.Price - od.Cost)  * od.Quantity',
+				'StoreQty' => 'IF(ISNULL(eod.OptionsSalt), od.Quantity, 0)',
+				'eBayQty' => 'IF(ISNULL(eod.OptionsSalt), 0, od.Quantity)',
+				'StoreAmount' => 'IF(ISNULL(eod.OptionsSalt), od.Price * od.Quantity, 0)',
+				'eBayAmount' => 'IF(ISNULL(eod.OptionsSalt), 0, od.Price * od.Quantity)',
+				'StoreProfit' => 'IF(ISNULL(eod.OptionsSalt), (od.Price - od.Cost) * od.Quantity, 0)',
+				'eBayProfit' => 'IF(ISNULL(eod.OptionsSalt), 0, (od.Price - od.Cost) * od.Quantity)',
+			);
+
+			$lang = $this->Application->GetVar('m_lang');
+
+			$sql = 'SELECT
+						LEFT(p.l'.$lang.'_Name, 60) AS Name,
+						p.ProductId,
+						SUM('.$a_expressions[$metric].') as Metric
+				FROM '.TABLE_PREFIX.'Orders AS o
+				LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
+				ON od.OrderId = o.OrderId
+				LEFT JOIN '.TABLE_PREFIX.'Products AS p
+				ON p.ProductId = od.ProductId
+				'.$ebay_joins.'
+				WHERE
+					o.Status IN (4,6)
+					'.$filter_value.'
+				GROUP BY p.ProductId
+				HAVING NOT ISNULL(ProductId)
+				ORDER BY Metric DESC
+				LIMIT 0,8
+				';
+			$a_data = $this->Conn->Query($sql, 'ProductId');
+
+			$other_metric = 0;
+			if (count($a_data) > 7)
+			{
+				// gather ids for "others" call
+				$ids = join(',', array_keys($a_data));
+				$sql = 'SELECT
+							SUM('.$a_expressions[$metric].')
+					FROM '.TABLE_PREFIX.'Orders AS o
+					LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
+					ON od.OrderId = o.OrderId
+					LEFT JOIN '.TABLE_PREFIX.'Products AS p
+					ON p.ProductId = od.ProductId
+					'.$ebay_joins.'
+					WHERE
+						o.Status IN (4,6)
+						'.$filter_value.'
+						AND p.ProductId NOT IN ('.$ids.')
+					';
+				$other_metric = $this->Conn->GetOne($sql);
+				if ($other_metric != 0)
+				{
+					$a_data[0] = Array(
+						'Metric' => $other_metric,
+						'Name' => $this->Application->Phrase('la_Others'),
+					);
+				}
+			}
+
+
+			$show_date_from = date('m/d/Y', $a_report_options['from']);
+			$show_date_to = date('m/d/Y', $a_report_options['to']);
+			$show_date = ($show_date_from == $show_date_to) ? $show_date_to : $show_date_from.' - '.$show_date_to;
+
+			$this->Application->StoreVar('graph_metric', $this->Application->Phrase('la_TopProducts_by').' '.$object->GetField('Metric').' :: ('.$show_date.') :: '.DOMAIN);
+			$this->Application->StoreVar('graph_data', serialize($a_data));
+		}
+
+	}
+
+
+	function GetRandom($params)
+	{
+		return rand(1,10000000);
+	}
+
+	function IsPHPxOrGreater($params)
+	{
+		$curver = explode(".", phpversion());
+		return ($curver[0] >= $params['version']);
+	}
+
+}
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/reports/reports_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.4.4
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/brackets/brackets_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/brackets/brackets_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/brackets/brackets_event_handler.php	(revision 12131)
@@ -0,0 +1,206 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class BracketsEventHandler extends kDBEventHandler {
+
+	/**
+	 * Allows to override standart permission mapping
+	 *
+	 */
+	function mapPermissions()
+	{
+		parent::mapPermissions();
+		$permissions = Array(
+								'OnMoreBrackets'	=>	Array('subitem' => 'add|edit'),
+								'OnInfinity'		=>	Array('subitem' => 'add|edit'),
+								'OnArrange'			=>	Array('subitem' => 'add|edit'),
+						);
+		$this->permMapping = array_merge($this->permMapping, $permissions);
+	}
+
+	function prepareObject(&$object, &$event)
+	{
+		if($this->Application->GetVar('s_id') === false)
+		{
+			return;
+		}
+
+		$shipping_object =& $this->Application->recallObject('s');
+		$lang_object =& $this->Application->recallObject('lang.current');
+
+		if($lang_object->GetDBField('UnitSystem') == 2 && $shipping_object->GetDBField('Type') == 1)
+		{
+			$fields = Array('Start', 'End');
+			$formatter =& $this->Application->recallObject('kUnitFormatter');
+			foreach($fields as $field)
+			{
+				$options = $object->GetFieldOptions($field);
+				$options['formatter'] = 'kUnitFormatter';
+				$object->SetFieldOptions($field, $options);
+				$formatter->prepareOptions($field, $options, $object);
+			}
+		}
+	}
+
+	function prepareBrackets(&$event)
+	{
+		$lang_object =& $this->Application->recallObject('lang.current');
+		$shipping_object =& $this->Application->recallObject('s');
+		if($lang_object->GetDBField('UnitSystem') != 2 || $shipping_object->GetDBField('Type') != 1)
+		{
+			return;
+		}
+
+		$item_info = $this->Application->GetVar( $event->Prefix_Special );
+		foreach($item_info as $id => $item_data)
+		{
+			if($item_info[$id]['Start_a'] === '' && $item_info[$id]['Start_b'] === '')
+			{
+				$item_info[$id]['Start'] = '';
+			}
+			else
+			{
+				$item_info[$id]['Start'] = Pounds2Kg($item_info[$id]['Start_a'], $item_info[$id]['Start_b']);
+			}
+
+			if($item_info[$id]['End_a'] == '&#8734;' || $item_info[$id]['End_a'] == '&infin;')
+			{
+				$item_info[$id]['End'] = '&#8734;';
+			}
+			elseif($item_info[$id]['End_a'] === '' && $item_info[$id]['End_b'] === '')
+			{
+				$item_info[$id]['End'] = '';
+			}
+			else
+			{
+				$item_info[$id]['End'] = Pounds2Kg($item_info[$id]['End_a'], $item_info[$id]['End_b']);
+			}
+		}
+		$this->Application->SetVar( $event->Prefix_Special, $item_info );
+	}
+
+	/**
+	 * Adds additional 5 empty brackets
+	 *
+	 * @param kEvent $event
+	 */
+	function OnMoreBrackets(&$event)
+	{
+		$shipping_object =& $this->Application->recallObject('s');
+		$default_start = ($shipping_object->GetDBField('Type') == 1) ? 0 : 1;
+
+		$this->prepareBrackets($event);
+
+		$event->redirect = false;
+
+		$brackets_helper =& $this->Application->recallObject('BracketsHelper');
+		$brackets_helper->InitHelper('Start', 'End', Array(), $default_start );
+		$brackets_helper->OnMoreBrackets($event);
+	}
+
+	/**
+	 * Arrange brackets
+	 *
+	 * @param kEvent $event
+	 */
+	function OnArrange(&$event)
+	{
+		$shipping_object =& $this->Application->recallObject('s');
+		$default_start = ($shipping_object->GetDBField('Type') == 1) ? 0 : 1;
+
+		$this->prepareBrackets($event);
+
+		$event->redirect = false;
+		$brackets_helper =& $this->Application->recallObject('BracketsHelper');
+		/* @var $brackets_helper kBracketsHelper */
+
+		$brackets_helper->InitHelper('Start', 'End', Array(), $default_start);
+
+		$brackets_helper->arrangeBrackets($event);
+		$event->CallSubEvent('OnPreSaveBrackets');
+	}
+
+	/**
+	 * Arrange infinity brackets
+	 *
+	 * @param kEvent $event
+	 */
+	function OnInfinity(&$event)
+	{
+		$shipping_object =& $this->Application->recallObject('s');
+		$default_start = ($shipping_object->GetDBField('Type') == 1) ? 0 : 1;
+
+		$this->prepareBrackets($event);
+
+		$event->redirect = false;
+		$brackets_helper =& $this->Application->recallObject('BracketsHelper');
+		$brackets_helper->InitHelper('Start', 'End', Array(), $default_start );
+		$brackets_helper->arrangeBrackets($event);
+
+		$event->CallSubEvent('OnPreSaveBrackets');
+
+		$brackets_helper->OnInfinity($event);
+
+		$event->CallSubEvent('OnPreSaveBrackets');
+	}
+
+	function OnBeforeItemUpdate(&$event)
+	{
+		$shipping_object =& $this->Application->recallObject('s');
+		$default_start = ($shipping_object->GetDBField('Type') == 1) ? 0 : 1;
+
+		$object =& $event->getObject();
+		$linked_info = $object->getLinkedInfo();
+		$object->SetDBField($linked_info['ParentTableKey'], $linked_info['ParentId']);
+
+		$brackets_helper =& $this->Application->recallObject('BracketsHelper');
+		$brackets_helper->InitHelper('Start', 'End', Array(), $default_start );
+		$brackets_helper->replaceInfinity($event);
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnPreSaveBrackets(&$event)
+	{
+		$lang_object =& $this->Application->recallObject('lang.current');
+		$shipping_object =& $this->Application->recallObject('s');
+		if($lang_object->GetDBField('UnitSystem') == 2 && $shipping_object->GetDBField('Type') == 1)
+		{
+			$item_info = $this->Application->GetVar( $event->Prefix_Special );
+			if(is_array($item_info))
+			{
+				foreach($item_info as $id => $values)
+				{
+					if($values['End'] == -1)
+					{
+						$item_info[$id]['End_a'] = -1 / POUND_TO_KG;
+						$item_info[$id]['End_b'] = 0;
+					}
+				}
+				$this->Application->SetVar( $event->Prefix_Special, $item_info );
+			}
+		}
+
+		$default_start = ($shipping_object->GetDBField('Type') == 1) ? 0 : 1;
+
+		$brackets_helper =& $this->Application->recallObject('BracketsHelper');
+		$brackets_helper->InitHelper('Start', 'End', Array(), $default_start );
+		$brackets_helper->OnPreSaveBrackets($event);
+	}
+
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/brackets/brackets_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.15.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/brackets/brackets_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/brackets/brackets_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/brackets/brackets_config.php	(revision 12131)
@@ -0,0 +1,60 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+$config	=	Array(
+					'Prefix'			=>	'br',
+					'ItemClass'			=>	Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'BracketsEventHandler','file'=>'brackets_event_handler.php','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'BracketsTagProcessor','file'=>'brackets_tag_processor.php','build_event'=>'OnBuild'),
+					'AutoLoad'			=>	true,
+					'Hooks'				=>	Array(
+												Array(
+													'Mode' => hBEFORE,
+													'Conditional' => true,
+													'HookToPrefix' => '#PARENT#',
+													'HookToSpecial' => '',
+													'HookToEvent' => Array('OnPreSave'),
+													'DoPrefix' => '',
+													'DoSpecial' => '',
+													'DoEvent' => 'OnArrange',
+												),
+											),
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'page',
+												3	=>	'event',
+											),
+					'IDField'			=>	'BracketId',
+					'TableName'			=>	TABLE_PREFIX.'ShippingBrackets',
+					'ForeignKey' 		=> 	'ShippingTypeID',
+					'ParentTableKey' 	=> 	'ShippingID',
+					'ParentPrefix' 		=>	's',
+					'AutoDelete'		=>	true,
+					'AutoClone'			=>	true,
+
+					'SubItems' =>	Array('sc'),
+
+					'ListSQLs'			=>	Array(	''=>	'SELECT * FROM %s'),
+																		 // key - special, value - list select sql
+					'ItemSQLs'			=>	Array(	''=>	'SELECT * FROM %s'),
+
+					'Fields' => Array (
+					    'BracketId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
+					    'ShippingTypeID' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
+					    'Start' => Array('type' => 'double', 'formatter'=>'kFormatter', 'not_null' => true, 'default' => 0),
+					    'End' => Array('type' => 'double', 'formatter'=>'kFormatter', 'not_null' => true, 'default' => 0),
+					),
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/brackets/brackets_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.12
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/brackets/globals.php
===================================================================
--- branches/5.1.x/in-commerce/units/brackets/globals.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/brackets/globals.php	(revision 12131)
@@ -0,0 +1,62 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+function bracket_comp($elem1, $elem2)
+{
+	if( ($elem1['End']>$elem2['End'] || $elem1['End'] == -1) && $elem2['End'] != -1 )
+	{
+		return 1;
+	}
+	elseif ( ($elem1['End']<$elem2['End'] || $elem2['End'] == -1) && $elem1['End'] != -1 )
+	{
+		return -1;
+	}
+	else 
+	{
+		return 0;
+	}
+}
+
+function bracket_id_sort($first_id, $second_id)
+{
+	$first_abs = abs($first_id);
+	$second_abs = abs($second_id);
+	$first_sign = ($first_id == 0) ? 0 : $first_id / $first_abs;
+	$second_sign = ($second_id == 0) ? 0 : $second_id / $second_abs;
+	if($first_sign != $second_sign)
+	{
+		if($first_id > $second_id) {
+			$bigger =& $first_abs;
+			$smaller =& $second_abs;
+		}
+		else {
+			$bigger =& $second_abs;
+			$smaller =& $first_abs;
+		}
+		$smaller = $bigger + $smaller;
+	}
+	
+	if($first_abs > $second_abs) {
+		return 1;
+	}
+	elseif ($first_abs < $second_abs)
+	{
+		return -1;
+	}
+	else 
+	{
+		return 0;
+	}
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/brackets/globals.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/brackets/brackets_tag_processor.php
===================================================================
--- branches/5.1.x/in-commerce/units/brackets/brackets_tag_processor.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/brackets/brackets_tag_processor.php	(revision 12131)
@@ -0,0 +1,198 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class BracketsTagProcessor extends kDBTagProcessor {
+
+	function Field($params)
+	{
+		$value = parent::Field($params);
+
+		if ( ($params['field'] == 'Start' || $params['name'] == 'End') && $value == -1) {
+			$value = '&#8734;';
+		}
+
+		return $value;
+	}
+
+	function ShowBracketsForm($params)
+	{
+		$shipping_object =& $this->Application->recallObject('s');
+		$default_start = ($shipping_object->GetDBField('Type') == 1) ? 0 : 1;
+
+		$brackets_helper =& $this->Application->recallObject('BracketsHelper');
+		/* @var $brackets_helper kBracketsHelper */
+
+		$brackets_helper->InitHelper('Start', 'End', Array(), $default_start );
+
+		$br_object =& $this->Application->recallObject( $this->getPrefixSpecial() );
+
+		$event = new kEvent($this->getPrefixSpecial(true) . ':OnArrange');
+		$br_data = $brackets_helper->getBrackets($event);
+		$linked_info = $br_object->getLinkedInfo($this->Special);
+
+		if (!$br_data) {
+			$sql = 	'SELECT * FROM '.$br_object->TableName.' WHERE '.$linked_info['ForeignKey'].' = '.$linked_info['ParentId'];
+			$brackets = $this->Conn->Query($sql, $br_object->IDField);
+
+			usort($brackets, Array(&$brackets_helper, 'compareBrackets'));
+
+			$dummy =& $this->Application->recallObject($this->Prefix.'.-dummy', null, array('skip_autoload' => true));
+			/* @var $dummy kDBItem */
+
+			// performs number formatting
+			foreach($brackets as $id => $values)
+			{
+				foreach($values as $value_key=>$value_val){
+					$dummy->SetDBField($value_key, $value_val);
+					$brackets[$id][$value_key] = $dummy->GetField($value_key);
+				}
+			}
+
+			$br_data = $brackets;
+			$brackets_helper->setBrackets($event, $brackets);
+		}
+		else {
+			usort($br_data, Array(&$brackets_helper, 'compareBrackets'));
+			$br_data = $brackets_helper->formatBrackets($br_data);
+		}
+
+		$ret = '';
+		if ( is_array($br_data) ) {
+			$block_params = $this->prepareTagParams($params);
+			$block_params['IdField'] = $br_object->IDField;
+			$block_params['name'] = $params['block'];
+			$first = true;
+
+			$main_object =& $this->Application->recallObject($linked_info['ParentPrefix'].'.'.$this->Special);
+//			$plan_type = $main_object->GetDBField('PlanType');
+//			$limits_format = ($plan_type == 2) ? '%d' : $br_object->Fields['Start']['format'];
+
+			// this is needed to find next id
+			$br_data_copy = $br_data;
+			foreach($br_data as $id => $values)
+			{
+
+				foreach($values as $value_key => $value_val)
+				{
+					$block_params[$value_key] = $value_val;
+				}
+				reset($values);
+
+				next($br_data_copy);
+				$next_bracket = current($br_data_copy);
+
+//				$values['Start'] = sprintf($limits_format, $values['Start']);
+//				$values['End'] = sprintf($limits_format, $values['End']);
+
+				$block_params['id']	= $values[$br_object->IDField];
+				$block_params['min'] = ($id == -1) ? ($values['Start'] ? $values['Start'] : 0) : $values['Start'];
+				$block_params['max'] = ($values['End'] == -1) ? '&#8734;' : $values['End'];
+				$block_params['next_min_id'] = $next_bracket[$br_object->IDField];
+
+				$lang_object =& $this->Application->recallObject('lang.current');
+				if($lang_object->GetDBField('UnitSystem') == 2 && $main_object->GetDBField('Type') == 1)
+				{
+					if($block_params['min'] === '')
+					{
+						$block_params['min_a'] = '';
+						$block_params['min_b'] = '';
+					}
+					else
+					{
+						list($block_params['min_a'], $block_params['min_b']) = Kg2Pounds($block_params['min']);
+					}
+
+					if($block_params['max'] == '&#8734;')
+					{
+						$block_params['max_a'] = '&#8734;';
+						$block_params['max_b'] = '';
+					}
+					else
+					{
+						list($block_params['max_a'], $block_params['max_b']) = Kg2Pounds($block_params['max']);
+					}
+				}
+
+				if($first)
+				{
+					$block_params['first'] = 1;
+					$first = false;
+				}
+				else
+				{
+					$block_params['first'] = 0;
+				}
+				$ret .= $this->Application->ParseBlock($block_params, 1);
+			}
+		}
+		return $ret;
+	}
+
+
+	/*function ShowBracketsForm($params)
+	{
+		$br_object =& $this->Application->recallObject( $this->getPrefixSpecial() );
+
+		$br_data = $this->Application->GetVar('br');
+
+		if(!$br_data)
+		{
+			$sql = 	'SELECT * FROM '.$br_object->TableName.
+					' WHERE ShippingTypeID = '.$this->Application->GetVar('s_id');
+			$brackets = $this->Conn->Query($sql, 'BracketId');
+			usort($brackets, 'bracket_comp');
+
+			$br_data = array_reverse($brackets);
+			$this->Application->SetVar('br', $br_data);
+		}
+		else
+		{
+			$br_data = array_reverse($br_data);
+		}
+
+		$ret = '';
+		if( is_array($br_data) )
+		{
+			$i = -count($br_data);
+			ksort($br_data);
+			foreach($br_data as $record)
+			{
+				$temp_sorted[$i] = $record;
+				$i++;
+			}
+			$br_data = array_reverse($temp_sorted, true);
+
+			$block_params['name'] = $params['block'];
+			$first = true;
+			foreach($br_data as $id => $values)
+			{
+				$block_params['id']	= $id;
+				$block_params['start']	= ($id == -1) ? ($values['Start'] ? $values['Start'] : 0) : $values['Start'];
+				$block_params['end'] = ($values['End'] == -1) ? '&infin;' : $values['End'];
+				if ($first)
+				{
+					$block_params['first'] = 1;
+					$first = false;
+				}
+				else
+				{
+					$block_params['first'] = 0;
+				}
+				$ret .= $this->Application->ParseBlock($block_params);
+			}
+		}
+		return $ret;
+	}*/
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/brackets/brackets_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.12.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/payment_type_currencies/payment_type_currencies_tag_processor.php
===================================================================
--- branches/5.1.x/in-commerce/units/payment_type_currencies/payment_type_currencies_tag_processor.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/payment_type_currencies/payment_type_currencies_tag_processor.php	(revision 12131)
@@ -0,0 +1,33 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class PaymentTypeCurrenciesTagProcessor extends kDBTagProcessor {
+
+	function CurrencySelected($params)
+	{
+		$object =& $this->Application->recallObject($this->Prefix);
+		$payment_type_object =& $this->Application->recallObject('pt');
+		$currency_object =& $this->Application->recallObject('curr.active');
+		
+		$pt_id = $payment_type_object->GetDBField('PaymentTypeId');
+		$curr_id = $currency_object->GetDBField('CurrencyId');
+		$sql = 'SELECT * FROM '.$object->TableName.'
+				WHERE PaymentTypeId='.$pt_id.' AND
+				CurrencyId='.$curr_id;
+		$res = $this->Conn->GetOne($sql);
+		return $res ? 1 : 0;
+	}
+	
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/payment_type_currencies/payment_type_currencies_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/payment_type_currencies/payment_type_currencies_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/payment_type_currencies/payment_type_currencies_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/payment_type_currencies/payment_type_currencies_event_handler.php	(revision 12131)
@@ -0,0 +1,64 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class PaymentTypeCurrenciesEventHandler extends kDBEventHandler {
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnCreate(&$event)
+	{
+		$currency_id_list = $this->Application->GetVar('currency_list');
+
+		if (!$currency_id_list) {
+			return ;
+		}
+
+		$object =& $event->getObject( Array('skip_autoload' => true) );
+		$pt_id = $this->Application->GetVar('pt_id');
+
+		if ($pt_id === false) {
+			return ;
+		}
+
+		$sql = 'DELETE FROM ' . $object->TableName . '
+				WHERE PaymentTypeId = ' . $pt_id;
+		$this->Conn->Query($sql);
+
+		foreach ($currency_id_list as $id) {
+			$object->SetDBField('CurrencyId', $id);
+			$object->SetDBField('PaymentTypeId', $pt_id);
+			$this->customProcessing($event, 'before');
+
+			if ( $object->Create() ) {
+				if ( $object->IsTempTable() ) {
+					$object->setTempID();
+				}
+
+				$this->customProcessing($event, 'after');
+				$event->status = erSUCCESS;
+			}
+			else {
+				$event->status = erFAIL;
+				$event->redirect = false;
+				$this->Application->SetVar($event->Prefix_Special . '_SaveEvent', 'OnCreate');
+				$object->setID(0);
+			}
+		}
+	}
+
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/payment_type_currencies/payment_type_currencies_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/payment_type_currencies/payment_type_currencies_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/payment_type_currencies/payment_type_currencies_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/payment_type_currencies/payment_type_currencies_config.php	(revision 12131)
@@ -0,0 +1,65 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+	
+$config	=	Array(
+					'Prefix'			=>	'ptc',
+					'ItemClass'			=>	Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'PaymentTypeCurrenciesEventHandler','file'=>'payment_type_currencies_event_handler.php','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'PaymentTypeCurrenciesTagProcessor','file'=>'payment_type_currencies_tag_processor.php','build_event'=>'OnBuild'),
+					'AutoLoad'			=>	true,
+					'hooks'				=>	Array(),
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'page',
+												3	=>	'event',
+												4	=>	'mode',
+											),
+											
+					'Hooks'	=>	Array( 
+												Array(
+													'Mode' => hBEFORE,
+													'Conditional' => false,
+													'HookToPrefix' => '#PARENT#',
+													'HookToSpecial' => '',
+													'HookToEvent' => Array( 'OnPreSaveAndGoToTab', 'OnPreSaveAndGo', 'OnPreSave' ),
+													'DoPrefix' => '',
+													'DoSpecial' => '',
+													'DoEvent' => 'OnCreate',
+												),
+									),
+					'IDField' 			=>	'PaymentTypeCurrencyId',
+					'TableName'			=>	TABLE_PREFIX.'PaymentTypeCurrencies',
+					'ParentTableKey'	=>	'PaymentTypeId',	// linked field in master table
+					'ForeignKey'		=>	'PaymentTypeId',	// linked field in subtable
+					'ParentPrefix' 		=> 	'pt',
+					'AutoDelete'		=>	true,
+										
+					'SubItems' =>	Array(),
+									
+					'ListSQLs'			=>	Array(	''=>	'SELECT * FROM %s'),
+																		 // key - special, value - list select sql
+					'ItemSQLs'			=>	Array(	''=>	'SELECT * FROM %s'),
+
+					'ListSortings'	=> 	Array(),	
+					'Fields' => Array
+							        (
+							            'PaymentTypeCurrencyId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+							            'PaymentTypeId' => Array('type' => 'int','not_null' => 1, 'default' => 0),
+							            'CurrencyId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+							        ),						    
+											
+					'Grids'	=> Array(),
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/payment_type_currencies/payment_type_currencies_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/files/files_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/files/files_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/files/files_event_handler.php	(revision 12131)
@@ -0,0 +1,154 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class FilesEventHandler extends kDBEventHandler {
+
+
+	/**
+	 * Get's special of main item for linking with subitem
+	 *
+	 * @param kEvent $event
+	 * @return string
+	 */
+	function getMainSpecial(&$event)
+	{
+		if ($event->Special == 'downl') {
+			return '';
+		}
+
+		return parent::getMainSpecial($event);
+	}
+
+
+	function SetCustomQuery(&$event)
+	{
+		$object =& $event->getObject();
+		switch ($event->Special)
+		{
+			case 'downl':
+				$object->addFilter('is_active', '%1$s.Status = 1');
+				break;
+		}
+	}
+
+	function prepareObject(&$object, &$event)
+	{
+		if($this->Application->GetVar('file_event') == 'OnNew' || $this->Application->GetVar('file_event') == 'OnCreate')
+		{
+			$options = $object->getFieldOptions('RealPath');
+			$options['required'] = 1;
+			$object->setFieldOptions('RealPath', $options);
+		}
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnBeforeItemUpdate(&$event)
+	{
+		$object =& $event->getObject();
+
+		if($object->GetDBField('IsPrimary'))
+		{
+			$parent_info = $object->getLinkedInfo($event->Special);
+			$sql = 'UPDATE '.$object->TableName.'
+					SET IsPrimary = 0
+					WHERE '.$parent_info['ForeignKey'].' = '.$parent_info['ParentId'];
+			$this->Conn->Query($sql);
+			$object->SetDBField('Status', 1);
+		}
+
+		if($object->GetDBField('Name') == '')
+		{
+			$object->SetDBField('Name', $object->GetDBField('FilePath'));
+		}
+	}
+
+	function OnBeforeItemCreate(&$event)
+	{
+		$this->OnBeforeItemUpdate($event);
+
+		$object =& $event->getObject();
+		$parent_info = $object->getLinkedInfo($event->Special);
+		$sql = 'SELECT FileId FROM '.$object->TableName.' WHERE IsPrimary = 1 AND '.$parent_info['ForeignKey'].' = '.$parent_info['ParentId'];
+		if( !$this->Conn->GetOne($sql) )
+		{
+			$object->SetDBField('IsPrimary', 1);
+			$object->SetDBField('Status', 1);
+		}
+		$object->SetDBField('AddedById', $this->Application->RecallVar('user_id'));
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnSetPrimary(&$event)
+	{
+		$ids = $this->StoreSelectedIDs($event);
+		$id = array_shift($ids);
+
+		$object =& $event->getObject( Array('skip_autoload' => true) );
+		$object->Load($id);
+
+		$object->SetDBField('IsPrimary', 1);
+		$object->Update();
+	}
+
+	/**
+	 * Deletes all selected items.
+	 * Automatically recurse into sub-items using temp handler, and deletes sub-items
+	 * by calling its Delete method if sub-item has AutoDelete set to true in its config file
+	 *
+	 * @param kEvent $event
+	 */
+	function OnMassDelete(&$event)
+	{
+		$event->status=erSUCCESS;
+
+		$temp =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
+
+		$ids = $this->StoreSelectedIDs($event);
+
+		$event->setEventParam('ids', $ids);
+		$this->customProcessing($event, 'before');
+		$ids = $event->getEventParam('ids');
+
+		$object =& $event->getObject();
+		$parent_info = $object->getLinkedInfo($event->Special);
+
+		$sql = 'SELECT FileId FROM '.$object->TableName.' WHERE IsPrimary = 1 AND '.$parent_info['ForeignKey'].' = '.$parent_info['ParentId'];
+		$primary = $this->Conn->GetOne($sql);
+		if( $primary && ($key = array_search($primary, $ids)) )
+		{
+			$sql = 'SELECT FileId FROM '.$object->TableName.' WHERE IsPrimary = 0 AND '.$parent_info['ForeignKey'].' = '.$parent_info['ParentId'];
+			$res = $this->Conn->Query($sql);
+			if($res)
+			{
+				unset($ids[$key]);
+			}
+		}
+
+		if($ids)
+		{
+			$temp->DeleteItems($event->Prefix, $event->Special, $ids);
+		}
+		$this->clearSelectedIDs($event);
+	}
+
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/files/files_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/files/files.php
===================================================================
--- branches/5.1.x/in-commerce/units/files/files.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/files/files.php	(revision 12131)
@@ -0,0 +1,29 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class FilesItem extends kDBItem  {
+
+	function Delete($id)
+	{
+		$this->Load($id);
+		$upload_dir = $this->Fields['FilePath']['upload_dir'];
+		$file_path = FULL_PATH.$upload_dir.$this->GetDBField('FilePath');
+		if(file_exists($file_path))
+		{
+			unlink($file_path);
+		}
+		return parent::Delete($id);
+	}
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/files/files.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/files/files_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/files/files_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/files/files_config.php	(revision 12131)
@@ -0,0 +1,115 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+$config	=	Array(
+					'Prefix'			=>	'file',
+					'ItemClass'			=>	Array('class'=>'FilesItem','file'=>'files.php','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'FilesEventHandler','file'=>'files_event_handler.php','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
+					'AutoLoad'			=>	true,
+					'AggregateTags' => Array(
+															Array(
+																'AggregateTo' => '#PARENT#',
+																'AggregatedTagName' => 'ListFiles',
+																'LocalTagName' => 'PrintList',
+																'LocalSpecial' => 'downl',
+															),
+													),
+					'Hooks'				=>	Array(
+												/*Array(
+													'Mode' => hBEFORE,
+													'Conditional' => true,
+													'HookToPrefix' => 'p',
+													'HookToSpecial' => '',
+													'HookToEvent' => Array( 'onPreSave' ),
+													'DoPrefix' => 'pr',
+													'DoSpecial' => 'tang',
+													'DoEvent' => 'OnArrange',
+												),*/
+											),
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'page',
+												3	=>	'event',
+											),
+					'StatusField'		=>	Array('Status', 'IsPrimary'),
+					'IDField'			=>	'FileId',
+					'TitleField'		=>	'Name',
+					'TableName'			=>	TABLE_PREFIX.'ProductFiles',
+					'ForeignKey'	=>	'ProductId',
+					'ParentTableKey' => 'ProductId',
+					'ParentPrefix' => 'p',
+					'AutoDelete'	=>	true,
+					'AutoClone'	=> true,
+
+					'ListSQLs'			=>	Array(	''=>'SELECT * FROM %s',
+																		), // key - special, value - list select sql
+					'ItemSQLs'			=>	Array(	''=>'SELECT * FROM %s',
+																		),
+					'FilterMenu'		=>	Array(
+												'Groups' => Array(
+													Array('mode' => 'AND', 'filters' => Array('show_active','show_disabled'), 'type' => WHERE_FILTER),
+												),
+												'Filters' => Array(
+													'show_active'	=>	Array('label' => 'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
+													'show_disabled'	=>	Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0'  ),
+												)
+											),
+					'ListSortings'	=> 	Array(
+																'' => Array(
+																	'ForcedSorting' => Array('IsPrimary' => 'desc','Priority' => 'desc'),
+																	'Sorting' => Array('AddedOn' => 'desc','Version' => 'desc'),
+																)
+															),
+					'Fields'			=>	Array(
+											    'FileId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
+									            'ProductId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
+									            'Name' => Array('type' => 'string','not_null' => '1','default' => ''),
+									            'Version' => Array('type' => 'string','not_null' => '1','default' => ''),
+									            'FilePath' => Array('type' => 'string','not_null' => '1','default' => ''),
+									            'RealPath' => Array('type' => 'string', 'not_null' => 1, 'formatter'=>'kUploadFormatter', 'skip_empty'=>1, 'default' => '', 'upload_dir' => ITEM_FILES_PATH, 'include_path' => 0, 'size_field' => 'Size', 'orig_name_field' => 'FilePath', 'content_type_field' => 'MIMEType', 'max_size' => 50000000,
+																		'error_msgs' 	=> Array(	'bad_file_format' 	=> '!la_error_InvalidFileFormat!',
+																									'bad_file_size' 	=> '!la_error_FileTooLarge!',
+																									'cant_save_file' 	=> '!la_error_cant_save_file!'
+																						)
+													    			),
+									            'Size' => Array('type' => 'int', 'formatter' => 'kFilesizeFormatter', 'not_null' => 1, 'default' => 0),
+									            'Status' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+									            'IsPrimary' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+									            'Priority' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+									            'AddedOn' => Array('type' => 'int','formatter' => 'kDateFormatter','not_null' => '1','default' => '#NOW#'),
+									            'AddedById' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+									            'MIMEType' => Array('type' => 'string','not_null' => '1','default' => ''),
+											),
+					'VirtualFields'	=> 	Array(
+													),
+
+					'Grids'	=> Array(
+
+								'Default'		=>	Array(
+																	'Icons' => Array('default'=>'icon16_custom.gif', '1_0' => 'icon16_file.gif', '1_1' => 'icon16_file_primary.gif', '0_0' => 'icon16_file_disabled.gif'),	// icons for each StatusField values, if no matches or no statusfield selected, then "default" icon is used
+																	'Fields' => Array(
+																			'FileId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'module' => 'In-Portal', 'filter_block' => 'grid_range_filter'),
+																			'Name' => Array( 'title'=>'la_col_FileName', 'data_block' => 'file_caption_td', 'filter_block' => 'grid_like_filter'),
+																			'FilePath' => Array( 'title'=>'la_col_FilePath', 'filter_block' => 'grid_like_filter'),
+																			'Version' => Array( 'title'=>'la_col_Version', 'filter_block' => 'grid_like_filter'),
+																			'Size' => Array( 'title'=>'la_col_Size', 'filter_block' => 'grid_float_range_filter'),
+																			'AddedOn' => Array( 'title'=>'la_col_AddedOn', 'format'=>'_regional_DateFormat', 'filter_block' => 'grid_date_range_filter'),
+																		),
+														),
+							),
+
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/files/files_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.12.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/destinations/destinations_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/destinations/destinations_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/destinations/destinations_config.php	(revision 12131)
@@ -0,0 +1,72 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+	
+$config	=	Array(
+					'Prefix'			=>	'dst',
+					'ItemClass'			=>	Array('class'=>'kDBItem','file'=>'images.php','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'DstEventHandler','file'=>'dst_event_handler.php','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
+					'AutoLoad'			=>	true,
+					'Hooks'				=>	Array( 
+							Array(
+								'Mode' => hAFTER,
+								'Conditional' => false,
+								'HookToPrefix' => '#PARENT#',
+								'HookToSpecial' => '',
+								'HookToEvent' => Array( 'OnCreate', 'OnUpdate'),
+								'DoPrefix' => '',
+								'DoSpecial' => '',
+								'DoEvent' => 'OnZoneUpdate',
+							),							
+						),	
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'page',
+												3	=>	'event',
+											),
+					'IDField'			=>	'ZoneDestId',
+					'TableName'			=>	TABLE_PREFIX.'ShippingZonesDestinations',
+					'ForeignKey' 	=> 	'ShippingZoneId',
+					'ParentTableKey'	=> 'ZoneID',
+					'ParentPrefix'	=> 'z',
+					'AutoDelete'	=>	true,
+					'AutoClone'	=> true,
+										
+					'ListSQLs'			=>	Array(	''=>'SELECT * FROM %s',
+																		), // key - special, value - list select sql
+					'ItemSQLs'			=>	Array(	''=>'SELECT * FROM %s',
+																		),
+					
+					'Fields' => Array (
+					    'ZoneDestId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
+			            'ShippingZoneId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
+			            'StdDestId' => Array('type' => 'int', 'default' => 0, ),
+			            'DestValue' => Array('type' => 'string', 'max_len' => 255, 'default' => null, ),
+					),
+					/*'Grids'	=> Array(
+								'Default'		=>	Array(
+																	'Icons' => Array('default'=>'icon17_custom.gif',1=>'icon16_image.gif',0=>'icon16_image_disabled.gif'),
+																	'Fields' => Array(
+																			'Name' => Array( 'title'=>'la_col_ImageName' , 'data_block' => 'grid_checkbox_td'),
+																			'AltName' => Array( 'title'=>'la_col_AltName' ),
+																			'Url' => Array( 'title'=>'la_col_ImageUrl', 'data_block' => 'image_url_td' ),
+																			'Enabled' => Array( 'title'=>'la_col_ImageEnabled' ),
+																			'Preview' => Array( 'title'=>'la_col_Preview', 'data_block' => 'preview' ),
+																		),
+																	
+																),
+													),*/
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/destinations/destinations_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.8
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/destinations/dst_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/destinations/dst_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/destinations/dst_event_handler.php	(revision 12131)
@@ -0,0 +1,117 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class DstEventHandler extends kDBEventHandler {
+
+	/**
+	 * Creates item from submit data
+	 *
+	 * @param kEvent $event
+	 */
+	function OnCreate(&$event)
+	{
+		$object =& $event->getObject( Array('skip_autoload' => true) );
+
+		$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
+		if($items_info)
+		{
+			foreach($items_info as $id => $field_values)
+			{
+				$object->SetFieldsFromHash($field_values);
+				$this->customProcessing($event, 'before');
+
+				if( $object->Create() )
+				{
+					if( $object->IsTempTable() ) $object->setTempID();
+					$this->customProcessing($event, 'after');
+					$event->status=erSUCCESS;
+				}
+				else
+				{
+					$event->status=erFAIL;
+					$event->redirect=false;
+					$this->Application->SetVar($event->Prefix_Special.'_SaveEvent','OnCreate');
+					$object->setID(0);
+				}
+			}
+		}
+	}
+
+	function customProcessing(&$event, $type)
+	{
+		if($type != 'before') return ;
+
+		$object =& $event->getObject();
+		$events = $this->Application->GetVar('events');
+		if($events['z'] == 'OnUpdate')
+		{
+			$object->SetDBField('ShippingZoneId', $this->Application->GetVar('z_id'));
+		}
+
+		$zone_object =& $this->Application->recallObject('z');
+		if($zone_object->GetDBField('Type') == 3)
+		{
+			$object->SetDBField('StdDestId', $this->Application->GetVar('ZIPCountry'));
+		}
+	}
+
+	 /**
+	 *
+	 *
+	 * @param kEvent $event
+	 */
+	function OnZoneUpdate(&$event) {
+
+		$object = &$event->getObject();
+
+		$zone_object = &$this->Application->recallObject('z');
+		$zone_id = (int)$zone_object->GetID();
+		$zone_type = $zone_object->GetDBField('Type');
+
+		$delete_zones_sql = 'DELETE FROM '.$object->TableName.' WHERE ShippingZoneId = '.$zone_id;
+		$this->Conn->Query($delete_zones_sql);
+
+		if ($zone_id != 0){
+			$delete_zones_sql = 'DELETE FROM '.$object->TableName.' WHERE ShippingZoneId = 0';
+			$this->Conn->Query($delete_zones_sql);
+		}
+
+		$selected_destinations = $this->Application->GetVar('selected_destinations');
+		$selected_destinations_array = explode(',', $selected_destinations);
+		$selected_destinations_array = array_unique($selected_destinations_array);
+		foreach ($selected_destinations_array as $key => $dest_id) {
+
+					if ($zone_object->GetDBField('Type') == 3){
+						list ($zone_dest_id, $dest_value) = explode('|', $dest_id);
+						$dest_id = $this->Application->GetVar('CountrySelector');
+					}
+					else {
+						$dest_value = '';
+					}
+
+					if ($dest_id > 0){
+						$object->SetDBField('ShippingZoneId', $zone_id);
+						$object->SetDBField('StdDestId', $dest_id);
+						$object->SetDBField('DestValue', $dest_value);
+						$object->Create();
+						$object->setTempID();
+					}
+
+		}
+
+
+	}
+
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/destinations/dst_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/affiliate_payment_types/affiliate_payment_types_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/affiliate_payment_types/affiliate_payment_types_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/affiliate_payment_types/affiliate_payment_types_config.php	(revision 12131)
@@ -0,0 +1,99 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+$config	=	Array(
+					'Prefix'			=>	'apt',
+					'ItemClass'			=>	Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'AffiliatePaymentTypesEventHandler','file'=>'affiliate_payment_types_event_handler.php','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
+					'AutoLoad'			=>	true,
+					'AggregateTags' => Array(
+															Array(
+																'AggregateTo' => 'u',
+																'AggregatedTagName' => 'ListAffiliatesPaymentTypes',
+																'LocalTagName' => 'PrintList',
+																'LocalSpecial' => 'active',
+															),
+													),
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'Page',
+												3	=>	'event',
+												4 	=>	'mode',
+											),
+
+					'IDField'			=>	'PaymentTypeId',
+					'StatusField'		=>	Array('Status', 'IsPrimary'),	// field, that is affected by Approve/Decline events
+
+					'TitleField'		=>	'Name',
+					'TitlePresets'		=>	Array(
+												'default'	=>	Array(	'new_status_labels'		=> Array('apt'=>'!la_title_Adding_Affiliate_Payment_Type!'),
+																		'edit_status_labels'	=> Array('apt'=>'!la_title_Editing_Affiliate_Payment_Type!'),
+																		'new_titlefield'		=> Array('apt'=>'!la_title_New_Affiliate_Payment_Type!'),
+																),
+
+												'affiliate_payment_types_list'	=>	Array('prefixes' => Array('apt_List'), 'format' => "!la_title_AffiliatePaymentTypes!"),
+												'affiliate_payment_types_edit' => Array('prefixes' => Array('apt'), 'format' => "#apt_status# '#apt_titlefield#' - !la_title_General!"),
+
+											),
+
+					'PermSection'		=>	Array('main' => 'in-commerce:affiliate_payment_types'),
+
+					'Sections'			=>	Array(
+													'in-commerce:affiliate_payment_types'	=>	Array(
+																										'parent'		=>	'in-commerce:affiliates_folder',
+																										'icon'			=>	'affiliates',
+																										'label'			=>	'la_tab_AffiliatePaymentTypes',
+																										'url'			=>	Array('t' => 'in-commerce/affiliate_plans/affiliate_payment_types_list', 'pass' => 'm'),
+																										'permissions'	=>	Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline', 'advanced:set_primary', 'advanced:move_up', 'advanced:move_down'),
+																										'priority'		=>	8.3,
+																										'type'			=>	stTAB,
+																								),
+													),
+
+					'TableName'			=>	TABLE_PREFIX.'AffiliatePaymentTypes',
+
+					'ListSQLs'			=>	Array('' => 'SELECT * FROM %s'),
+					'ItemSQLs'			=>	Array('' => 'SELECT * FROM %s'),
+
+					'ListSortings'	=> 	Array(
+												'' => Array(
+															'ForcedSorting' => Array('IsPrimary' => 'desc', 'Priority' => 'desc'),
+															'Sorting' => Array('Name' => 'asc'),
+														)
+										),
+
+					'Fields' => Array(
+							            'PaymentTypeId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+							            'Name' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''),
+							            'Description' => Array('type' => 'string', 'formatter' => 'kFormatter', 'not_null' => 1, 'using_fck' => 1, 'default' => ''),
+							            'IsPrimary' => Array('type' => 'int','not_null' => 1, 'default' => 0),
+							            'Status' => Array('type' => 'int','not_null' => 1, 'default' => 0),
+							            'Priority' => Array('type' => 'int','not_null' => 1, 'default' => 0),
+								),
+
+					'Grids'	=> Array(
+								'Default'		=>	Array(
+															'Icons' => Array('default'=>'icon16_custom.gif', '0_0' => 'icon16_affiliate_payment_type_disabled.gif', '1_0' => 'icon16_affiliate_payment_type.gif', '1_1' => 'icon16_affiliate_payment_type_primary.gif'),
+															'Fields' => Array(
+																			'PaymentTypeId' 	=> Array( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+																			'Name'				=> Array( 'title' => 'la_col_Name', 'data_block' => 'affiliate_payment_type_caption_td', 'filter_block' => 'grid_like_filter'),
+																			'Description'		=> Array( 'title' => 'la_col_Description', 'filter_block' => 'grid_like_filter'),
+																		),
+													),
+
+								),
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/affiliate_payment_types/affiliate_payment_types_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/affiliate_payment_types/affiliate_payment_types_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/affiliate_payment_types/affiliate_payment_types_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/affiliate_payment_types/affiliate_payment_types_event_handler.php	(revision 12131)
@@ -0,0 +1,88 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class AffiliatePaymentTypesEventHandler extends kDBEventHandler  {
+
+	function SetCustomQuery(&$event)
+	{
+		if($event->Special == 'active')
+		{
+			$object =& $event->getObject();
+			$object->addFilter('active', '%1$s.Status = 1');
+		}
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnSetPrimary(&$event)
+	{
+		$object =& $event->getObject();
+		$object->SetDBField('IsPrimary', 1);
+		$object->Update();
+	}
+
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnBeforeItemUpdate(&$event)
+	{
+		$object =& $event->getObject();
+
+		if ($object->GetDBField('IsPrimary') && $object->Validate()) {
+			$table_name = $this->Application->getUnitOption($event->Prefix, 'TableName');
+			$sql = 'UPDATE '.$table_name.' SET IsPrimary = 0';
+			$this->Conn->Query($sql);
+
+			$status_field = array_shift( $this->Application->getUnitOption($event->Prefix,'StatusField') );
+			$object->SetDBField($status_field, 1);
+		}
+	}
+
+	function OnBeforeItemCreate(&$event)
+	{
+		$this->OnBeforeItemUpdate($event);
+	}
+
+	function OnMassDelete($event)
+	{
+		if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
+			return;
+		}
+		$event->status=erSUCCESS;
+
+		$this->StoreSelectedIDs($event);
+		$event->setEventParam('ids', $this->getSelectedIDs($event) );
+		$ids = $event->getEventParam('ids');
+
+		$temp =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
+
+		$sql = 'SELECT AffiliatePlanId FROM '.$this->Application->getUnitOption('ap', 'TableName').'
+				WHERE IsPrimary = 1';
+		$primary_id = $this->Conn->GetOne($sql);
+		$ids = array_diff($ids, Array($primary_id));
+
+		if($ids)
+		{
+			$temp->DeleteItems($event->Prefix, $event->Special, $ids);
+		}
+		$this->clearSelectedIDs($event);
+	}
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/affiliate_payment_types/affiliate_payment_types_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/shipping_quote_engines/usps.php
===================================================================
--- branches/5.1.x/in-commerce/units/shipping_quote_engines/usps.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/shipping_quote_engines/usps.php	(revision 12131)
@@ -0,0 +1,1195 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+define('MODULE_SHIPPING_USPS_TEXT_TITLE', 'United States Postal Service');
+define('MODULE_SHIPPING_USPS_TEXT_DESCRIPTION', 'You will need to have registered an account with USPS. Click <a target="_blank" href="https://secure.shippingapis.com/registration/"><strong>HERE</strong></a> for registration details. USPS expects you to use pounds as weight measure for your products.');
+define('MODULE_SHIPPING_USPS_TEXT_ERROR', 'An error occured with the USPS shipping calculations.<br>If you prefer to use USPS as your shipping method, please contact the store owner.');
+define('MODULE_SHIPPING_USPS_TEXT_DAY', 'Day');
+define('MODULE_SHIPPING_USPS_TEXT_DAYS', 'Days');
+define('MODULE_SHIPPING_USPS_TEXT_WEEKS', 'Weeks');
+
+define('MODULE_SHIPPING_USPS_STATUS', 'True'); // Do you want to offer USPS shipping?
+define('MODULE_SHIPPING_USPS_SERVER', 'production'); // An account at USPS is needed to use the Production server // production  othervise value may be 'test'
+define('MODULE_SHIPPING_USPS_HANDLING', '0'); // Handling fee for this shipping method
+define('MODULE_SHIPPING_USPS_TAX_CLASS', '0'); // Use the following tax class on the shipping fee
+define('MODULE_SHIPPING_USPS_ZONE', '0'); // If a zone is selected, only enable this shipping method for that zone.
+define('MODULE_SHIPPING_USPS_SORT_ORDER', '0'); // Sort order of display.
+define('MODULE_SHIPPING_USPS_TYPES', 'PRIORITY, PARCEL'); //  EXPRESS, FIRST CLASS, BMP, MEDIA  'Select the domestic services to be offered:
+define('MODULE_SHIPPING_USPS_TYPES_INTL', 'EXPRESS MAIL INTERNATIONAL (EMS), EXPRESS MAIL INT, EXPRESS MAIL INT FLAT RATE ENV, PRIORITY MAIL INT, PRIORITY MAIL INT FLAT RATE ENV, PRIORITY MAILINT FLAT RATE BOX, FIRST-CLASS MAIL INT');//  'GLOBAL EXPRESS, GLOBAL EXPRESS NON-DOC RECT, GLOBAL EXPRESS NON-DOC NON-RECT,  Select the international services to be offered:
+define('MODULE_SHIPPING_USPS_OPTIONS', 'Display weight, Display transit time'); //
+
+//configuration values for insurance
+define('MODULE_SHIPPING_USPS_INS1', '1.65');// 'US/Canada insurance for totals $.01-$50.00
+define('MODULE_SHIPPING_USPS_INS2', '2.05');// 'US/Canada insurance for totals $50.01-$100
+define('MODULE_SHIPPING_USPS_INS3', '2.45');// 'US/Canada insurance for totals $100.01-$200
+define('MODULE_SHIPPING_USPS_INS4', '4.60');// 'US/Canada insurance for totals $200.01-$300
+define('MODULE_SHIPPING_USPS_INS5', '.90');// 'US/Canada insurance for every $100 over $300 (add)
+define('MODULE_SHIPPING_USPS_INS6', '2.40');//  'International insurance for totals $.01-$50.00
+define('MODULE_SHIPPING_USPS_INS7', '3.30');// 'International insurance for totals $50.01-$100
+define('MODULE_SHIPPING_USPS_INS8', '4.20');// 'International insurance for totals $100.01-$200
+define('MODULE_SHIPPING_USPS_INS9', '5.10');// 'International insurance for totals $200.01-$300
+define('MODULE_SHIPPING_USPS_INS10', '.90');// 'International insurance for every $100 over $300 (add)
+define('MODULE_SHIPPING_USPS_INSURE', 'True');// 'Insure packages shipped by USPS?
+define('MODULE_SHIPPING_USPS_INSURE_TAX', 'True');// 'Insure tax on packages shipped by USPS?
+
+define('USPS_LOG_FILE', WRITEABLE .'/user_files/usps.log');
+
+class USPS extends ShippingQuoteEngine
+{
+	var $countries, $pounds, $ounces, $insurance_cost = 0, $shipping_origin_country, $store_first_name, $store_last_name, $company_name, $store_name, $store_address1, $store_address2, $store_city, $store_state, $store_zip5, $store_zip4, $store_phone, $usps_userid;
+	var $order = Array();
+	var $types = Array();
+	var $intl_types = Array();
+
+
+	function USPS()
+	{
+		parent::kBase();
+
+        // EXPRESS, FIRST CLASS, PRIORITY, PARCEL, BMP, MEDIA
+		$this->types = Array(
+			'EXPRESS' => 'Express Mail',
+			'FIRST CLASS' => 'First Class Mail',
+			'PRIORITY' => 'Priority Mail',
+			'PARCEL' => 'Parcel Post',
+			'BPM' => 'Bound Printed Matter',
+			'MEDIA' => 'Media Mail'
+		);
+
+		$this->intl_types = Array(
+			// 'GLOBAL EXPRESS' => 'Global Express Guaranteed',
+			// 'GLOBAL EXPRESS NON-DOC RECT' => 'Global Express Guaranteed Non-Document Rectangular',
+			// 'GLOBAL EXPRESS NON-DOC NON-RECT' => 'Global Express Guaranteed Non-Document Non-Rectangular',
+			'EXPRESS MAIL INT' => 'Express Mail International (EMS)',
+			'EXPRESS MAIL INT FLAT RATE ENV' => 'Express Mail International (EMS) Flat Rate Envelope',
+			'PRIORITY MAIL INT' => 'Priority Mail International',
+			'PRIORITY MAIL INT FLAT RATE ENV' => 'Priority Mail International Flat Rate Envelope',
+			'PRIORITY MAIL INT FLAT RATE BOX' => 'Priority Mail International Flat Rate Box',
+			'FIRST-CLASS MAIL INT' => 'First-Class Mail International'
+		);
+
+		// get 2-symbol country code
+		$country = $this->Application->ConfigValue('Comm_Shipping_Country');
+
+		if ($country != '') {
+			$db =& $this->Application->GetADODBConnection();
+			$this->shipping_origin_country = $db->GetOne(
+				'SELECT DestAbbr2
+					FROM '.TABLE_PREFIX.'StdDestinations
+					WHERE
+						DestAbbr = '.$db->qstr($country).'
+						AND destType = 1
+				'
+			);
+		}
+		$contact_name = trim($this->_prepare_xml_param($this->Application->ConfigValue('Comm_Contacts_Name')));
+		$split_pos = strpos($contact_name, ' ');
+		if ($split_pos === false) {
+			$this->store_first_name = $contact_name;
+			$this->store_last_name = '';
+		} else {
+			$this->store_first_name = substr($contact_name, 0, $split_pos);
+			$this->store_last_name = trim(substr($contact_name, $split_pos));
+		}
+		$this->company_name = $this->_prepare_xml_param($this->Application->ConfigValue('Comm_CompanyName'));
+		$this->store_name = $this->_prepare_xml_param($this->Application->ConfigValue('Comm_StoreName'));
+		$this->store_address1 = $this->_prepare_xml_param($this->Application->ConfigValue('Comm_Shipping_AddressLine1'));
+		$this->store_address2 = $this->_prepare_xml_param($this->Application->ConfigValue('Comm_Shipping_AddressLine2'));
+
+		if ($this->store_address2 == '') {
+			$this->store_address2 = $this->store_address1;
+			$this->store_address1 = '';
+		}
+
+		$this->store_city = $this->_prepare_xml_param($this->Application->ConfigValue('Comm_Shipping_City'));
+		$this->store_state = $this->_prepare_xml_param($this->Application->ConfigValue('Comm_Shipping_State'));
+		$zip = $this->_prepare_xml_param($this->Application->ConfigValue('Comm_Shipping_ZIP'));
+		$this->store_zip5 = substr($zip, 0, 5);
+		$this->store_zip4 = trim(substr($zip, 6), '-');
+		$this->store_phone = $this->_prepare_xml_param($this->Application->ConfigValue('Comm_Contacts_Phone'));
+
+		// get username and password fron config.
+		$a_params = $this->LoadParams();
+		$this->usps_userid = $a_params['AccountLogin'];
+
+		// Note by Erik: DO NOT CHANGE THIS ARRAY. It's values are sent to USPS service and any changes may impact class main functionality.
+		$this->countries = array(
+			'AF' => 'Afghanistan',
+            'AL' => 'Albania',
+            'DZ' => 'Algeria',
+            'AD' => 'Andorra',
+            'AO' => 'Angola',
+            'AI' => 'Anguilla',
+            'AG' => 'Antigua and Barbuda',
+            'AR' => 'Argentina',
+            'AM' => 'Armenia',
+            'AW' => 'Aruba',
+            'AU' => 'Australia',
+            'AT' => 'Austria',
+            'AZ' => 'Azerbaijan',
+            'BS' => 'Bahamas',
+        	'BH' => 'Bahrain',
+            'BD' => 'Bangladesh',
+            'BB' => 'Barbados',
+            'BY' => 'Belarus',
+            'BE' => 'Belgium',
+            'BZ' => 'Belize',
+            'BJ' => 'Benin',
+            'BM' => 'Bermuda',
+            'BT' => 'Bhutan',
+            'BO' => 'Bolivia',
+            'BA' => 'Bosnia-Herzegovina',
+            'BW' => 'Botswana',
+            'BR' => 'Brazil',
+            'VG' => 'British Virgin Islands',
+            'BN' => 'Brunei Darussalam',
+            'BG' => 'Bulgaria',
+            'BF' => 'Burkina Faso',
+            'MM' => 'Burma',
+            'BI' => 'Burundi',
+            'KH' => 'Cambodia',
+            'CM' => 'Cameroon',
+            'CA' => 'Canada',
+            'CV' => 'Cape Verde',
+            'KY' => 'Cayman Islands',
+            'CF' => 'Central African Republic',
+            'TD' => 'Chad',
+            'CL' => 'Chile',
+            'CN' => 'China',
+            'CX' => 'Christmas Island (Australia)',
+            'CC' => 'Cocos Island (Australia)',
+            'CO' => 'Colombia',
+            'KM' => 'Comoros',
+            'CG' => 'Congo (Brazzaville),Republic of the',
+            'ZR' => 'Congo, Democratic Republic of the',
+            'CK' => 'Cook Islands (New Zealand)',
+            'CR' => 'Costa Rica',
+            'CI' => 'Cote d\'Ivoire (Ivory Coast)',
+            'HR' => 'Croatia',
+            'CU' => 'Cuba',
+            'CY' => 'Cyprus',
+            'CZ' => 'Czech Republic',
+            'DK' => 'Denmark',
+            'DJ' => 'Djibouti',
+            'DM' => 'Dominica',
+            'DO' => 'Dominican Republic',
+            'TP' => 'East Timor (Indonesia)',
+            'EC' => 'Ecuador',
+            'EG' => 'Egypt',
+            'SV' => 'El Salvador',
+            'GQ' => 'Equatorial Guinea',
+            'ER' => 'Eritrea',
+            'EE' => 'Estonia',
+            'ET' => 'Ethiopia',
+            'FK' => 'Falkland Islands',
+            'FO' => 'Faroe Islands',
+            'FJ' => 'Fiji',
+            'FI' => 'Finland',
+            'FR' => 'France',
+            'GF' => 'French Guiana',
+            'PF' => 'French Polynesia',
+            'GA' => 'Gabon',
+            'GM' => 'Gambia',
+            'GE' => 'Georgia, Republic of',
+            'DE' => 'Germany',
+            'GH' => 'Ghana',
+            'GI' => 'Gibraltar',
+            'GB' => 'Great Britain and Northern Ireland',
+            'GR' => 'Greece',
+            'GL' => 'Greenland',
+            'GD' => 'Grenada',
+            'GP' => 'Guadeloupe',
+            'GT' => 'Guatemala',
+            'GN' => 'Guinea',
+            'GW' => 'Guinea-Bissau',
+            'GY' => 'Guyana',
+            'HT' => 'Haiti',
+            'HN' => 'Honduras',
+            'HK' => 'Hong Kong',
+            'HU' => 'Hungary',
+            'IS' => 'Iceland',
+            'IN' => 'India',
+            'ID' => 'Indonesia',
+            'IR' => 'Iran',
+            'IQ' => 'Iraq',
+            'IE' => 'Ireland',
+            'IL' => 'Israel',
+            'IT' => 'Italy',
+            'JM' => 'Jamaica',
+            'JP' => 'Japan',
+            'JO' => 'Jordan',
+            'KZ' => 'Kazakhstan',
+            'KE' => 'Kenya',
+            'KI' => 'Kiribati',
+            'KW' => 'Kuwait',
+            'KG' => 'Kyrgyzstan',
+            'LA' => 'Laos',
+            'LV' => 'Latvia',
+            'LB' => 'Lebanon',
+            'LS' => 'Lesotho',
+            'LR' => 'Liberia',
+            'LY' => 'Libya',
+            'LI' => 'Liechtenstein',
+            'LT' => 'Lithuania',
+            'LU' => 'Luxembourg',
+            'MO' => 'Macao',
+            'MK' => 'Macedonia, Republic of',
+            'MG' => 'Madagascar',
+            'MW' => 'Malawi',
+            'MY' => 'Malaysia',
+            'MV' => 'Maldives',
+            'ML' => 'Mali',
+            'MT' => 'Malta',
+            'MQ' => 'Martinique',
+            'MR' => 'Mauritania',
+            'MU' => 'Mauritius',
+            'YT' => 'Mayotte (France)',
+            'MX' => 'Mexico',
+            'MD' => 'Moldova',
+            'MC' => 'Monaco (France)',
+            'MN' => 'Mongolia',
+            'MS' => 'Montserrat',
+            'MA' => 'Morocco',
+            'MZ' => 'Mozambique',
+            'NA' => 'Namibia',
+            'NR' => 'Nauru',
+            'NP' => 'Nepal',
+            'NL' => 'Netherlands',
+            'AN' => 'Netherlands Antilles',
+            'NC' => 'New Caledonia',
+            'NZ' => 'New Zealand',
+            'NI' => 'Nicaragua',
+            'NE' => 'Niger',
+            'NG' => 'Nigeria',
+            'KP' => 'North Korea (Korea, Democratic People\'s Republic of)',
+            'NO' => 'Norway',
+            'OM' => 'Oman',
+            'PK' => 'Pakistan',
+            'PA' => 'Panama',
+            'PG' => 'Papua New Guinea',
+            'PY' => 'Paraguay',
+            'PE' => 'Peru',
+            'PH' => 'Philippines',
+            'PN' => 'Pitcairn Island',
+            'PL' => 'Poland',
+            'PT' => 'Portugal',
+            'QA' => 'Qatar',
+            'RE' => 'Reunion',
+            'RO' => 'Romania',
+            'RU' => 'Russia',
+            'RW' => 'Rwanda',
+            'SH' => 'Saint Helena',
+            'KN' => 'Saint Kitts (St. Christopher and Nevis)',
+            'LC' => 'Saint Lucia',
+            'PM' => 'Saint Pierre and Miquelon',
+            'VC' => 'Saint Vincent and the Grenadines',
+            'SM' => 'San Marino',
+            'ST' => 'Sao Tome and Principe',
+            'SA' => 'Saudi Arabia',
+            'SN' => 'Senegal',
+            'YU' => 'Serbia-Montenegro',
+            'SC' => 'Seychelles',
+            'SL' => 'Sierra Leone',
+            'SG' => 'Singapore',
+            'SK' => 'Slovak Republic',
+            'SI' => 'Slovenia',
+            'SB' => 'Solomon Islands',
+            'SO' => 'Somalia',
+            'ZA' => 'South Africa',
+            'GS' => 'South Georgia (Falkland Islands)',
+            'KR' => 'South Korea (Korea, Republic of)',
+            'ES' => 'Spain',
+            'LK' => 'Sri Lanka',
+            'SD' => 'Sudan',
+            'SR' => 'Suriname',
+            'SZ' => 'Swaziland',
+            'SE' => 'Sweden',
+            'CH' => 'Switzerland',
+            'SY' => 'Syrian Arab Republic',
+            'TW' => 'Taiwan',
+            'TJ' => 'Tajikistan',
+            'TZ' => 'Tanzania',
+            'TH' => 'Thailand',
+            'TG' => 'Togo',
+            'TK' => 'Tokelau (Union) Group (Western Samoa)',
+            'TO' => 'Tonga',
+            'TT' => 'Trinidad and Tobago',
+            'TN' => 'Tunisia',
+            'TR' => 'Turkey',
+            'TM' => 'Turkmenistan',
+            'TC' => 'Turks and Caicos Islands',
+            'TV' => 'Tuvalu',
+            'UG' => 'Uganda',
+            'UA' => 'Ukraine',
+            'AE' => 'United Arab Emirates',
+            'UY' => 'Uruguay',
+            'UZ' => 'Uzbekistan',
+            'VU' => 'Vanuatu',
+            'VA' => 'Vatican City',
+            'VE' => 'Venezuela',
+            'VN' => 'Vietnam',
+            'WF' => 'Wallis and Futuna Islands',
+            'WS' => 'Western Samoa',
+            'YE' => 'Yemen',
+            'ZM' => 'Zambia',
+            'ZW' => 'Zimbabwe'
+        );
+
+		$this->countryinsure = array(
+			'AF' => 0,
+            'AL' => 0,
+            'DZ' => 2185,
+            'AD' => 5000,
+            'AO' => 0,
+            'AI' => 415,
+            'AG' => 60,
+            'AR' => 5000,
+            'AM' => 1350,
+            'AW' => 830,
+            'AU' => 3370,
+            'AT' => 5000,
+            'AZ' => 5000,
+            'BS' => 2795,
+            'BH' => 0,
+            'BD' => 5000,
+            'BB' => 220,
+            'BY' => 1323,
+            'BE' => 5000,
+            'BZ' => 1600,
+            'BJ' => 170,
+            'BM' => 440,
+            'BT' => 440,
+            'BO' => 0,
+            'BA' => 5000,
+            'BW' => 145,
+            'BR' => 5000,
+            'VG' => 165,
+            'BN' => 4405,
+            'BG' => 1030,
+            'BF' => 530,
+            'MM' => 4045,
+            'BI' => 790,
+            'KH' => 0,
+            'CM' => 5000,
+            'CA' => 675,
+            'CV' => 0,
+            'KY' => 0,
+            'CF' => 4405,
+            'TD' => 440,
+            'CL' => 0,
+            'CN' => 1130,
+            'CX' => 3370,
+            'CC' => 3370,
+            'CO' => 0,
+            'KM' => 690,
+            'CG' => 1685,
+            'ZR' => 0,
+            'CK' => 980,
+            'CR' => 0,
+            'CI' => 5000,
+            'HR' => 5000,
+            'CU' => 0,
+            'CY' => 5000,
+            'CZ' => 5000,
+            'DK' => 5000,
+            'DJ' => 880,
+            'DM' => 0,
+            'DO' => 0,
+            'TP' => 0,
+            'EC' => 0,
+            'EG' => 1685,
+            'SV' => 0,
+            'GQ' => 0,
+            'ER' => 0,
+            'EE' => 2020,
+            'ET' => 1000,
+            'FK' => 510,
+            'FO' => 5000,
+            'FJ' => 600,
+            'FI' => 5000,
+            'FR' => 5000,
+            'GF' => 5000,
+            'PF' => 1015,
+            'GA' => 485,
+            'GM' => 2575,
+            'GE' => 1350,
+            'DE' => 5000,
+            'GH' => 5000,
+            'GI' => 5000,
+            'GB' => 857,
+            'GR' => 5000,
+            'GL' => 5000,
+            'GD' => 350,
+            'GP' => 5000,
+            'GT' => 0,
+            'GN' => 875,
+            'GW' => 21,
+            'GY' => 10,
+            'HT' => 0,
+            'HN' => 0,
+            'HK' => 5000,
+            'HU' => 5000,
+            'IS' => 5000,
+            'IN' => 2265,
+            'ID' => 0,
+            'IR' => 0,
+            'IQ' => 0,
+            'IE' => 5000,
+            'IL' => 0,
+            'IT' => 5000,
+            'JM' => 0,
+            'JP' => 5000,
+            'JO' => 0,
+            'KZ' => 5000,
+            'KE' => 815,
+            'KI' => 0,
+            'KW' => 1765,
+            'KG' => 1350,
+            'LA' => 0,
+            'LV' => 1350,
+            'LB' => 440,
+            'LS' => 440,
+            'LR' => 440,
+            'LY' => 0,
+            'LI' => 5000,
+            'LT' => 5000,
+            'LU' => 5000,
+            'MO' => 4262,
+            'MK' => 2200,
+            'MG' => 675,
+            'MW' => 50,
+            'MY' => 1320,
+            'MV' => 0,
+            'ML' => 950,
+            'MT' => 5000,
+            'MQ' => 5000,
+            'MR' => 635,
+            'MU' => 270,
+            'YT' => 5000,
+            'MX' => 0,
+            'MD' => 1350,
+            'MC' => 5000,
+            'MN' => 440,
+            'MS' => 2200,
+            'MA' => 5000,
+            'MZ' => 0,
+            'NA' => 4405,
+            'NR' => 220,
+            'NP' => 0,
+            'NL' => 5000,
+            'AN' => 830,
+            'NC' => 1615,
+            'NZ' => 980,
+            'NI' => 440,
+            'NE' => 810,
+            'NG' => 205,
+            'KP' => 0,
+            'NO' => 0,
+            'OM' => 575,
+            'PK' => 270,
+            'PA' => 0,
+            'PG' => 445,
+            'PY' => 0,
+            'PE' => 0,
+            'PH' => 270,
+            'PN' => 0,
+            'PL' => 1350,
+            'PT' => 5000,
+            'QA' => 2515,
+            'RE' => 5000,
+            'RO' => 5000,
+            'RU' => 5000,
+            'RW' => 0,
+            'SH' => 170,
+            'KN' => 210,
+            'LC' => 400,
+            'PM' => 5000,
+            'VC' => 130,
+            'SM' => 5000,
+            'ST' => 440,
+            'SA' => 0,
+            'SN' => 865,
+            'YU' => 5000,
+            'SC' => 0,
+            'SL' => 0,
+            'SG' => 4580,
+            'SK' => 5000,
+            'SI' => 4400,
+            'SB' => 0,
+            'SO' => 440,
+            'ZA' => 1760,
+            'GS' => 510,
+            'KR' => 5000,
+            'ES' => 5000,
+            'LK' => 35,
+            'SD' => 0,
+            'SR' => 535,
+            'SZ' => 560,
+            'SE' => 5000,
+            'CH' => 5000,
+            'SY' => 3080,
+            'TW' => 1350,
+            'TJ' => 1350,
+            'TZ' => 230,
+            'TH' => 1350,
+            'TG' => 2190,
+            'TK' => 295,
+            'TO' => 515,
+            'TT' => 930,
+            'TN' => 2200,
+            'TR' => 880,
+            'TM' => 675,
+            'TC' => 0,
+            'TV' => 4715,
+            'UG' => 0,
+            'UA' => 5000,
+            'AE' => 5000,
+            'UY' => 0,
+            'UZ' => 5000,
+            'VU' => 0,
+            'VA' => 5000,
+            'VE' => 0,
+            'VN' => 0,
+            'WF' => 1615,
+            'WS' => 295,
+            'YE' => 0,
+            'ZM' => 540,
+            'ZW' => 600,
+            'US' => 5000
+    	);
+	}
+
+	function SetInsurance()
+	{
+		$this->insurance_cost = 0;
+
+		// Insurance module by Kevin Shelton
+		// divide the value of the order among the packages based on the order total or subtotal depending on whether or not you have configured to insure tax
+		$shipping_weight = $this->order['ShippingWeight'];
+		$shipping_num_boxes = $this->order['ShippingNumBoxes'];
+		$costperpkg = $this->order['SubTotal'] / $shipping_num_boxes;
+
+		// retrieve the maximum allowed insurance for the destination country and if the package value exceeds it then set package value to the maximum allowed
+
+		$maxins = $this->countryinsure[$this->order['ShippingCountry']];
+		if ($costperpkg > $maxins) $costperpkg = $maxins;
+
+		// if insurance not allowed for destination or insurance is turned off add nothing to shipping cost
+
+		if (($maxins == 0) || (MODULE_SHIPPING_USPS_INSURE == 'False')) {
+			$insurance = 0;
+		}
+		// US and Canada share the same insurance calculation (though not the same maximum)
+		else if (($this->order['ShippingCountry'] == 'US') || ($this->order['ShippingCountry'] == 'CA'))
+		{
+			if ($costperpkg<=50) {
+				$insurance=MODULE_SHIPPING_USPS_INS1;
+			}
+			else if ($costperpkg<=100) {
+				$insurance=MODULE_SHIPPING_USPS_INS2;
+			}
+			else if ($costperpkg<=200) {
+				$insurance=MODULE_SHIPPING_USPS_INS3;
+			}
+			else if ($costperpkg<=300) {
+				$insurance=MODULE_SHIPPING_USPS_INS4;
+			}
+			else {
+				$insurance = MODULE_SHIPPING_USPS_INS4 + ((ceil($costperpkg/100) -3) * MODULE_SHIPPING_USPS_INS5);
+			}
+		}
+		// if insurance allowed and is not US or Canada then calculate international insurance
+		else {
+			if ($costperpkg<=50) {
+			    $insurance=MODULE_SHIPPING_USPS_INS6;
+			}
+			else if ($costperpkg<=100) {
+			    $insurance=MODULE_SHIPPING_USPS_INS7;
+			}
+			else if ($costperpkg<=200) {
+			    $insurance=MODULE_SHIPPING_USPS_INS8;
+			}
+			else if ($costperpkg<=300) {
+			    $insurance=MODULE_SHIPPING_USPS_INS9;
+			}
+			else {
+			    $insurance = MODULE_SHIPPING_USPS_INS9 + ((ceil($costperpkg/100) - 3) * MODULE_SHIPPING_USPS_INS10);
+			}
+		}
+		// usps doesnt accept zero weight
+		$shipping_weight = ($shipping_weight < 0.1 ? 0.1 : $shipping_weight);
+		$shipping_pounds = floor ($shipping_weight);
+		$shipping_ounces = round(16 * ($shipping_weight - floor($shipping_weight)));
+		$this->_setWeight($shipping_pounds, $shipping_ounces);
+		// Added by Kevin Chen (kkchen@uci.edu); Fixes the Parcel Post Bug July 1, 2004
+		// Refer to http://www.usps.com/webtools/htm/Domestic-Rates.htm documentation
+		// Thanks Ryan
+		if($shipping_pounds > 35 || ($shipping_pounds == 0 && $shipping_ounces < 6)){
+			$this->_setMachinable('False');
+		}
+		else{
+			$this->_setMachinable('True');
+		}
+
+		$this->insurance_cost = $insurance;
+		// End Kevin Chen July 1, 2004
+	}
+
+	function _setService($service)
+	{
+		$this->service = $service;
+	}
+
+	function _setWeight($pounds, $ounces=0)
+	{
+		$this->pounds = $pounds;
+		$this->ounces = $ounces;
+	}
+
+	function _setContainer($container)
+	{
+		$this->container = $container;
+	}
+
+	function _setSize($size)
+	{
+		$this->size = $size;
+	}
+
+	function _setMachinable($machinable)
+	{
+		$this->machinable = $machinable;
+	}
+
+	function PhoneClean($phone)
+	{
+		$res = ereg_replace("[(]|[)]|[\-]|[ ]|[#]|[\.]|[a-z](.*)|[A-Z](.*)", "", $phone);
+		if ( strlen($res) > 10 ) $res = substr($res, 0, 10);
+		return $res != '' ? $res : $phone;
+	}
+
+	function GetQuote($method = '')
+	{
+		if ( isset($this->types[$method]) || in_array($method, $this->intl_types)) {
+			$this->_setService($method);
+		}
+		$this -> _setContainer('None');
+		$this -> _setSize('REGULAR');
+		$this -> SetInsurance(); // ???
+		if ($this->order['ShippingCountry'] == $this->shipping_origin_country) {
+			$request='<?xml version="1.0"?>';
+			// PASSWORD="'.$this->usps_password.'"
+			$request.= '<RateV3Request USERID="'.$this->usps_userid.'">';
+			$services_count = 0;
+			if (isset($this->service)) {
+				$this->types = array($this->service => $this->types[$this->service]);
+			}
+			$dest_zip = str_replace(' ', '', $this->order['ShippingZip']);
+			$dest_zip = substr($dest_zip, 0, 5);
+			reset($this->types);
+			$allowed_types = explode(", ", MODULE_SHIPPING_USPS_TYPES);
+
+	    	while (list($key, $value) = each($this->types))
+	    	{
+	 		 	if ( !in_array($key, $allowed_types) ) continue;
+				$request .= '<Package ID="'.$services_count.'">'.
+				          '<Service>'.$key.'</Service>'.
+				          '<ZipOrigination>'.$this->store_zip5.'</ZipOrigination>'.
+				          '<ZipDestination>'.$dest_zip.'</ZipDestination>'.
+				          '<Pounds>'.$this->pounds.'</Pounds>'.
+				          '<Ounces>'.$this->ounces.'</Ounces>'.
+				          '<Size>'.$this->size.'</Size>'.
+				          '<Machinable>'.$this->machinable.'</Machinable>'.
+				          '</Package>';
+	     	 	$services_count++;
+			}
+			$request .= '</RateV3Request>';
+			$api_query = 'RateV3';
+		}
+	  	else {
+			$request  = '<IntlRateRequest USERID="'.$this->usps_userid.'">'.
+			            '<Package ID="0">'.
+			            '<Pounds>'.$this->pounds.'</Pounds>'.
+			            '<Ounces>'.$this->ounces.'</Ounces>'.
+			            '<MailType>Package</MailType>'.
+			            '<Country>'.$this->countries[$this->order['ShippingCountry']].'</Country>'.
+			            '</Package>'.
+			            '</IntlRateRequest>';
+			$api_query = 'IntlRate';
+		}
+		$request = 'API='.$api_query.'&XML=' . urlencode($request);
+		$body = $this->PostQuery($request);
+		$body = str_replace(chr(146), '', $body); // for bad `
+
+		// check for errors
+		if (strpos($body, '<Error>') !== false) {
+			$errors = Array ();
+			preg_match_all('/<Number>(.*?)<\/Number>/s', $body, $error_numbers);
+			preg_match_all('/<Description>(.*?)<\/Description>/s', $body, $error_descriptions);
+
+			foreach ($error_numbers[1] as $index => $error_number) {
+				$errors[$index] = $error_descriptions[1][$index];
+				if ($this->Application->isDebugMode()) {
+					$errors[$index] .= ' (' . $error_number . ')';
+				}
+			}
+
+			$errors = array_unique($errors); // we may have same errors on many packages, so don't show duplicates
+			return Array('error' => implode('<br/>', $errors));
+		}
+
+		// parse response
+
+
+		$xml_helper =& $this->Application->recallObject('kXMLHelper');
+		/* @var $xml_helper kXMLHelper */
+
+		$root_node =& $xml_helper->Parse($body);
+		/* @var $root_node kXMLNode */
+
+		$rates = Array();
+		// Domestic shipping
+		if ($this->order['ShippingCountry'] == $this->shipping_origin_country) {
+			$i = 0;
+			$postage_node =& $root_node->FindChild('Package');
+			do {
+				// $parcel_node =& $postage_node->firstChild;
+				$service = $postage_node->FindChildValue('MailService');
+				if ( $service != '' ) {
+					$i++;
+					$rates[$i] = Array();
+					$rates[$i]['Title'] = $service;
+					$rates[$i]['Rate'] = $this->insurance_cost + $postage_node->FindChildValue('Rate');
+				}
+			}
+			while ( $postage_node =& $postage_node->NextSibling());
+		}
+		else {
+			// for International Rates !!!
+		    $allowed_types = array();
+			foreach( explode(", ", MODULE_SHIPPING_USPS_TYPES_INTL) as $value ) {
+				$allowed_types[$value] = $this->intl_types[$value];
+			}
+			$i = 0;
+			$service_node =& $root_node->FindChild('Service');
+			do {
+				$service = trim($service_node->FindChildValue('SvcDescription'));
+				if( !in_array($service, $allowed_types) ) continue;
+				$i++;
+				if ( $service_node->FindChildValue('MaxWeight') >= $this->pounds ) {
+					$rates[$i] = Array();
+					$rates[$i]['Title'] = $service;
+					$rates[$i]['MaxDimensions'] = $service_node->FindChildValue('MaxDimensions');
+					$rates[$i]['MaxWeight'] = $service_node->FindChildValue('MaxWeight');
+					$rates[$i]['SvcCommitments'] = $service_node->FindChildValue('SvcCommitments');
+					$rates[$i]['Rate'] = $this->insurance_cost + $service_node->FindChildValue('Postage');
+				}
+			}
+			while ( $service_node =& $service_node->NextSibling());
+	  	}
+	  	// print_r($rates);
+	  	// die('here');
+		return $rates;
+	}
+
+	function PostOrder()
+	{
+		$request='';
+		$base_request = '';
+		$this->SetInsurance();
+		// $this->order['ShippingCountry'] = $this->GetUSPSCountry($this->order['ShippingCountry']);
+
+		// Domestic Order
+		if ($this->order['ShippingCountry'] == $this->shipping_origin_country) {
+
+			// $dest_zip = str_replace(' ', '', $this->order['ShippingZip5']);
+			$this->order['ShippingZip5'] = substr($this->order['ShippingZip5'], 0, 5);
+			$WeightInOunces = floor($this->pounds * 16 + $this->ounces);
+
+			$base_request ='
+			<Option>1</Option>
+			<ImageParameters></ImageParameters>
+			<FromName>'.$this->store_name.'</FromName>
+			<FromFirm>'.$this->company_name.'</FromFirm>
+			<FromAddress1>'.$this->store_address1.'</FromAddress1>
+			<FromAddress2>'.$this->store_address2.'</FromAddress2>
+			<FromCity>'.$this->store_city.'</FromCity>
+			<FromState>'.$this->store_state.'</FromState>
+			<FromZip5>'.$this->store_zip5.'</FromZip5>
+			<FromZip4>'.$this->store_zip4.'</FromZip4>
+			<ToName>'.$this->order['FirstName'].' '.$this->order['LastName'].'</ToName>
+			<ToFirm>'.$this->order['ShippingCompany'].'</ToFirm>
+			<ToAddress1>'.$this->order['ShippingAddress2'].'</ToAddress1>
+			<ToAddress2>'.$this->order['ShippingAddress1'].'</ToAddress2>
+			<ToCity>'.$this->order['ShippingCity'].'</ToCity>
+			<ToState>'.$this->order['ShippingState'].'</ToState>
+			<ToZip5>'.$this->order['ShippingZip5'].'</ToZip5>
+			<ToZip4>'.$this->order['ShippingZip4'].'</ToZip4>
+			<WeightInOunces>'.$WeightInOunces.'</WeightInOunces>
+			<ServiceType>'.$this->order['ShippingService'].'</ServiceType>
+			<ImageType>PDF</ImageType>
+			<LabelDate>'.date('m/d/Y',time()).'</LabelDate>
+			<CustomerRefNo></CustomerRefNo>
+			<AddressServiceRequested></AddressServiceRequested>
+			<SenderName></SenderName><SenderEMail></SenderEMail>
+			<RecipientName></RecipientName>
+			<RecipientEMail></RecipientEMail>
+			';
+
+			$api_query = 'DeliveryConfirmationV3';
+			$xml_request = 'DeliveryConfirmationV3.0Request';
+		}
+		else {
+
+			// International Order(s)
+			$shipping_service = strtolower($this->order['ShippingService']);
+
+		    $base_request = '<Option/>
+		    <ImageParameters/>
+		    <FromFirstName>'.$this->store_first_name.'</FromFirstName>
+		    <FromLastName>'.$this->store_last_name.'</FromLastName>
+		    <FromFirm>'.$this->company_name.'</FromFirm>
+		    <FromAddress1>'.$this->store_address1.'</FromAddress1>
+		    <FromAddress2>'.$this->store_address2.'</FromAddress2>
+		    <FromCity>'.$this->store_city.'</FromCity>
+		    <FromState>'.$this->store_state.'</FromState>
+		    <FromZip5>'.$this->store_zip5.'</FromZip5>
+		    <FromPhone>'.$this->PhoneClean($this->store_phone).'</FromPhone>
+		    <ToName>'.$this->order['FirstName'].' '.$this->order['LastName'].'</ToName>
+		    <ToFirm>'.$this->order['ShippingCompany'].'</ToFirm>
+		    <ToAddress1></ToAddress1>
+		    <ToAddress2>'.$this->order['ShippingAddress2'].'</ToAddress2>
+		    <ToAddress3>'.$this->order['ShippingAddress1'].'</ToAddress3>
+		    <ToCity>'.$this->order['ShippingCity'].'</ToCity>';
+		    if ( $this->order['ShippingProvince'] != '' ) {
+		    	$base_request.='
+		    	<ToProvince>'.$this->order['ShippingProvince'].'</ToProvince>';
+		    }
+		    $base_request.='
+		    <ToCountry>'.$this->countries[$this->order['ShippingCountry']].'</ToCountry>
+		    <ToPostalCode>'.$this->order['ShippingZip'].'</ToPostalCode>
+		    <ToPOBoxFlag>N</ToPOBoxFlag>
+		    <ToPhone>'.$this->PhoneClean($this->order['ShippingPhone']).'</ToPhone>
+		    <ToFax>'.$this->PhoneClean($this->order['ShippingFax']).'</ToFax>
+		    <ToEmail>'.$this->order['Email'].'</ToEmail>
+		    <ShippingContents>';
+
+		    // add items
+			foreach ( $this->order['Items'] as $k => $value ) {
+				 $base_request.='
+				 <ItemDetail>
+					<Description>Computer Parts</Description>
+					<Quantity>'.$value['Qty'].'</Quantity>
+					<Value>'.($value['Price'] * $value['Qty']).'</Value>
+					<NetPounds>'.$value['NetPounds'].'</NetPounds>
+					<NetOunces>'.$value['NetOunces'].'</NetOunces>
+					<HSTariffNumber>123456</HSTariffNumber>
+					<CountryOfOrigin>United States</CountryOfOrigin>
+				 </ItemDetail>';
+			}
+		    // end add items
+
+		    $base_request.='
+		    </ShippingContents>
+		    <GrossPounds>'.$this->pounds.'</GrossPounds>
+		    <GrossOunces>'.$this->ounces.'</GrossOunces>
+		    <ContentType>MERCHANDISE</ContentType>
+		    <Agreement>Y</Agreement>
+		    <InvoiceNumber>'.$this->order['InvoiceNumber'].'</InvoiceNumber>
+		    <ImageType>PDF</ImageType>
+		    <ImageLayout>ALLINONEFILE</ImageLayout>
+		    <LabelDate>'.date('m/d/Y',time()).'</LabelDate>
+		    ';
+
+			if ( ereg('express', $shipping_service) ) {
+				$xml_request = 'ExpressMailIntlRequest';
+				$api_query = 'ExpressMailIntl';
+			}
+			elseif ( ereg('priority', $shipping_service) ) {
+				$xml_request = 'PriorityMailIntlRequest';
+				$api_query = 'PriorityMailIntl';
+			}
+			else {
+				$xml_request = 'FirstClassMailIntlRequest';
+				$api_query = 'FirstClassMailIntl';
+			}
+		}
+
+		$request.= '<'.$xml_request.' USERID="'.$this->usps_userid.'">';
+		$request.= $base_request;
+		$request.= '</'.$xml_request.'>';
+
+		// die($request);
+
+		$request = 'API='.$api_query.'&XML='.urlencode($request);
+
+		$body = $this->PostQuery($request, 1);
+
+		// check for errors
+		if (strpos($body, '<Error>') !== false) {
+			$errors = Array ();
+			preg_match_all('/<Number>(.*?)<\/Number>/s', $body, $error_numbers);
+			preg_match_all('/<Description>(.*?)<\/Description>/s', $body, $error_descriptions);
+
+			foreach ($error_numbers[1] as $index => $error_number) {
+				$errors[$index] = Array ('error_number' => $error_number, 'error_description' => $error_descriptions[1][$index]);
+			}
+
+			// TODO: find a way to return other error messages in same package as well
+			return $errors[0];
+		}
+
+		// parse response
+		$xml_helper =& $this->Application->recallObject('kXMLHelper');
+		$root_node =& $xml_helper->Parse($body);
+		/* @var $root_node kXMLNode */
+		$Postage = 0;
+
+		$label_file = $TrackingNumber = $PostnetBarCode = '';
+
+		// Domestic shipping
+		if ($this->order['ShippingCountry'] == $this->shipping_origin_country ) {
+			$delivery_node =& $root_node->FindChild('DeliveryConfirmationV3.0Response');
+			do {
+				$TrackingNumber = $delivery_node->FindChildValue('DeliveryConfirmationNumber');
+				$PostnetBarCode = $delivery_node->FindChildValue('Postnet');
+				$DeliveryConfirmationLabel = base64_decode($delivery_node->FindChildValue('DeliveryConfirmationLabel'));
+			}
+			while ( $delivery_node =& $delivery_node->NextSibling());
+		}
+		else {
+
+			if ( ereg('express', $shipping_service) ) {
+				$node_title = 'ExpressMailIntlResponse';
+			}
+			elseif ( ereg('priority', $shipping_service) ) {
+				$node_title = 'PriorityMailIntlResponse';
+			}
+			else {
+ 				$node_title = 'FirstClassMailIntlResponse';
+			}
+
+			$delivery_node =& $root_node->FindChild($node_title);
+			$PostnetBarCode = $delivery_node->FindChildValue('BarcodeNumber');
+			$Postage = $delivery_node->FindChildValue('Postage');
+			$DeliveryConfirmationLabel = base64_decode($delivery_node->FindChildValue('LabelImage'));
+
+		}
+
+		if ( $TrackingNumber != '' ) {
+			$label_file = USPS_LABEL_FOLDER.$TrackingNumber.".pdf";
+		}
+		elseif ( $PostnetBarCode != '' ) {
+			$label_file = USPS_LABEL_FOLDER.$PostnetBarCode.".pdf";
+		}
+
+		if ( $label_file != '' ) {
+			if (!$handle = fopen($label_file, 'a')) echo "Cannot open file ($label_file)";
+			if ( @fwrite($handle, $DeliveryConfirmationLabel) === FALSE) echo "Cannot write to file ($label_file)";
+		}
+
+		return array('TrackingNumber' => $TrackingNumber, 'PostnetBarCode' => $PostnetBarCode, 'Postage' => $Postage);
+	}
+
+	function GetUSPSCountry($country)
+	{
+		$country = $this->Application->Conn->GetOne('SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = '.$this->Application->Conn->qstr($country));
+		if ( $country == '' ) $country = 'US';
+		return $country;
+	}
+
+	function GetShippingQuotes($params = null)
+	{
+		$weights = Kg2Pounds($params['packages']['0']['weight']);
+		$weight = '';
+		$weight = $weights[0];
+		if ( $weights[1] != '' ) {
+			$weight.='.'.$weights[1];
+		}
+		$country = $this->GetUSPSCountry($params['dest_country']);
+
+		$this->order = Array();
+		$this->order['ShippingWeight'] = $weight;
+		$this->order['ShippingNumBoxes'] = 1;
+		$this->order['ShippingZip'] = $params['dest_postal'];
+		$this->order['SubTotal'] = $params['amount'];
+		$this->order['ShippingCountry'] = $country;
+
+		$shipping_types = Array();
+		$rates = $this->GetQuote();
+
+		if ( !isset($rates['error']) ) {
+			$this->Application->RemoveVar('usps_errors');
+
+			$i = 1;
+			foreach ($rates as $k => $rate ) {
+				 $shipping_types['USPS_'.$i] = Array(
+		            'ShippingId' => 'USPS_'.$i,
+		            'TotalCost' => $rate['Rate'],
+		            'ShippingName' => $rate['Title'],
+		            'Type' => '1',
+		            'CODFlat' => '0',
+		            'CODPercent' => '0',
+		            'PortalGroups' => ',15,',
+		            'InsuranceFee' => '',
+		            'COD' => '0',
+		            'SelectedOnly' => '0',
+		            'Code' => $rate['Title']
+				 );
+				 $i++;
+			}
+		}
+		else {
+			// for Front-End (shipping screen) and Admin (Shipping Tab on editing order)
+			$this->Application->StoreVar('usps_errors', $rates['error']);
+		}
+
+		$this->Application->StoreVar('current_usps_shipping_types', serialize($shipping_types));
+		return $shipping_types;
+	}
+
+	function TrackOrder($TrackingNumber='')
+	{
+		if ( $TrackingNumber != '' ) {
+			// http://testing.shippingapis.com/ShippingAPITest.dll?API=TrackV2&XML=<TrackFieldRequest USERID="402INTEC7634"><TrackID ID="EJ958083578US"></TrackID></TrackFieldRequest>
+
+			$request = '<TrackRequest USERID="'.$this->usps_userid.'"><TrackID ID="'.$TrackingNumber.'"></TrackID></TrackRequest>';
+			$api_query = 'TrackV2';
+			$request = 'API='.$api_query.'&XML='.urlencode($request);
+			$body = $this->PostQuery($request);
+
+			// check for errors
+			if (strpos($body, '<Error>') !== false) {
+				$errors = Array ();
+				preg_match_all('/<Number>(.*?)<\/Number>/s', $body, $error_numbers);
+				preg_match_all('/<Description>(.*?)<\/Description>/s', $body, $error_descriptions);
+
+				foreach ($error_numbers[1] as $index => $error_number) {
+					$errors[$index] = $error_descriptions[1][$index];
+					if ($this->Application->isDebugMode()) {
+						$errors[$index] .= ' (' . $error_number . ')';
+					}
+				}
+
+				$errors = array_unique($errors); // we may have same errors on many packages, so don't show duplicates
+				return Array('error' => implode('<br/>', $errors));
+			}
+
+
+
+
+
+			$xml_helper =& $this->Application->recallObject('kXMLHelper');
+			$root_node =& $xml_helper->Parse($body);
+			/* @var $root_node kXMLNode */
+
+			// Tracking Shipping
+			$delivery_node =& $root_node->FindChild('TrackInfo');
+			$TrackSummary = $delivery_node->FindChildValue('TrackSummary');
+			// echo ' TrackSummary ('.$TrackingNumber.') = '.$TrackSummary.'<br>';
+			return ereg('delivered', $TrackSummary) ? 1 : 0 ;
+		}
+		else
+			return false;
+	}
+
+	function ProcessTrackOrders()
+	{
+		$sql = sprintf('SELECT `OrderId`, `ShippingTracking` FROM %s WHERE `Status` > 3 AND `Delivered` = 0', TABLE_PREFIX.'Orders');
+		$orders = $this->Application->Conn->Query($sql);
+		foreach ( $orders as $k => $order ) {
+			// try to track order
+			if ( $order['ShippingTracking'] != '' && $this->TrackOrder($order['ShippingTracking']) ) {
+				$update_order = sprintf("UPDATE %s SET `Delivered` = 1 WHERE %s = %s",
+					TABLE_PREFIX.'Orders',
+					$this->Application->getUnitOption('ord', 'IDField'),
+					$order[$this->Application->getUnitOption('ord', 'IDField')]
+				);
+				$this->Application->Conn->Query($update_order);
+			}
+		}
+	}
+
+	function PostQuery($request, $secure=0)
+	{
+		switch (MODULE_SHIPPING_USPS_SERVER) {
+			case 'production':
+				$usps_server = $secure > 0 ? 'https://secure.shippingapis.com' : 'http://production.shippingapis.com' ;
+			    $api_dll = 'ShippingAPI.dll';
+			break;
+
+			case 'test':
+				$usps_server = $secure > 0 ? 'https://secure.shippingapis.com' : 'http://testing.shippingapis.com';
+				$api_dll = 'ShippingAPITest.dll';
+			break;
+		}
+
+		$curl = curl_init();
+		curl_setopt($curl, CURLOPT_URL, $usps_server.'/'.$api_dll.'?'.$request);
+		curl_setopt($curl, CURLOPT_HEADER, 0);
+		curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
+		$body = curl_exec($curl);
+		curl_close($curl);
+
+		// echo ' body is <br>';
+		// echo $body;
+
+		if (defined('USPS_LOG_FILE')) {
+			$filename = USPS_LOG_FILE;
+	      	if ( !$fp = fopen($filename, "a") ) echo("Failed opening file $filename");
+		}
+	   	$request_url = sprintf("Date %s : IP %s\n\nPost\n\n%s\n\nReplay\n\n%s\n\n",
+	   		date("m/d/Y H:i:s",time()),
+	   		$_SERVER['REMOTE_ADDR'],
+	   		$usps_server.'/'.$api_dll.'?'.urldecode($request),
+	   		$body
+	   	);
+		if (defined('USPS_LOG_FILE')) {
+	        if (!fwrite($fp, $request_url)) echo("Failed writing to file $filename");
+	        fclose($fp);
+		}
+		return $body;
+	}
+
+	function GetAvailableTypes()
+	{
+		return array();
+		$conn =& $this->Application->GetADODBConnection();
+		$types = $conn->Query('SELECT * FROM '.TABLE_PREFIX.'ShippingType');
+
+		$ret = array();
+		foreach ($types as $a_type) {
+			$a_type['_ClassName'] = get_class($this);
+			$a_type['_Id'] = 'CUST_'.$a_type['ShippingID'];
+			$a_type['_Name'] = '(Custom) '.$a_type['Name'];
+			$ret[] = $a_type;
+		}
+		return $ret;
+
+	}
+
+	function LoadParams()
+	{
+		$sql = 'SELECT Properties FROM '.$this->Application->getUnitOption('sqe', 'TableName').'
+				WHERE ClassName="USPS"';
+		$db =& $this->Application->GetADODBConnection();
+		return unserialize($db->GetOne($sql));
+	}
+
+	function _prepare_xml_param($value) {
+		return strip_tags($value);
+	}
+
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/shipping_quote_engines/usps.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.3
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/shipping_quote_engines/shipping_quote_engines_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/shipping_quote_engines/shipping_quote_engines_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/shipping_quote_engines/shipping_quote_engines_config.php	(revision 12131)
@@ -0,0 +1,134 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+$config	=	Array(
+					'Prefix'			=>	'sqe',
+					'ItemClass'			=>	Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'ShippingQuoteEngineEventHandler','file'=>'shipping_quote_engine_event_handler.php','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
+					'RegisterClasses'	=>	Array(
+												Array('pseudo'=>'ShippingQuoteEngine','class'=>'ShippingQuoteEngine','file'=>'shipping_quote_engine.php','build_event'=>''),
+												Array('pseudo'=>'CustomShippingQuoteEngine','class'=>'CustomShippingQuoteEngine','file'=>'custom_shipping_quote_engine.php','build_event'=>''),
+												Array('pseudo'=>'Intershipper','class'=>'Intershipper','file'=>'intershipper.php','build_event'=>''),
+												Array('pseudo'=>'USPS','class'=>'USPS','file'=>'usps.php','build_event'=>''),
+												Array('pseudo'=>'ShippingQuoteCollector','class'=>'ShippingQuoteCollector','file'=>'shipping_quote_collector.php','build_event'=>'','require_classes'=>'ShippingQuoteEngine'),
+											),
+					'AutoLoad'			=>	true,
+					'Hooks'				=>	Array(
+											),
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'page',
+												3	=>	'event',
+												4	=>	'mode',
+											),
+					'IDField'			=>	'EngineId',
+					'StatusField'		=>	Array('Status'),
+					'TitleField'		=>  'Name',
+
+					'TitlePresets'		=>	Array(
+												'default'	=>	Array(	'edit_status_labels'	=> Array('sqe'=>'!la_title_EditingShippingQuoteEngine!'),
+																),
+												'engine_list'=>Array(		'prefixes'				=> Array('sqe_List'),
+																			'format'				=>	"!la_title_ShippingQuoteEngines!",
+																),
+												'engine_edit'=>Array(		'prefixes'				=> Array('sqe'),
+																			'format'				=> "#sqe_status# '#sqe_titlefield#' - !la_title_General!",
+																),
+											),
+
+					'PermSection'		=>	Array('main' => 'in-commerce:shipping_quote_engines'),
+
+					'Sections'			=>	Array(
+						'in-commerce:shipping_quote_engines'	=>	Array(
+							'parent'		=>	'in-commerce:shipping_folder',
+							'icon'			=>	'shipping',
+							'label'			=>	'la_tab_ShippingQuoteEngines',
+							'url'			=>	Array('t' => 'in-commerce/shipping/shipping_list', 'pass' => 'm'),
+							'permissions'	=>	Array('view', 'edit', 'advanced:approve', 'advanced:decline'),
+							'priority'		=>	4.2,
+							'type'			=>	stTAB,
+						),
+					),
+
+					'TableName'			=>	TABLE_PREFIX.'ShippingQuoteEngines',
+
+					'FilterMenu'		=>	Array(
+												'Groups' => Array(
+													Array('mode' => 'AND', 'filters' => Array('show_active','show_disabled'), 'type' => WHERE_FILTER),
+												),
+												'Filters' => Array(
+													'show_active'	=>	Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
+													'show_disabled'	=>	Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0'  ),
+												)
+											),
+
+					'ListSQLs'			=>	Array(	''=>	'SELECT * FROM %s'),
+																		 // key - special, value - list select sql
+					'ItemSQLs'			=>	Array(	''=>	'SELECT * FROM %s'),
+
+					'ListSortings'	=> 	Array(
+																'' => Array(
+																	'Sorting' => Array('Name' => 'asc'),
+																)
+															),
+					'Fields' => Array(
+							            'EngineId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+							            'Name' => Array('type' => 'string','not_null' => '1','default' => ''),
+							            'FlatSurcharge' => Array('type' => 'double','not_null' => '1','default' => '0'),
+							            'PercentSurcharge' => Array('type' => 'double','not_null' => '1','default' => '0'),
+							            'Status' => Array('type' => 'int','not_null' => 1, 'default' => 0),
+							            'Properties' => Array('type' => 'string','not_null' => '1','default' => ''),
+							            'ClassName' => Array('type' => 'string','not_null' => '1','default' => ''),
+							        ),
+
+					'VirtualFields' => Array(
+											'AccountLogin'		=>	Array('type' => 'string', 'not_null' => '1', 'default' => ''),
+											'AccountPassword'	=>	Array('type' => 'string', 'not_null' => '1', 'default' => ''),
+											'UPSEnabled'		=>	Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'Enabled', 0 => 'Disabled')),
+											'UPSAccount'		=>	Array('type' => 'string', 'not_null' => '1', 'default' => ''),
+											'UPSInvoiced'		=>	Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'Invoiced', 0 => 'NotInvoiced')),
+											'FDXEnabled'		=>	Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'Enabled', 0 => 'Disabled')),
+											'FDXAccount'		=>	Array('type' => 'string', 'not_null' => '1', 'default' => ''),
+											'FDXInvoiced'		=>	Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'Invoiced', 0 => 'NotInvoiced')),
+											'DHLEnabled'		=>	Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'Enabled', 0 => 'Disabled')),
+											'DHLAccount'		=>	Array('type' => 'string', 'not_null' => '1', 'default' => ''),
+											'DHLInvoiced'		=>	Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'Invoiced', 0 => 'NotInvoiced')),
+											'USPEnabled'		=>	Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'Enabled', 0 => 'Disabled')),
+											'USPAccount'		=>	Array('type' => 'string', 'not_null' => '1', 'default' => ''),
+											'USPInvoiced'		=>	Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'Invoiced', 0 => 'NotInvoiced')),
+											'ARBEnabled'		=>	Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'Enabled', 0 => 'Disabled')),
+											'ARBAccount'		=>	Array('type' => 'string', 'not_null' => '1', 'default' => ''),
+											'ARBInvoiced'		=>	Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'Invoiced', 0 => 'NotInvoiced')),
+											'1DYEnabled'		=>	Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'Enabled', 0 => 'Disabled')),
+											'2DYEnabled'		=>	Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'Enabled', 0 => 'Disabled')),
+											'3DYEnabled'		=>	Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'Enabled', 0 => 'Disabled')),
+											'GNDEnabled'		=>	Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'Enabled', 0 => 'Disabled')),
+											'ShipMethod'		=>	Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array('DRP' => 'Drop-Off At Carrier Location', 'PCK' => 'Schedule A Special Pickup', 'SCD' => 'Regularly Scheduled Pickup')),
+										),
+					'Grids'	=> Array(
+								'Default'		=>	Array(
+																	'Icons' => Array('default'=>'icon16_shipping.gif', 0=>'icon16_shipping_disabled.gif', 1=>'icon16_shipping.gif'),
+																	'Fields' => Array(
+																				'EngineId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+																				'Name' => Array( 'title'=>'la_col_ShippingQuoteEngineName', 'filter_block' => 'grid_like_filter'),
+																				'FlatSurcharge' => Array( 'title'=>'la_col_FlatSurcharge', 'filter_block' => 'grid_float_range_filter'),
+																				'PercentSurcharge' => Array( 'title'=>'la_col_PercentSurcharge', 'filter_block' => 'grid_float_range_filter'),
+																			),
+
+																),
+													),
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/shipping_quote_engines/shipping_quote_engines_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.8.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/shipping_quote_engines/intershipper.php
===================================================================
--- branches/5.1.x/in-commerce/units/shipping_quote_engines/intershipper.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/shipping_quote_engines/intershipper.php	(revision 12131)
@@ -0,0 +1,504 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class Intershipper extends ShippingQuoteEngine {
+
+	var $state = Array();
+	var $quote = Array();
+	var $quotes = Array();
+	var $package_id;
+	var $box_id;
+	var $shipment_id;
+
+	var $FlatSurcharge = 0;
+	var $PercentSurcharge = 0;
+
+	function _stripTags($params)
+	{
+		foreach ($params as $param_name => $param_value) {
+			if (is_array($param_value)) {
+				$params[$param_name] = $this->_stripTags($param_value);
+			}
+			else {
+				$params[$param_name] = strip_tags($param_value);
+			}
+		}
+
+		return $params;
+	}
+
+	function BuildUrl($params = null)
+	{
+		$params = $this->_stripTags($params);
+
+		$this->shipment_id = isset($params['shipment_id']) ? $params['shipment_id'] : $this->GenerateId();
+		$url = 'www.intershipper.com/Interface/Intershipper/XML/v2.0/HTTP.jsp';
+		$uri =	'Username='.			$params['AccountLogin'].
+				'&Password='.			$params['AccountPassword'].
+				'&Version='.			'2.0.0.0'.
+				'&ShipmentID='.			$this->shipment_id.
+				'&QueryID='.			$this->shipment_id.
+				'&TotalCarriers='.		count($params['carriers']);
+
+		$i = 0;
+		foreach($params['carriers'] as $carrier)
+		{
+			$i++;
+			$uri .= '&CarrierCode'.$i.'='.	rawurlencode($carrier['name']).
+			'&CarrierAccount'.$i.'='.		rawurlencode($carrier['account']).
+			'&CarrierInvoiced'.$i.'='.		$carrier['invoiced'];
+		}
+
+		$uri .= '&TotalClasses='.	count($params['classes']);
+		$i = 0;
+		foreach($params['classes'] as $class)
+		{
+			$i++;
+			$uri .= '&ClassCode'.$i.'='.	$class;
+		}
+		$uri .= '&DeliveryType='.	'COM'.
+			'&ShipMethod='.			$params['ShipMethod'].
+
+			'&OriginationName='.	rawurlencode( $params['orig_name'] ).
+			'&OriginationAddress1='.rawurlencode( $params['orig_addr1'] ).
+			'&OriginationAddress2='.rawurlencode( $params['orig_addr2'] ).
+			'&OriginationCity='.	rawurlencode( $params['orig_city'] ).
+			'&OriginationState='.	rawurlencode( $params['orig_state'] ).
+			'&OriginationPostal='.	rawurlencode( $params['orig_postal'] ).
+			'&OriginationCountry='.	rawurlencode( $params['orig_country'] ).
+
+			'&DestinationName='.	rawurlencode( $params['dest_name'] ).
+			'&DestinationAddress1='.rawurlencode( $params['dest_addr1'] ).
+			'&DestinationAddress2='.rawurlencode( $params['dest_addr2'] ).
+			'&DestinationCity='.	rawurlencode( $params['dest_city'] ).
+			'&DestinationState='.	rawurlencode( $params['dest_state'] ).
+			'&DestinationPostal='.	rawurlencode( $params['dest_postal'] ).
+			'&DestinationCountry='.	rawurlencode( $params['dest_country'] ).
+
+			'&Currency='.			'USD'.
+			'&TotalPackages='.		count($params['packages']);
+
+		$i = 0;
+		foreach($params['packages'] as $package)
+		{
+			$i++;
+			$uri .=	'&BoxID'.$i.'='.	urlencode( $package['package_key'] ).
+			'&Weight'.$i.'='.			$package['weight'].
+			'&WeightUnit'.$i.'='.		$package['weight_unit'].
+			'&Length'.$i.'='.			$package['length'].
+			'&Width'.$i.'='.			$package['width'].
+			'&Height'.$i.'='.			$package['height'].
+			'&DimensionalUnit'.$i.'='.	$package['dim_unit'].
+			'&Packaging'.$i.'='.		$package['packaging'].
+			'&Contents'.$i.'='.			$package['contents'].
+			'&Insurance'.$i.'='.		$package['insurance'];
+		}
+
+		return Array('url' => $url, 'uri' => $uri);
+	}
+
+	function MergeParams($custom_params)
+	{
+		$params = $this->LoadParams();
+		$db = $this->Application->GetADODBConnection();
+
+		$this->FlatSurcharge = $params['FlatSurcharge'];
+		$this->PercentSurcharge = $params['PercentSurcharge'];
+
+		if($custom_params['carriers'])
+		{
+			$params['carriers'] = $custom_params['carriers'];
+		}
+		else
+		{
+			$carrier_codes = Array('UPS', 'FDX', 'DHL', 'USP', 'ARB');
+			$i = 0;
+			foreach($carrier_codes as $carrier)
+			{
+				if(isset($params[$carrier.'Enabled']) && $params[$carrier.'Enabled'])
+				{
+					$i++;
+					$params['carriers'][$i]['name'] = $carrier;
+					$params['carriers'][$i]['account'] = $params[$carrier.'Account'];
+					$params['carriers'][$i]['invoiced'] = (int) $params[$carrier.'Invoiced'];
+				}
+			}
+		}
+
+		if($custom_params['classes'])
+		{
+			$params['classes'] = $custom_params['classes'];
+		}
+		else
+		{
+			$classes = Array('1DY', '2DY', '3DY', 'GND');
+			foreach($classes as $class)
+			{
+				if(isset($params[$class.'Enabled']) && $params[$class.'Enabled'])
+				{
+					$params['classes'][] = $class;
+				}
+			}
+		}
+
+		if(isset($custom_params['orig_addr1']))
+		{
+			$params['orig_name']		=	$custom_params['orig_name'];
+			$params['orig_addr1']		=	$custom_params['orig_addr1'];
+			$params['orig_addr2']		=	$custom_params['orig_addr2'];
+			$params['orig_city']		=	$custom_params['orig_city'];
+			$params['orig_state']		=	$custom_params['orig_state'];
+			$params['orig_postal']		=	$custom_params['orig_postal'];
+			$params['orig_country']		=	$custom_params['orig_country'];
+		}
+		else
+		{
+			$params['orig_name']		=	$this->Application->ConfigValue('Comm_StoreName');
+			$params['orig_addr1']		=	$this->Application->ConfigValue('Comm_Shipping_AddressLine1');
+			$params['orig_addr2']		=	$this->Application->ConfigValue('Comm_Shipping_AddressLine2');
+			$params['orig_city']		=	$this->Application->ConfigValue('Comm_Shipping_City');
+			$params['orig_state']		=	$this->Application->ConfigValue('Comm_Shipping_State');
+			$params['orig_postal']		=	$this->Application->ConfigValue('Comm_Shipping_ZIP');
+			$params['orig_country']		=	$this->Application->ConfigValue('Comm_Shipping_Country');
+		}
+		if( mb_strlen($params['orig_country']) == 3)
+		{
+			$sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = "'.$params['orig_country'].'"';
+			$params['orig_country'] = $db->GetOne($sql);
+		}
+		if( mb_strlen($params['orig_state']) != 2)
+		{
+			$sql = '	SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations
+						WHERE DestName = "'.$params['orig_state'].'"';
+			$params['orig_state'] = $db->GetOne($sql);
+		}
+
+		if(isset($custom_params['ShipMethod']))
+		{
+			$params['ShipMethod']		=	$custom_params['ShipMethod'];
+		}
+
+		$params['packages']			=	$custom_params['packages'];
+
+		$params['dest_name']		=	$custom_params['dest_name'];
+		$params['dest_addr1']		=	$custom_params['dest_addr1'];
+		$params['dest_addr2']		=	$custom_params['dest_addr2'];
+		$params['dest_city']		=	$custom_params['dest_city'];
+		$params['dest_state']		=	$custom_params['dest_state'];
+		$params['dest_postal']		=	$custom_params['dest_postal'];
+		$params['dest_country']		=	$custom_params['dest_country'];
+		if( mb_strlen($params['dest_country']) == 3)
+		{
+			$sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = "'.$params['dest_country'].'"';
+			$params['dest_country'] = $db->GetOne($sql);
+		}
+
+		if(!$params['dest_city'] || !$params['dest_country'] ||
+				(($params['dest_country'] == 'US' || $params['dest_country'] == 'CA') && !$params['dest_state']) ||
+				!$params['dest_postal'] || !$params['packages'])
+		{
+			$valid = false;
+		}
+		else
+		{
+			$valid = true;
+		}
+
+		return $valid ? $params : false;
+	}
+
+	function GenerateId()
+	{
+		static $id;
+		if(!$id)
+		{
+			$id = rand(0, 1000000);
+		}
+		return $id;
+	}
+
+	function getShipmentId()
+	{
+		return $this->shipment_id;
+	}
+
+	function GetShippingQuotes($params = null)
+	{
+		if(!is_array($params)) $params = unserialize($params);
+		$params = $this->MergeParams($params);
+
+//		print_pre($params);
+
+		if($params == false)
+		{
+			trigger_error('Incorrect params given to <em>intershipper</em> engine', E_USER_WARNING);
+			return;
+		}
+
+		$target_url = $this->BuildUrl($params);
+		// print_r($target_url);
+
+		$depth = Array();
+
+		$xml_parser = xml_parser_create();
+		xml_set_element_handler( $xml_parser, Array(&$this, 'startElement'), Array(&$this, 'endElement') );
+		xml_set_character_data_handler( $xml_parser, Array(&$this, 'characterData') );
+
+		$newdata = curl_post($target_url['url'], $target_url['uri']);
+
+ 		$newdata = substr($newdata, strpos($newdata, '<'));
+
+		if (!xml_parse($xml_parser, $newdata, 1)) {
+    	    trigger_error(sprintf('XML error: %s at line %d'),
+			xml_error_string(xml_get_error_code($xml_parser)),
+			xml_get_current_line_number($xml_parser), E_USER_WARNING);
+		}
+
+		xml_parser_free($xml_parser);
+
+		return array_shift($this->quotes);		// array_shift must be removed after!!!
+	}
+
+	function startElement(&$Parser, &$Elem, $Attr)
+	{
+		array_push($this->state, $Elem);
+		$states = implode(' ',$this->state);
+		//check what state we are in
+		if($states == 'SHIPMENT PACKAGE') {
+			$this->package_id = $Attr['ID'];
+		}
+		elseif($states == 'SHIPMENT PACKAGE QUOTE') {
+			$quote = Array('package_id' => $this->package_id, 'id' => $Attr['ID']);
+		}
+	}
+
+	function characterData($Parser, $Line)
+	{
+		$states = join (' ',$this->state);
+		switch($states)
+		{
+			case 'SHIPMENT ERROR':
+				trigger_error($error = $Line, E_USER_WARNING);
+			break;
+			case 'SHIPMENT SHIPMENTID':
+				$this->shipment_id = $Line;
+			break;
+			case 'SHIPMENT PACKAGE BOXID':
+				$this->box_id = $Line;
+			break;
+		  	case 'SHIPMENT PACKAGE QUOTE CARRIER NAME':
+				$this->quote['carrier_name'] = $Line;
+			break;
+			case 'SHIPMENT PACKAGE QUOTE CARRIER CODE':
+				$this->quote['carrier_code'] = $Line;
+			break;
+			case 'SHIPMENT PACKAGE QUOTE CLASS NAME':
+				$this->quote['class_name'] = $Line;
+			break;
+			case 'SHIPMENT PACKAGE QUOTE CLASS CODE':
+				$this->quote['class_code'] = $Line;
+			break;
+			case 'SHIPMENT PACKAGE QUOTE SERVICE NAME':
+				$this->quote['service_name'] = $Line;
+			break;
+			case 'SHIPMENT PACKAGE QUOTE SERVICE CODE':
+				$this->quote['service_code'] = $Line;
+			break;
+			case 'SHIPMENT PACKAGE QUOTE RATE AMOUNT':
+				$this->quote['amount'] = $Line / 100;
+			break;
+			default:
+		}
+	}
+
+	function endElement($Parser, $Elem)
+	{
+		$states = implode(' ',$this->state);
+		if ($states == 'SHIPMENT PACKAGE QUOTE') {
+			unset($this->quote['id']);
+			unset($this->quote['package_id']);
+			// the $key is a combo of the carrier_code and service_code
+			// this is the logical way to key each quote returned
+
+			$this->quote['amount'] = $this->quote['amount']*(1+$this->PercentSurcharge/100) + $this->FlatSurcharge;
+
+			$amount_plain = $this->quote['amount'] * 100;
+			$key = 'INTSH_'.$this->quote['carrier_code'].'_'.$this->quote['class_code'].'_'.$amount_plain;
+			$this->quote['ShippingId'] = $key;
+			$this->quote['ShippingName'] = $this->quote['carrier_code'].' - '.$this->quote['service_name'];
+			$this->quote['TotalCost'] = $this->quote['amount'];
+			$this->quotes[$this->box_id][$key] = $this->quote;
+
+		}
+		array_pop($this->state);
+	}
+
+	function LoadParams()
+	{
+		$sql = 'SELECT Properties, FlatSurcharge, PercentSurcharge FROM '.$this->Application->getUnitOption('sqe', 'TableName').'
+				WHERE Name="Intershipper.com"';
+		$db = $this->Application->GetADODBConnection();
+		$data = $db->GetRow($sql);
+		$params = unserialize(getArrayValue($data, 'Properties'));
+		return array_merge($params, array('FlatSurcharge' => $data['FlatSurcharge'], 'PercentSurcharge' => $data['PercentSurcharge']));
+	}
+
+	function GetAvailableTypes()
+	{
+		$params = $this->LoadParams();
+
+		$carrier_codes = Array('UPS', 'FDX', 'DHL', 'USP', 'ARB');
+		$classes = Array('1DY', '2DY', '3DY', 'GND');
+		$i = 0;
+		foreach($carrier_codes as $carrier)
+		{
+			if(isset($params[$carrier.'Enabled']) && $params[$carrier.'Enabled'])
+			{
+				foreach($classes as $class)
+				{
+					if(isset($params[$class.'Enabled']) && $params[$class.'Enabled'])
+					{
+						$a_type['_ClassName'] = get_class($this);
+						$a_type['_Id'] = 'INTSH_'.$carrier.'_'.$class;
+						$a_type['_Name'] = '(Intershipper)'.$carrier.' '.$class;
+						$ret[] = $a_type;
+					}
+				}
+			}
+		}
+		return $ret;
+	}
+
+
+}
+
+/*$params = Array(
+	'AccountLogin'		=>	'login',
+	'AccountPassword'	=>	'password',
+	'carriers'	=>	Array(
+						Array(
+							'name'		=>	'UPS',
+							'account'	=>	'',
+							'invoiced'	=>	'0'
+						),
+						Array(
+							'name'		=>	'DHL',
+							'account'	=>	'',
+							'invoiced'	=>	'0'
+						),
+						Array(
+							'name'		=>	'FDX',
+							'account'	=>	'',
+							'invoiced'	=>	'0'
+						),
+						Array(
+							'name'		=>	'USP',
+							'account'	=>	'',
+							'invoiced'	=>	'0'
+						),
+						Array(
+							'name'		=>	'ARB',
+							'account'	=>	'',
+							'invoiced'	=>	'0'
+						),
+					),
+	'classes'		=>	Array('1DY', '2DY', '3DY', 'GND'),
+
+	'ShipMethod'	=>	'DRP',
+
+	'orig_name'		=>	'John%20Smith',
+	'orig_addr1'	=>	'2275%20Union%20Road',
+	'orig_city'		=>	'Cheektowaga',
+	'orig_state'	=>	'NY',
+	'orig_postal'	=>	'14227',
+	'orig_country'	=>	'US',
+
+	// this section is required
+	'dest_name'		=>	'Vasya%20Pupkin',
+	'dest_addr1'	=>	'175%20E.Hawthorn%20pkwy.',
+	'dest_city'		=>	'Vernon%20Hills',
+	'dest_state'	=>	'IL',
+	'dest_postal'	=>	'60061',
+	'dest_country'	=>	'US',
+
+	// this section is required
+	'packages' 		=>	Array(
+		Array(
+			'package_key'	=>	'package1',
+			'weight'		=>	'50',
+			'weight_unit'	=>	'LB',
+			'length'		=>	'25',
+			'width'			=>	'15',
+			'height'		=>	'15',
+			'dim_unit'		=>	'IN',
+			'packaging'		=>	'BOX',
+			'contents'		=>	'OTR',
+			'insurance'		=>	'0'
+		),
+		Array(
+			'package_key'	=>	'package2',
+			'weight'		=>	'50',
+			'weight_unit'	=>	'LB',
+			'length'		=>	'25',
+			'width'			=>	'15',
+			'height'		=>	'15',
+			'dim_unit'		=>	'IN',
+			'packaging'		=>	'BOX',
+			'contents'		=>	'OTR',
+			'insurance'		=>	'0'
+		),
+	),
+
+	'shipment_id'	=>	1234;
+);
+*/
+
+/*
+
+Returns:
+
+$quotes = Array(
+	'package1'	=>
+		Array(
+			Array(
+				'id'	=>	'INTSH_FDX_2DY',
+				'type' => 'FDX',
+				..
+				'amount' =>	24.24,
+			)
+			Array(
+				'type' => 'FDX',
+				..
+				'amount' =>	24.24,
+			)
+		),
+	'package2'	=>
+		Array(
+			Array(
+				'id'	=>	'INTSH_FDX_3DY',
+				'type' => 'FDX',
+				..
+				'amount' =>	24.24,
+			)
+			Array(
+				'type' => 'FDX',
+				..
+				'amount' =>	24.24,
+			)
+		),
+	)
+*/
+
+
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/shipping_quote_engines/intershipper.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.8.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/shipping_quote_engines/custom_shipping_quote_engine.php
===================================================================
--- branches/5.1.x/in-commerce/units/shipping_quote_engines/custom_shipping_quote_engine.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/shipping_quote_engines/custom_shipping_quote_engine.php	(revision 12131)
@@ -0,0 +1,180 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class CustomShippingQuoteEngine extends ShippingQuoteEngine {
+
+	function GetShippingQuotes($params)
+	{
+		$db =& $this->Application->GetADODBConnection();
+		$packages = $params['packages'];
+		$default_pack = array_shift($packages);
+		$query = $this->QueryShippingCost($params['dest_country'], $params['dest_state'], $params['dest_postal'], $default_pack['weight'], $params['items'], $params['amount'], $params['shipping_type'], $params['promo_params']);
+		$shipping_types = $db->Query($query, 'ShippingId');
+
+		if (!$this->Application->IsAdmin()) {
+			$user_groups = explode(',', $this->Application->RecallVar('UserGroups'));
+			$filteres_shipping_types = array();
+			foreach ($shipping_types as $key=>$shipping_type) {
+				$shipping_type_groups = explode(',', trim($shipping_type['PortalGroups'], ','));
+				if (array_intersect($shipping_type_groups, $user_groups)) {
+					$filteres_shipping_types[$key] = $shipping_type;
+				}
+			}
+			$shipping_types = $filteres_shipping_types;
+		}
+
+		return $shipping_types;
+	}
+
+	function QueryShippingCost($user_country_abbr, $user_state_abbr, $user_zip, $weight, $items, $amount, $shipping_type=null, $promo_params)
+	{
+		$db =& $this->Application->GetADODBConnection();
+
+		$user_country_id = (int) $db->GetOne('SELECT DestId FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=1 AND DestAbbr = '.$db->qstr($user_country_abbr));
+		$user_state_id = (int) $db->GetOne('SELECT DestId FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=2 AND DestAbbr = '.$db->qstr($user_state_abbr));
+		$user_zip = (string) $user_zip;
+		$weight = (float) $weight;
+		$items = (int) $items;
+		$amount = (float) $amount;
+
+		$promo_weight = $promo_params['weight'];
+		$promo_amount = (float) $promo_params['amount'];
+		$promo_items = (float) $promo_params['items'];
+
+		if (isset($shipping_type)) $shipping_type = (int) $shipping_type;
+
+		$query = 'SELECT
+									CONCAT("CUST_", st.ShippingID) as ShippingId,
+									IF(st.Type = 4, st.BaseFee, '.# taking only base fee for handling
+										'IF (
+												st.IsFreePromoShipping = 1 AND
+												( (st.FreeShippingMinAmount != 0 AND st.FreeShippingMinAmount <= '.$amount.') OR
+												(st.Type = 1 AND '.$promo_weight.' = 0) OR
+												(st.Type = 2 AND '.$promo_items.' = 0) OR
+												(st.Type = 3 AND '.$promo_amount.' = 0)
+												), 0,
+											MIN(
+											IF(st.BaseFee IS NULL, 0, st.BaseFee) +
+											IF(st.CostType IN (1,3), IF(sc.Flat IS NULL, 0, sc.Flat), 0) +
+											IF(st.CostType IN (2,3),
+												IF(sc.PerUnit IS NULL, 0, sc.PerUnit)
+												*
+												( CASE st.Type
+													WHEN 1 THEN IF(st.IsFreePromoShipping = 1, '.$promo_weight.', '.$weight.')
+													WHEN 2 THEN IF(st.IsFreePromoShipping = 1, '.$promo_items.', '.$items.')
+													WHEN 3 THEN IF(st.IsFreePromoShipping = 1, '.$promo_amount.', '.$amount.')
+													ELSE 0 END ),
+												0)
+											)
+										)
+									) AS TotalCost,
+									st.Name as ShippingName,
+									st.Type as Type,
+									st.CODFlatSurcharge as CODFlat,
+									st.CODPercentSurcharge as CODPercent,
+									st.PortalGroups as PortalGroups,
+									IF (
+										st.InsuranceType = 1,
+										st.InsuranceFee,
+										st.InsuranceFee * '.$amount.' / 100
+									) AS InsuranceFee,
+									IF(sz.CODallowed IS NULL, 0, sz.CODallowed) AS COD,
+									st.Status = 2 as SelectedOnly,
+									st.Code
+								FROM '.TABLE_PREFIX.'ShippingType AS st '. 																#all shipping types
+								'LEFT JOIN '.TABLE_PREFIX.'ShippingBrackets AS sb	'.											#getting brackets by shipping type
+								'ON sb.ShippingTypeID = st.ShippingID	'.
+								'LEFT JOIN '.TABLE_PREFIX.'ShippingZones AS sz '.													#getting zones by shipping type
+								'ON sz.ShippingTypeID = st.ShippingID '.
+								'LEFT JOIN '.TABLE_PREFIX.'ShippingZonesDestinations AS szd	'.						#getting destinations by shipping type
+								'ON szd.ShippingZoneId = sz.ZoneID '.
+								'LEFT JOIN '.TABLE_PREFIX.'ShippingCosts AS sc	'.													#getting costs by bracket and zone
+								'ON sc.BracketId = sb.BracketId AND sc.ZoneID = sz.ZoneID '.
+								'WHERE
+									'.(isset($shipping_type) ? 'st.ShippingID = '.$shipping_type.' AND ' : '').'
+									(st.Status >= 1) '.		# enabled (1) or Selected Only (2) shipping types
+									'AND
+									(
+										'.# handlign should require brackets/zones (st.Type = 4) # handling - does not required brackets
+										# OR
+										'(
+											( st.Type IN (1,2,3,4) ) '. # bracket dependant types
+											'AND
+											'.# Zone match
+											'(	(sz.Type = 1 AND
+													(szd.StdDestId = '.$user_country_id.') '.# user country id
+												')
+												OR
+												(sz.Type = 2 AND
+													(szd.StdDestId = '.$user_state_id.') '.# user state id
+												')
+												OR
+												(sz.Type = 3 AND
+													(szd.StdDestId = '.$user_country_id.') '.# user country id
+													'AND
+													(szd.DestValue = '.$db->qstr($user_zip).') '.# user zip code
+												')
+											)
+											AND
+											'.# Bracket match
+											'( (st.Type = 1
+													AND
+												 sb.Start <= IF(st.IsFreePromoShipping = 1, '.$promo_weight.', '.$weight.') AND (sb.End > IF(st.IsFreePromoShipping = 1, '.$promo_weight.', '.$weight.') OR sb.End = -1) '.# items total weight
+												')
+												OR
+												(st.Type = 2
+													AND
+												 sb.Start <= IF(st.IsFreePromoShipping = 1, '.$promo_items.', '.$items.') AND (sb.End > IF(st.IsFreePromoShipping = 1, '.$promo_items.', '.$items.') OR sb.End = -1) '.# items total qty
+												')
+												OR
+												(st.Type = 3
+													AND
+												 sb.Start <= IF(st.IsFreePromoShipping = 1, '.$promo_amount.', '.$amount.') AND (sb.End > IF(st.IsFreePromoShipping = 1, '.$promo_amount.', '.$amount.') OR sb.End = -1) '.# items total amount
+												')
+												OR
+												st.Type = 4 '.# handling - does not depend on brackets
+											')
+											AND
+											'.# Empty costs handling
+											'( (st.ZeroIfEmpty = 0	AND (sc.Flat IS NOT NULL OR sc.PerUnit IS NOT NULL) ) '.# if no shimpent on empty - flat or perunit should be filled in
+												'OR
+												(st.ZeroIfEmpty = 1)	'.		# zero on empty - is ok (nulls will be converted in SELECT part)
+												'OR
+												(st.Type = 4) 	'.				# ignore costs for handling
+											')
+										)
+									)
+								GROUP BY st.ShippingId 			'.	# getting minimal price (possible with closest address match) for every shipping type
+								'ORDER BY TotalCost asc';
+		return $query;
+	}
+
+	function GetAvailableTypes()
+	{
+		$conn =& $this->Application->GetADODBConnection();
+		$types = $conn->Query('SELECT * FROM '.TABLE_PREFIX.'ShippingType');
+
+		$ret = array();
+		foreach ($types as $a_type) {
+			$a_type['_ClassName'] = get_class($this);
+			$a_type['_Id'] = 'CUST_'.$a_type['ShippingID'];
+			$a_type['_Name'] = '(Custom) '.$a_type['Name'];
+			$ret[] = $a_type;
+		}
+		return $ret;
+
+	}
+
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/shipping_quote_engines/custom_shipping_quote_engine.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9.2.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/shipping_quote_engines/shipping_quote_engine_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/shipping_quote_engines/shipping_quote_engine_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/shipping_quote_engines/shipping_quote_engine_event_handler.php	(revision 12131)
@@ -0,0 +1,128 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class ShippingQuoteEngineEventHandler extends kDBEventHandler {
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnBeforeItemUpdate(&$event)
+	{
+		$object =& $event->getObject();
+		if($object->GetDBField('AccountPassword') == '')
+		{
+			$sql = 'SELECT Properties FROM '.$object->TableName.'
+					WHERE EngineId = '.$object->GetDBField('EngineId');
+			$properties = unserialize( $this->Conn->GetOne($sql) );
+			$object->SetDBField('AccountPassword', $properties['AccountPassword']);
+		}
+		$properties = Array(
+							'AccountLogin'		=>	$object->GetDBField('AccountLogin'),
+							'AccountPassword'	=>	$object->GetDBField('AccountPassword'),
+							'UPSEnabled'		=>	$object->GetDBField('UPSEnabled'),
+							'UPSAccount'		=>	$object->GetDBField('UPSAccount'),
+							'UPSInvoiced'		=>	$object->GetDBField('UPSInvoiced'),
+							'FDXEnabled'		=>	$object->GetDBField('FDXEnabled'),
+							'FDXAccount'		=>	$object->GetDBField('FDXAccount'),
+							'DHLEnabled'		=>	$object->GetDBField('DHLEnabled'),
+							'DHLAccount'		=>	$object->GetDBField('DHLAccount'),
+							'DHLInvoiced'		=>	$object->GetDBField('DHLInvoiced'),
+							'USPEnabled'		=>	$object->GetDBField('USPEnabled'),
+							'USPAccount'		=>	$object->GetDBField('USPAccount'),
+							'USPInvoiced'		=>	$object->GetDBField('USPInvoiced'),
+							'ARBEnabled'		=>	$object->GetDBField('ARBEnabled'),
+							'ARBAccount'		=>	$object->GetDBField('ARBAccount'),
+							'ARBInvoiced'		=>	$object->GetDBField('ARBInvoiced'),
+							'1DYEnabled'		=>	$object->GetDBField('1DYEnabled'),
+							'2DYEnabled'		=>	$object->GetDBField('2DYEnabled'),
+							'3DYEnabled'		=>	$object->GetDBField('3DYEnabled'),
+							'GNDEnabled'		=>	$object->GetDBField('GNDEnabled'),
+							'ShipMethod'		=>	$object->GetDBField('ShipMethod'),
+							);
+		$properties = serialize($properties);
+		$object->SetDBField('Properties', $properties);
+
+		$from_country = $this->Application->ConfigValue('Comm_Shipping_Country');
+		if( mb_strlen($from_country) == 3)
+		{
+			$sql = 'SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = "'.$from_country.'"';
+			$from_country = $this->Conn->GetOne($sql);
+		}
+		if( !function_exists('curl_init') )
+		{
+			$object->FieldErrors['Status']['pseudo'] = 'curl_not_present';
+			$object->ErrorMsgs['curl_not_present'] = $this->Application->Phrase('la_error_EnableCurlFirst');
+		}
+		elseif( $object->GetDBField('Status') == 1 && (!$this->Application->ConfigValue('Comm_Shipping_City') || !$from_country ||
+			( ($from_country == 'US' || $from_country == 'CA') && !$this->Application->ConfigValue('Comm_Shipping_State') ) ||
+			!$this->Application->ConfigValue('Comm_Shipping_ZIP') ) )
+		{
+			$object->FieldErrors['Status']['pseudo'] = 'from_info_not_filled_in';
+			$object->ErrorMsgs['from_info_not_filled_in'] = $this->Application->Phrase('la_error_FillInShippingFromAddress');
+		}
+
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function iterateItems(&$event)
+	{
+//		$event->setEventParam('SkipProcessing', 1);
+		parent::iterateItems($event);
+		if($event->Name == 'OnMassApprove')
+		{
+			$event->status = erSUCCESS;
+			$event->redirect = true;
+		}
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnAfterItemLoad(&$event)
+	{
+		$object =& $event->getObject();
+		$properties = unserialize( $object->GetDBField('Properties') );
+		$object->SetDBFieldsFromHash($properties);
+	}
+
+	function OnAfterItemCreate(&$event)
+	{
+		$event->CallSubEvent('OnAnyChange');
+	}
+
+	function OnAfterItemUpdate(&$event)
+	{
+		$event->CallSubEvent('OnAnyChange');
+	}
+
+	function OnAfterItemDelete(&$event)
+	{
+		$event->CallSubEvent('OnAnyChange');
+	}
+
+	function OnAnyChange(&$event)
+	{
+		$sql = 'DELETE FROM '.TABLE_PREFIX.'Cache WHERE VarName LIKE "ShippingQuotes%"';
+		$this->Conn->Query($sql);
+	}
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/shipping_quote_engines/shipping_quote_engine_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/shipping_quote_engines/shipping_quote_engine.php
===================================================================
--- branches/5.1.x/in-commerce/units/shipping_quote_engines/shipping_quote_engine.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/shipping_quote_engines/shipping_quote_engine.php	(revision 12131)
@@ -0,0 +1,140 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class ShippingQuoteEngine extends kBase {
+
+	/**
+	 * $params = Array(
+	 *		'AccountLogin'		=>	'login',
+	 *		'AccountPassword'	=>	'pass',
+	 *		'carriers'	=>	Array(
+	 *							Array(
+	 *								'name'		=>	'UPS',
+	 *								'account'	=>	'',
+	 *								'invoiced'	=>	'0'
+	 *							),
+	 *							Array(
+	 *								'name'		=>	'DHL',
+	 *								'account'	=>	'',
+	 *								'invoiced'	=>	'0'
+	 *							),
+	 *							Array(
+	 *								'name'		=>	'FDX',
+	 *								'account'	=>	'',
+	 *								'invoiced'	=>	'0'
+	 *							),
+	 *							Array(
+	 *								'name'		=>	'USP',
+	 *								'account'	=>	'',
+	 *								'invoiced'	=>	'0'
+	 *							),
+	 *							Array(
+	 *								'name'		=>	'ARB',
+	 *								'account'	=>	'',
+	 *								'invoiced'	=>	'0'
+	 *							),
+	 *						), 
+	 *		'classes'		=>	Array('1DY', '2DY', '3DY', 'GND'),
+	 *		
+	 *		'ShipMethod'	=>	'DRP',
+	 *			
+	 *		'orig_name'		=>	'John%20Smith',
+	 *		'orig_addr1'	=>	'2275%20Union%20Road',
+	 *		'orig_city'		=>	'Cheektowaga',
+	 *		'orig_state'	=>	'NY',
+	 *		'orig_postal'	=>	'14227',
+	 *		'orig_country'	=>	'US',
+	 *		
+	 *		// this section is required
+	 *		'dest_name'		=>	'Vasya%20Pupkin',
+	 *		'dest_addr1'	=>	'175%20E.Hawthorn%20pkwy.',
+	 *		'dest_city'		=>	'Vernon%20Hills',
+	 *		'dest_state'	=>	'IL',
+	 *		'dest_postal'	=>	'60061',
+	 *		'dest_country'	=>	'US',
+	 *	
+	 *		// this section is required
+	 *		'packages' 		=>	Array(
+	 *			Array(
+	 *				'package_key'	=>	'package1',
+	 *				'weight'		=>	'50',
+	 *				'weight_unit'	=>	'LB',
+	 *				'length'		=>	'25',
+	 *				'width'			=>	'15',
+	 *				'height'		=>	'15',
+	 *				'dim_unit'		=>	'IN',
+	 *				'packaging'		=>	'BOX',
+	 *				'contents'		=>	'OTR',
+	 *				'insurance'		=>	'0'
+	 *			),
+	 *			Array(
+	 *				'package_key'	=>	'package2',
+	 *				'weight'		=>	'50',
+	 *				'weight_unit'	=>	'LB',
+	 *				'length'		=>	'25',
+	 *				'width'			=>	'15',
+	 *				'height'		=>	'15',
+	 *				'dim_unit'		=>	'IN',
+	 *				'packaging'		=>	'BOX',
+	 *				'contents'		=>	'OTR',
+	 *				'insurance'		=>	'0'
+	 *			),
+	 *		),
+	 *		
+	 *		'shipment_id'	=>	1234;
+	 *	);
+	 *
+	 * 
+	 *	Returns:
+	 *
+	 *	$quotes = Array(
+	 *		'package1'	=>	
+	 *			Array(
+	 *				Array(
+	 *					'id'	=>	'INTSH_FDX_2DY',
+	 *					'type' => 'FDX',
+	 *					..
+	 *					'amount' =>	24.24,
+	 *				)
+	 *				Array(
+	 *					'type' => 'FDX',
+	 *					..
+	 *					'amount' =>	24.24,
+	 *				)
+	 *			),
+	 *		'package2'	=>	
+	 *			Array(
+	 *				Array(
+	 *					'id'	=>	'INTSH_FDX_3DY',
+	 *					'type' => 'FDX',
+	 *	 				..
+	 *					'amount' =>	24.24,
+	 *				)
+	 *				Array(
+	 *					'type' => 'FDX',
+	 *					..
+	 *					'amount' =>	24.24,
+	 *				)
+	 *			),
+	 *		)
+	 *
+	 * @param Array $params
+	 */
+	function GetShippingQuotes($params)
+	{
+		
+	}
+
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/shipping_quote_engines/shipping_quote_engine.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/shipping_quote_engines/shipping_quote_collector.php
===================================================================
--- branches/5.1.x/in-commerce/units/shipping_quote_engines/shipping_quote_collector.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/shipping_quote_engines/shipping_quote_collector.php	(revision 12131)
@@ -0,0 +1,137 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class ShippingQuoteCollector extends ShippingQuoteEngine {
+
+	function GetShippingQuotes($params)
+	{
+		if(!$params['dest_city'] || !$params['dest_country'] ||
+				(($params['dest_country'] == 'US' || $params['dest_country'] == 'CA') && !$params['dest_state']) ||
+				!$params['dest_postal'] || !$params['packages'])
+		{
+			return Array();
+		}
+
+		$db =& $this->Application->GetADODBConnection();
+
+		$cached_var_name = 'ShippingQuotes'.crc32(serialize($params));
+		$day_ago = adodb_mktime() - 3600*24;
+		$sql = 'SELECT Data FROM '.TABLE_PREFIX.'Cache WHERE VarName = "'.$cached_var_name.'"
+				AND Cached > '.$day_ago;
+		if($shipping_types = $db->GetOne($sql))
+		{
+			return unserialize($shipping_types);
+		}
+
+		$sql = 'SELECT Classname FROM '.$this->Application->getUnitOption('sqe', 'TableName').' WHERE Status = 1';
+		$classes = $db->GetCol($sql);
+		$classes[] = 'CustomShippingQuoteEngine'; // always persists
+		$shipping_types = Array();
+		foreach($classes as $class)
+		{
+			$object =& $this->Application->recallObject($class);
+			$new_shipping_types = $object->GetShippingQuotes($params);
+			$shipping_types = array_merge($shipping_types, $new_shipping_types);
+		}
+		uasort($shipping_types, Array(&$this, 'price_sort'));
+
+		//exclude not available shipping quotes by products
+		$limit_types = unserialize($params['limit_types']);
+		if (is_array($limit_types) && !in_array('ANY', $limit_types)) {
+			if (count($limit_types) == 0) break;
+			$available_types = array();
+			foreach ($shipping_types as $a_type)
+			{
+				$include = false; //exclude by default
+				foreach ($limit_types as $limit)
+				{
+					$include = $include || preg_match("/^$limit/", $a_type['ShippingId']);
+					if ($include) break;
+				}
+				if (!$include) continue;
+				$available_types[$a_type['ShippingId']] = $a_type;
+			}
+			$shipping_types = $available_types;
+		}
+
+		//exclude Selected Products Only shipping types, not matching products
+		$available_types = array();
+		foreach ($shipping_types as $a_type) {
+			if (getArrayValue($a_type, 'SelectedOnly')) {
+				if (!is_array($limit_types) || !in_array($a_type['ShippingId'], $limit_types)) continue;
+			}
+			$available_types[$a_type['ShippingId']] = $a_type;
+		}
+		$shipping_types = $available_types;
+
+		$sql = 'DELETE FROM '.TABLE_PREFIX.'Cache WHERE VarName LIKE "ShippingQuotes%" AND Cached < '.$day_ago;
+		$db->Query($sql);
+		$sql = 'INSERT INTO '.TABLE_PREFIX.'Cache(VarName, Data, Cached)
+				VALUES("'.$cached_var_name.'", '.$db->qstr(serialize($shipping_types)).', '.adodb_mktime().')';
+		$db->Query($sql);
+		return $shipping_types;
+	}
+
+	function GetAvailableShippingTypes()
+	{
+		$db =& $this->Application->GetADODBConnection();
+		$sql = 'SELECT Classname FROM '.$this->Application->getUnitOption('sqe', 'TableName').' WHERE Status = 1';
+		$classes = $db->GetCol($sql);
+		$classes[] = 'CustomShippingQuoteEngine'; // always persists
+		$shipping_types = Array();
+		foreach($classes as $class)
+		{
+			$object =& $this->Application->recallObject($class);
+			$new_shipping_types = $object->GetAvailableTypes();
+			$shipping_types = array_merge($shipping_types, $new_shipping_types);
+		}
+		uasort($shipping_types, Array(&$this, 'SortShippingTypes'));
+
+		return $shipping_types;
+	}
+
+	function SortShippingTypes($elem1, $elem2)
+	{
+		if($elem1['_Name'] < $elem2['_Name'])
+		{
+			return -1;
+		}
+		elseif($elem1['_Name'] > $elem2['_Name'])
+		{
+			return 1;
+		}
+		else
+		{
+			return 0;
+		}
+	}
+
+	function price_sort($elem1, $elem2)
+	{
+		if($elem1['TotalCost'] < $elem2['TotalCost'])
+		{
+			return -1;
+		}
+		elseif($elem1['TotalCost'] > $elem2['TotalCost'])
+		{
+			return 1;
+		}
+		else
+		{
+			return 0;
+		}
+
+	}
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/shipping_quote_engines/shipping_quote_collector.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/product_option_combinations/product_option_combinations_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/product_option_combinations/product_option_combinations_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/product_option_combinations/product_option_combinations_event_handler.php	(revision 12131)
@@ -0,0 +1,371 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class ProductOptionCombinationsEventHandler extends kDBEventHandler{
+
+	/**
+	 * Apply custom processing to item
+	 *
+	 * @param kEvent $event
+	 */
+	function customProcessing(&$event, $type)
+	{
+		if ($type == 'after') {
+			return true;
+		}
+
+		switch ($event->Name) {
+			case 'OnCreate':
+			case 'OnUpdate':
+			$object =& $event->getObject();
+			$options = unserialize($object->GetDBField('Combination'));
+			ksort($options);
+			$object->SetDBField('CombinationCRC', crc32(serialize($options)));
+				break;
+
+			case 'OnMassDelete':
+				// delete only option combinations that has no assiciated inventory
+				$object =& $event->getObject();
+				$ids = $event->getEventParam('ids');
+				$sql = 'SELECT '.$object->IDField.'
+						FROM '.$object->TableName.'
+						WHERE 	('.$object->IDField.' IN ('.implode(',', $ids).')) AND
+								(QtyInStock = 0) AND (QtyReserved = 0) AND (QtyBackOrdered = 0) AND (QtyOnOrder = 0)';
+				$event->setEventParam('ids', $this->Conn->GetCol($sql));
+				break;
+		}
+	}
+
+	/**
+	 * GetOptionValues
+	 *
+	 * @param kEvent $event
+	 */
+	function GetOptionValues(&$event, $option_id)
+	{
+		$object =& $event->getObject();
+		if ($object->IsTempTable()) {
+			$table = $this->Application->GetTempName(TABLE_PREFIX.'ProductOptions', 'prefix:'.$event->Prefix);
+		}
+		else {
+			$table = TABLE_PREFIX.'ProductOptions';
+		}
+		$query = 'SELECT `Values` FROM '.$table.' WHERE ProductOptionId = '.$option_id;
+		return explode(',', $this->Conn->GetOne($query));
+	}
+
+	function CreateCombinations(&$event, $fields, $current_option=null)
+	{
+		$recursed = false;
+		$combination = $fields['Combination'];
+		foreach ($combination as $option_id => $option)
+		{
+			if ($option_id == $current_option || $recursed) continue;
+			if ($option == '_ANY_') {
+				$recursed = true;
+				$values = $this->GetOptionValues($event, $option_id);
+				foreach ($values as $a_value) {
+					$fields['Combination'][$option_id] = $a_value;
+					$this->CreateCombinations($event, $fields, $option_id);
+				}
+			}
+		}
+
+		if (!$recursed) {
+			$object =& $event->getObject();
+
+			$salt = $fields['Combination'];
+			ksort($salt);
+			$object->Load(crc32(serialize($salt)), 'CombinationCRC');
+			$object->SetFieldsFromHash($fields);
+			$this->customProcessing($event,'before');
+			if ($object->Loaded) { // Update if such combination already exists
+				if( $object->Update() )
+				{
+					$this->customProcessing($event,'after');
+					$event->status=erSUCCESS;
+				}
+			}
+			else {
+				if( $object->Create($event->getEventParam('ForceCreateId')) )
+				{
+					if( $object->IsTempTable() ) $object->setTempID();
+					$this->customProcessing($event,'after');
+					$event->status=erSUCCESS;
+				}
+			}
+		}
+	}
+
+	function UpdateCombinations(&$event, $fields, $current_option=null)
+	{
+		$recursed = false;
+		$combination = $fields['Combination'];
+		foreach ($combination as $option_id => $option)
+		{
+			if ($option_id == $current_option || $recursed) continue;
+			if ($option == '_ANY_') {
+				$recursed = true;
+				$values = $this->GetOptionValues($event, $option_id);
+				foreach ($values as $a_value) {
+					$fields['Combination'][$option_id] = $a_value;
+					$this->UpdateCombinations($event, $fields, $option_id);
+				}
+			}
+		}
+
+		if (!$recursed) {
+			$object =& $event->getObject();
+			$edit_id = $object->GetId();
+			$salt = $fields['Combination'];
+			ksort($salt);
+			// try to load combination by salt - if loaded, it will update the combination
+			$object->Load(crc32(serialize($salt)), 'CombinationCRC');
+			if (!$object->Loaded) {
+				$object->Load($edit_id);
+			}
+			$object->SetFieldsFromHash($fields);
+
+			$this->customProcessing($event,'before');
+			if( $object->Update() )
+			{
+				$this->customProcessing($event,'after');
+				$event->status=erSUCCESS;
+			}
+		}
+	}
+
+	function OnCreate(&$event)
+	{
+		$object =& $event->getObject( Array('skip_autoload' => true) );
+
+		$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
+		if($items_info)
+		{
+			list($id,$field_values) = each($items_info);
+			$object->SetFieldsFromHash($field_values);
+			if (!$object->Validate()) {
+				$event->status = erFAIL;
+				$event->redirect = false;
+				$this->Application->SetVar($event->Prefix_Special.'_SaveEvent','OnCreate');
+				$object->setID($id);
+				return;
+			}
+
+			$this->CreateCombinations($event, $field_values);
+		}
+	}
+
+	function OnUpdate(&$event)
+	{
+		$object =& $event->getObject( Array('skip_autoload' => true) );
+
+		$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
+		if($items_info)
+		{
+			foreach($items_info as $id => $field_values)
+			{
+				$object->Load($id);
+ 				$object->SetFieldsFromHash($field_values);
+
+ 				if (!$object->Validate()) {
+					$event->status = erFAIL;
+					$event->redirect = false;
+					return;
+				}
+				$this->UpdateCombinations($event, $field_values);
+
+ 				/*$this->customProcessing($event, 'before');
+				if( $object->Update($id) )
+				{
+					$this->customProcessing($event, 'after');
+					$event->status=erSUCCESS;
+				}
+				else
+				{
+					$event->status=erFAIL;
+					$event->redirect=false;
+					break;
+				}*/
+			}
+		}
+		$this->Application->SetVar($event->GetPrefixSpecial().'_id', '');
+	}
+
+	/**
+	 * Builds item (loads if needed)
+	 *
+	 * @param kEvent $event
+	 * @access protected
+	 */
+	function OnItemBuild(&$event)
+	{
+		$object =& $event->getObject();
+		$this->dbBuild($object,$event);
+
+		$sql = $this->ItemPrepareQuery($event);
+		$sql = $this->Application->ReplaceLanguageTags($sql);
+		$object->setSelectSQL($sql);
+
+		// 2. loads if allowed
+		$auto_load = $this->Application->getUnitOption($event->Prefix,'AutoLoad');
+		$skip_autload = $event->getEventParam('skip_autoload');
+
+		if($auto_load && !$skip_autload) $this->LoadItem($event);
+
+		$actions =& $this->Application->recallObject('kActions');
+		$actions->Set($event->Prefix_Special.'_GoTab', '');
+
+		$actions->Set($event->Prefix_Special.'_GoId', '');
+	}
+
+	function LoadItem(&$event)
+	{
+		$object =& $event->getObject();
+		$id = $this->getPassedID($event);
+		if (!$id) {
+			$event->CallSubEvent('OnNew');
+		}
+		else {
+			if ($object->Load($id) )
+			{
+				$actions =& $this->Application->recallObject('kActions');
+				$actions->Set($event->Prefix_Special.'_id', $object->GetId() );
+			}
+			else
+			{
+				//$object->setID($id);
+			}
+		}
+	}
+
+	/**
+	 * Get's special of main item for linking with subitem
+	 *
+	 * @param kEvent $event
+	 * @return string
+	 */
+	function getMainSpecial(&$event)
+	{
+		$special = $event->getEventParam('main_special');
+		if($special === false || $special == '$main_special')
+		{
+			$special = $event->Special;
+		}
+		if ($special == 'grid') {
+			$special = '';
+		}
+		return $special;
+	}
+
+	function OnBeforeClone(&$event)
+	{
+		$event->Init($event->Prefix, '-item');
+		$object =& $event->getObject();
+
+		$options_mapping = $this->Application->GetVar('poc_mapping');
+		if (!$options_mapping) return;
+
+		foreach ($options_mapping as $original => $new)
+		{
+			$comb_data = unserialize($object->GetDBField('Combination'));
+			$n_combs = array();
+			foreach ($comb_data as $key => $val)
+			{
+				$n_key = $key == $original ? $new : $key;
+				$n_combs[$n_key] = $val;
+			}
+			ksort($n_combs);
+			$n_combs = serialize($n_combs);
+			$n_crc = crc32($n_combs);
+			$object->SetDBField('Combination', $n_combs);
+			$object->SetDBField('CombinationCRC', $n_crc);
+		}
+	}
+
+	/**
+	 * Restore back values from live table to temp table before overwriting live with temp
+	 *
+	 * @param kEvent $event
+	 */
+	function OnBeforeDeleteFromLive(&$event)
+	{
+		// check if product inventory management is via options and then proceed
+
+		$id = $event->getEventParam('id');
+		$products_table = $this->Application->getUnitOption('p', 'TableName');
+		$table_name = $this->Application->getUnitOption($event->Prefix, 'TableName');
+		$id_field = $this->Application->getUnitOption($event->Prefix, 'IDField');
+
+		$sql = 'SELECT p.InventoryStatus
+				FROM '.$products_table.' p
+				LEFT JOIN '.$table_name.' poc ON poc.ProductId = p.ProductId
+				WHERE poc.'.$id_field.' = '.$id;
+
+		if ($this->Conn->GetOne($sql) == 2) {
+			$live_object =& $this->Application->recallObject($event->Prefix.'.itemlive', null, Array('skip_autoload' => true));
+			$live_object->SwitchToLive();
+			$live_object->Load($id);
+
+			$temp_object =& $this->Application->recallObject($event->Prefix.'.itemtemp', null, Array('skip_autoload' => true));
+			$temp_object->SwitchToTemp();
+			$temp_object->Load($id);
+
+			$temp_object->SetDBFieldsFromHash($live_object->FieldValues, Array('QtyInStock','QtyReserved','QtyBackOrdered','QtyOnOrder'));
+			$temp_object->Update();
+		}
+	}
+
+	/**
+	 * Create search filters based on search query
+	 *
+	 * @param kEvent $event
+	 * @access protected
+	 */
+	function OnSearch(&$event)
+	{
+		parent::OnSearch($event);
+
+		$this->_saveProduct($event);
+	}
+
+	/**
+	 * Clear search keywords
+	 *
+	 * @param kEvent $event
+	 * @access protected
+	 */
+	function OnSearchReset(&$event)
+	{
+		parent::OnSearchReset($event);
+
+		$this->_saveProduct($event);
+	}
+
+	/**
+	 * Makes event remember product id (if passed)
+	 *
+	 * @param kEvent $event
+	 */
+	function _saveProduct(&$event)
+	{
+		$product_id = $this->Application->GetVar('p_id');
+
+		if ($product_id) {
+			$event->SetRedirectParam('p_id', $product_id);
+		}
+	}
+
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/product_option_combinations/product_option_combinations_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.11.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/product_option_combinations/products_option_combination_item.php
===================================================================
--- branches/5.1.x/in-commerce/units/product_option_combinations/products_option_combination_item.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/product_option_combinations/products_option_combination_item.php	(revision 12131)
@@ -0,0 +1,50 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	class kPOCItem extends kDBItem
+	{
+
+		/**
+		 * Returns unformatted field value
+		 *
+		 * @param string $field
+		 * @return string
+		 * @access public
+		 */
+		function GetDBField($field)
+		{
+			if ($field == 'FinalPrice') {
+				$product =& $this->Application->recallObject('p');
+
+				switch($this->GetDBField('PriceType'))
+				{
+					case 1: // = (override)
+						return $this->GetDBField('Price');
+						break;
+					case 2: // flat
+						return $product->GetDBField('Price') + $this->GetDBField('Price');
+						break;
+					case 3: // percent
+						return $product->GetDBField('Price') * (1 + $this->GetDBField('Price')/100);
+						break;
+				}
+			}
+			else {
+				$ret = parent::GetDBField($field);
+			}
+			return $ret;
+		}
+
+	}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/product_option_combinations/products_option_combination_item.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/product_option_combinations/product_option_formatters.php
===================================================================
--- branches/5.1.x/in-commerce/units/product_option_combinations/product_option_formatters.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/product_option_combinations/product_option_formatters.php	(revision 12131)
@@ -0,0 +1,124 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class kCombinationFormatter extends kFormatter {
+
+	function Format($value, $field_name, $object, $format=null)
+	{
+		$o = '';
+		$options = $object->GetFieldOptions($field_name);
+		if ( isset($format) ) $options['format'] = $format;
+		$data = unserialize($value);
+		$opt_helper =& $this->Application->recallObject('kProductOptionsHelper');
+
+		$top_prefix = $this->Application->GetTopmostPrefix($object->Prefix);
+		$use_temp = substr($this->Application->GetVar($top_prefix.'_mode'), 0, 1) == 't';
+
+		foreach ($data as $key=>$val) {
+			$conv_key = $opt_helper->ConvertKey($key, $object->GetDBField('ProductId'),$use_temp);
+
+			if (is_array($val)) {
+				$val = join(',', $val);
+			}
+
+			$o .= sprintf($options['format'], $conv_key['Name'], $val);
+		}
+		return $o;
+	}
+
+	function Parse($value, $field_name, &$object)
+	{
+		if (!is_array($value)) {
+			$object->FieldErrors[$field_name]['pseudo'] = 'required';
+			return '';
+		}
+		else {
+			if (isset($object->Fields[$field_name]['required']) && $object->Fields[$field_name]['required']) {
+				foreach ($value as $key=>$val)
+				{
+					if ($val == '') {
+						$object->FieldErrors[$field_name]['pseudo'] = 'required';
+					}
+				}
+			}
+		}
+		return serialize($value);
+	}
+}
+
+class kCombPriceFormatter extends kFormatter {
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param mixed $value
+	 * @param string $field_name
+	 * @param kDBItem $object
+	 * @param string $format
+	 * @return string
+	 */
+	function Format($value, $field_name, $object, $format=null)
+	{
+		$options = $object->GetFieldOptions($field_name);
+		$converted = array_key_exists('converted', $options) ? $options['converted'] : false;
+
+		if ($converted) {
+			$lang =& $this->Application->recallObject('lang.current');
+			return $lang->formatNumber($object->GetDBField($field_name), 2);
+		}
+
+		$data = unserialize($object->GetDBField('Combination'));
+		$opt_helper =& $this->Application->recallObject('kProductOptionsHelper');
+
+		$price = $object->GetDBField('BasePrice');
+		$addition = 0;
+
+		$top_prefix = $this->Application->GetTopmostPrefix($object->Prefix);
+		$use_temp = substr($this->Application->GetVar($top_prefix.'_mode'), 0, 1) == 't';
+
+		foreach ($data as $key=>$val) {
+			$conv_key = $opt_helper->ConvertKey($key, $object->GetDBField('ProductId'), $use_temp);
+			$parsed = $opt_helper->ExplodeOptionValues($conv_key);
+			if (!$parsed) continue;
+
+			$conv_prices = $parsed['Prices'];
+			$conv_price_types = $parsed['PriceTypes'];
+
+			if ($conv_price_types[$val] == '$')
+			{
+				$addition += $conv_prices[$val];
+			}
+			elseif ($conv_price_types[$val] == '%')
+			{
+				$addition += $price * $conv_prices[$val] / 100;
+			}
+		}
+
+		$price += $addition;
+
+		$price_type = $object->GetDBField('PriceType');
+		$price_mod = $object->GetDBField('Price');
+		switch ($price_type) {
+			case 1: // = override
+				$price = $price_mod;
+				break;
+			case 2: // flat
+				$price = $price + $price_mod;
+				break;
+			case 3: // percent
+				$price = $price * (1 + $price_mod / 100);
+				break;
+		}
+		return $price;
+	}
+}
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/product_option_combinations/product_option_formatters.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/product_option_combinations/product_option_combinations_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/product_option_combinations/product_option_combinations_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/product_option_combinations/product_option_combinations_config.php	(revision 12131)
@@ -0,0 +1,126 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+$config	=	Array(
+					'Prefix'			=>	'poc',
+					'ItemClass'			=>	Array('class'=>'kPOCItem','file'=>'products_option_combination_item.php','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'ProductOptionCombinationsEventHandler','file'=>'product_option_combinations_event_handler.php','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'ProductOptionCombinationsTagProcessor','file'=>'product_option_combinations_tag_processor.php','build_event'=>'OnBuild'),
+					'RegisterClasses'	=>	Array(
+												Array('pseudo'=>'kCombinationFormatter','class'=>'kCombinationFormatter','file'=>'product_option_formatters.php','build_event'=>'','require_classes'=>'kFormatter'),
+												Array('pseudo'=>'kCombPriceFormatter','class'=>'kCombPriceFormatter','file'=>'product_option_formatters.php','build_event'=>'','require_classes'=>'kFormatter'),
+											),
+					'AutoLoad'			=>	true,
+					'Hooks'				=>	Array(
+
+											),
+					'AggregateTags' => Array(
+											),
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'page',
+												3	=>	'event',
+											),
+					'TitleField' => 'CombinationId',
+					'IDField'			=>	'CombinationId',
+					'TableName'			=>	TABLE_PREFIX.'ProductOptionCombinations',
+					'ForeignKey'	=>	array('p' => 'ProductId'),
+					'ParentTableKey' => array('p' => 'ProductId'),
+					'ParentPrefix' => 'p',
+					'AutoDelete'	=>	true,
+					'AutoClone'	=> true,
+
+					'ListSQLs'			=>	Array(	''=>'SELECT %1$s.* %2$s
+																					 FROM %1$s
+																					 LEFT JOIN '.TABLE_PREFIX.'Products ON '.TABLE_PREFIX.'Products.ProductId = %1$s.ProductId
+																					 LEFT JOIN '.TABLE_PREFIX.'ProductsPricing ON '.TABLE_PREFIX.'ProductsPricing.ProductId = %1$s.ProductId AND '.TABLE_PREFIX.'ProductsPricing.IsPrimary = 1
+																					',
+																		), // key - special, value - list select sql
+					'ItemSQLs'			=>	Array(	''=>'SELECT * FROM %s',
+																		),
+					'ListSortings'	=> 	Array(
+																'' => Array(
+																	'Sorting' => Array('Combination' => 'asc'),
+																	'ForcedSorting' => Array('Priority' => 'desc'),
+																)
+															),
+					'Fields' => Array (
+						'CombinationId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
+			            'ProductId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
+			            'Combination' => Array('type' => 'string', 'required' => 1, 'formatter' => 'kCombinationFormatter', 'format'=>"%s: %s<br>", 'not_null' => 1, 'default' => '', ),
+			            'CombinationCRC' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
+			            'PriceType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Txt_=', 2 => 'la_Flat', 3 => 'la_Percent'), 'use_phrases' => 1, 'default' => 3, ),
+			            'Price' => Array('type' => 'float', 'required' => 1, 'formatter' => 'kFormatter', 'default' => '', ),
+			            'WeightType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Txt_=', 2 => 'la_Flat', 3 => 'la_Percent'), 'use_phrases' => 1, 'default' => 3, ),
+			            'Weight' => Array('type' => 'float', 'formatter' => 'kFormatter', 'default' => 0, ),
+			            'Availability' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options'=>array(0=>'la_No', 1=>'la_Yes'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1, ),
+			            'Priority' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
+						'QtyInStock'		=>	Array('type' => 'int', 'not_null' => '1', 'default' => 0),
+						'QtyReserved'		=>	Array('type' => 'int', 'not_null' => '1', 'default' => 0),
+						'QtyBackOrdered'	=>	Array('type' => 'int', 'not_null' => '1', 'default' => 0),
+						'QtyOnOrder'		=>	Array('type' => 'int', 'not_null' => '1', 'default' => 0),
+						'SKU'				=>	Array('type' => 'string', 'not_null' => '1', 'default' => ''),
+					),
+					'CalculatedFields' => Array(
+							'' => Array(
+								'FinalPrice' => 'IF(%1$s.PriceType = 1, %1$s.Price,
+																	IF(%1$s.PriceType = 2, '.TABLE_PREFIX.'ProductsPricing.Price + %1$s.Price,
+																		'.TABLE_PREFIX.'ProductsPricing.Price * (1 + %1$s.Price/100)
+																		)
+																	)',
+								'BasePrice' => TABLE_PREFIX.'ProductsPricing.Price',
+								),
+							),
+					'VirtualFields'	=> 	Array(
+								'FinalPrice' => Array('formatter'=>'kCombPriceFormatter', 'format' => '%.2f'),
+										),
+					'Grids' => Array (
+						'Default' => Array (
+							'Icons' => Array('default'=>'icon16_custom.gif'),	// icons for each StatusField values, if no matches or no statusfield selected, then "default" icon is used
+							'Fields' => Array(
+								'Combination' => Array( 'title'=>'la_col_Combination', 'data_block' => 'grid_combination_td', 'filter_block' => 'grid_empty_filter'),
+								'SKU'		=>	Array( 'title'=>'la_col_SKU', 'filter_block' => 'grid_like_filter'),
+								'Availability' => Array( 'title'=>'la_col_Availability', 'filter_block' => 'grid_options_filter'),
+								'Price' => Array( 'title'=>'la_col_Price', 'data_block' => 'price_td', 'filter_block' => 'grid_float_range_filter'),
+								/*'Weight' => Array( 'title'=>'la_col_Weight', 'data_block' => 'weight_td', 'filter_block' => 'grid_float_range_filter'),*/
+							),
+						),
+
+						'Inventory' => Array (
+							'Icons' => Array ('default' => 'icon16_custom.gif'),	// icons for each StatusField values, if no matches or no statusfield selected, then "default" icon is used
+							'Selector' => 'radio',
+							'Fields' => Array (
+								'Combination'	=>	Array('title' => 'la_col_Combination', 'data_block' => 'grid_combination_td', 'filter_block' => 'grid_empty_filter'),
+								'SKU'			=>	Array('title' => 'la_col_SKU', 'filter_block' => 'grid_like_filter'),
+								'QtyInStock'	=>	Array('title'=>'la_col_QtyInStock', 'filter_block' => 'grid_range_filter'),
+								'QtyReserved'	=>	Array('title'=>'la_col_QtyReserved', 'filter_block' => 'grid_range_filter'),
+								'QtyBackOrdered'=>	Array('title'=>'la_col_QtyBackOrdered', 'filter_block' => 'grid_range_filter'),
+								'QtyOnOrder'	=>	Array('title'=>'la_col_QtyOnOrder', 'filter_block' => 'grid_range_filter'),
+							),
+						),
+
+						'Radio' => Array (
+							'Selector' => 'radio',
+							'Icons' => Array('default'=>'icon16_custom.gif'),	// icons for each StatusField values, if no matches or no statusfield selected, then "default" icon is used
+							'Fields' => Array(
+								'Combination' => Array( 'title'=>'la_col_Combination', 'data_block' => 'grid_combination_td', 'filter_block' => 'grid_empty_filter'),
+								'FinalPrice' => Array( 'title'=>'la_col_Price', 'data_block' => 'grid_data_td', 'currency' => 'primary', 'filter_block' => 'grid_float_range_filter'),
+								/*'Weight' => Array( 'title'=>'la_col_Weight', 'data_block' => 'weight_td', 'filter_block' => 'grid_float_range_filter'),*/
+							),
+						),
+					),
+
+		);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/product_option_combinations/product_option_combinations_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.10.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/product_option_combinations/product_option_combinations_tag_processor.php
===================================================================
--- branches/5.1.x/in-commerce/units/product_option_combinations/product_option_combinations_tag_processor.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/product_option_combinations/product_option_combinations_tag_processor.php	(revision 12131)
@@ -0,0 +1,58 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class ProductOptionCombinationsTagProcessor extends kDBTagProcessor{
+
+	function ListOptions($params)
+	{
+		$o = '';
+
+		return $o;
+	}
+
+	function ListValues($params)
+	{
+		$o = '';
+
+		return $o;
+	}
+
+	function ShowCombination($params)
+	{
+		$object =& $this->getObject($params);
+		$combination = unserialize($object->GetDBField('Combination'));
+
+		$block_params['name'] = $params['render_as'];
+
+		$opt_helper =& $this->Application->recallObject('kProductOptionsHelper');
+		$o = '';
+		$i = 0;
+		foreach ($combination as $opt => $val) {
+			$i++;
+			$block_params['option_id'] = $opt;
+			$conv_key = $opt_helper->ConvertKey($opt, $object->GetDBField('ProductId'));
+			$block_params['option_name'] = $conv_key['Name'];
+
+			if (is_array($val)) {
+				$val = join(',', $val);
+			}
+			$block_params['option_value'] = $val;
+			$block_params['is_last'] = $i == count($combination);
+			$o .= $this->Application->ParseBlock($block_params);
+		}
+		return $o;
+	}
+
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/product_option_combinations/product_option_combinations_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/payment_type/payment_type_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/payment_type/payment_type_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/payment_type/payment_type_event_handler.php	(revision 12131)
@@ -0,0 +1,221 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class PaymentTypeEventHandler extends kDBEventHandler
+{
+	function mapEvents()
+	{
+		parent::mapEvents();
+		$common_events = Array (
+			'OnMassApprove'=>'iterateItems',
+			'OnMassDecline'=>'OnMassDecline',
+			'OnMassMoveUp'=>'iterateItems',
+			'OnMassMoveDown'=>'iterateItems',
+		);
+
+		$this->eventMethods = array_merge($this->eventMethods, $common_events);
+	}
+
+	/**
+	 * Allows to override standart permission mapping
+	 *
+	 */
+	function mapPermissions()
+	{
+		parent::mapPermissions();
+		$permissions = Array(
+			'OnItemBuild' => Array('self' => true),
+		);
+
+		$this->permMapping = array_merge($this->permMapping, $permissions);
+	}
+
+	/**
+	 * Set's new category as primary for product
+	 *
+	 * @param kEvent $event
+	 */
+	function OnSetPrimary(&$event)
+	{
+		$object =& $event->getObject( Array('skip_autoload' => true) );
+		$this->StoreSelectedIDs($event);
+		$ids=$this->getSelectedIDs($event);
+		if($ids)
+		{
+			$id = array_shift($ids);
+			$table_info = $object->getLinkedInfo();
+
+			$this->Conn->Query('UPDATE '.$object->TableName.' SET IsPrimary = 0 ');
+			$this->Conn->Query('UPDATE '.$object->TableName.' SET IsPrimary = 1, Status = 1 WHERE PaymentTypeId = '.$id.' ');
+		}
+		$event->redirect_params = Array('opener' => 's'); //stay!
+	}
+
+	function OnMassDecline(&$event)
+	{
+		$object =& $event->getObject( Array('skip_autoload' => true) );
+		$this->StoreSelectedIDs($event);
+		$ids=$this->getSelectedIDs($event);
+
+		if($ids)
+		{
+			$status_field = array_shift( $this->Application->getUnitOption($event->Prefix,'StatusField') );
+
+			foreach($ids as $id)
+			{
+				$object->Load($id);
+
+				if (!$object->GetDBField("IsPrimary")){
+					$object->SetDBField($status_field, 0);
+				}
+
+				if( $object->Update() )
+				{
+					$event->status=erSUCCESS;
+					$event->redirect_params = Array('opener' => 's'); //stay!
+				}
+				else
+				{
+					$event->status=erFAIL;
+					$event->redirect=false;
+					break;
+				}
+			}
+		}
+	}
+
+	/**
+	 * Occurse before updating item
+	 *
+	 * @param kEvent $event
+	 * @access public
+	 */
+	function OnBeforeItemUpdate(&$event)
+	{
+		parent::OnBeforeItemUpdate($event);
+
+		$object = &$event->getObject();
+
+		$status_field = array_shift( $this->Application->getUnitOption($event->Prefix,'StatusField') );
+
+		if($object->GetDBField('IsPrimary')==1 && $object->GetDBField($status_field)==0){
+			$object->SetDBField($status_field, 1);
+		}
+
+		$this->convertGroups($event);
+	}
+
+	/**
+	 * Occurse before creating item
+	 *
+	 * @param kEvent $event
+	 * @access public
+	 */
+	function OnBeforeItemCreate(&$event)
+	{
+		parent::OnBeforeItemCreate($event);
+
+		$this->convertGroups($event);
+	}
+
+	/**
+	 * Disable delete on primary payment type
+	 *
+	 * @param kEvent $event
+	 * @access protected
+	 */
+
+	function customProcessing(&$event, $when){
+		if ($event->Name == 'OnMassDelete' && $when == 'before'){
+			$object = &$event->getObject();
+
+			$ids = $event->getEventParam('ids');
+			$ids_ok=array();
+			foreach ($ids as $key => $id){
+				$object->Load($id);
+				if ($object->GetDBField('IsPrimary')){
+					$this->Application->StoreVar('pt_delete_error', '1');
+				}else{
+					$ids_ok[]=$id;
+				}
+			}
+
+			$event->setEventParam('ids', $ids_ok);
+
+		}
+	}
+
+	function OnSave(&$event)
+	{
+		$this->Application->StoreVar('check_unused_currencies', 1);
+		parent::OnSave($event);
+	}
+
+	/**
+	 * Sets default payment type group
+	 *
+	 * @param kEvent $event
+	 */
+	function OnAfterConfigRead(&$event)
+	{
+		parent::OnAfterConfigRead($event);
+
+		$default_group = $this->Application->ConfigValue('User_LoggedInGroup');
+
+		$fields = $this->Application->getUnitOption($event->Prefix, 'Fields');
+		$fields['PortalGroups']['default'] = ','.$default_group.',';
+		$this->Application->setUnitOption($event->Prefix, 'Fields', $fields);
+	}
+
+	/**
+	 * Earlier version of group selector control needs such conversion (also used in shipping)
+	 *
+	 * @param kEvent $event
+	 */
+	function convertGroups(&$event)
+	{
+		$object =& $event->getObject();
+
+		$selected_groups = $object->GetDBField('PortalGroups');
+		if ($selected_groups) {
+			$selected_groups = str_replace('|', ',', $selected_groups);
+			$selected_groups = ','.trim($selected_groups, ',').',';
+			$object->SetDBField('PortalGroups', $selected_groups);
+		}
+	}
+
+	/**
+	 * Returns ID of current item to be edited
+	 * by checking ID passed in get/post as prefix_id
+	 * or by looking at first from selected ids, stored.
+	 * Returned id is also stored in Session in case
+	 * it was explicitly passed as get/post
+	 *
+	 * @param kEvent $event
+	 * @return int
+	 */
+	function getPassedID(&$event)
+	{
+		if ($event->Special == 'auto-ord') {
+			$main_object =& $this->Application->recallObject('ord');
+			/* @var $main_object kDBItem */
+
+			return $main_object->GetDBField('PaymentType');
+		}
+
+		return parent::getPassedID($event);
+	}
+
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/payment_type/payment_type_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/payment_type/payment_type_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/payment_type/payment_type_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/payment_type/payment_type_config.php	(revision 12131)
@@ -0,0 +1,140 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+$config	=	Array(
+					'Prefix'			=>	'pt',
+					'ItemClass'			=>	Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'PaymentTypeEventHandler','file'=>'payment_type_event_handler.php','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'PaymentTypeTagProcessor','file'=>'payment_type_tag_processor.php','build_event'=>'OnBuild'),
+					'AutoLoad'			=>	true,
+
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'page',
+												3	=>	'event',
+												4 	=>	'mode',
+											),
+					'IDField'			=>	'PaymentTypeId',
+					'StatusField'		=>	Array('Status', 'IsPrimary'),
+					'TableName'			=>	TABLE_PREFIX.'PaymentTypes',
+
+					'TitlePresets'		=>	Array(
+												'default'	=>	Array(	'new_status_labels'		=> Array('pt'=>'!la_title_AddingPaymentType!'),
+																		'edit_status_labels'	=> Array('pt'=>'!la_title_EditingPaymentType!'),
+																		'new_titlefield'		=> Array('pt'=>'!la_title_NewPaymentType!'),
+																),
+
+												'payment_type_list'=>Array(	'prefixes'				=> Array('pt_List'),
+																			'format'				=>	"!la_title_PaymentTypes!",
+																),
+
+												'payment_type_edit'=>Array(	'prefixes'				=> Array('pt'),
+																			'new_titlefield'		=> Array('pt'=>'!la_title_NewPaymentType!'),
+																			'format'				=> "#pt_status# '#pt_titlefield#' - !la_title_General!",
+																),
+
+												'gateway'	=>	Array('prefixes' => Array('pt'), 'format' => "#pt_status# '#pt_titlefield#' - !la_title_Gateway!"),
+												'group_list'	=>	Array('prefixes' => Array('pt'), 'format' => "#pt_status# '#pt_titlefield#' - !la_title_Groups!"),
+
+												'payment_currencies_edit'	=>	Array('prefixes' => Array('pt'), 'format' => "#pt_status# '#pt_titlefield#' - !la_title_Currencies!"),
+											),
+
+					'EditTabPresets' => Array (
+						'Default' => Array (
+							'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/payment_type/payment_type_edit', 'priority' => 1),
+							'gateway' => Array ('title' => 'la_tab_Gateway', 't' => 'in-commerce/payment_type/payment_type_gateway', 'priority' => 2),
+							'currencies' => Array ('title' => 'la_tab_Currencies', 't' => 'in-commerce/payment_type/payment_type_currencies', 'priority' => 3),
+							'groups' => Array ('title' => 'la_tab_Groups', 't' => 'in-commerce/payment_type/payment_type_groups', 'priority' => 4),
+						),
+					),
+
+					'PermSection'		=>	Array('main' => 'in-commerce:payment_types'),
+
+					'Sections'			=>	Array(
+						'in-commerce:payment_types'	=>	Array(
+							'parent'		=>	'in-commerce:setting_folder',
+							'icon'			=>	'payment_types',
+							'label'			=>	'la_tab_PaymentTypes',
+							'url'			=>	Array('t' => 'in-commerce/payment_type/payment_type_list', 'pass' => 'm'),
+							'permissions'	=>	Array('view', 'add', 'edit', 'delete'),
+							'priority'		=>	5,
+							'type'			=>	stTREE,
+						),
+					),
+
+					'TitleField'		=>	'Name',		// field, used in bluebar when editing existing item
+					'SubItems' => Array('gwfv','ptc'),
+
+					'FilterMenu'		=>	Array(
+												'Groups' => Array(
+													Array('mode' => 'AND', 'filters' => Array('show_active','show_disabled'), 'type' => WHERE_FILTER),
+												),
+												'Filters' => Array(
+													'show_active'	=>	Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
+													'show_disabled'	=>	Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0'  ),
+												)
+											),
+
+					'CalculatedFields'	=>	Array(
+												''	=> Array(
+															'Gateway'		=>	TABLE_PREFIX.'Gateways.Name',
+														),
+											),
+
+					'ListSQLs'			=>	Array(	''=>'	SELECT %1$s.* %2$s
+															FROM %1$s
+															LEFT JOIN '.TABLE_PREFIX.'Gateways ON %1$s.GatewayId = '.TABLE_PREFIX.'Gateways.GatewayId',
+																		), // key - special, value - list select sql
+					'ItemSQLs'			=>	Array(	''=>'SELECT * FROM %s',
+																		),
+					'ListSortings'	=> 	Array(
+																'' => Array(
+																	'ForcedSorting' => Array('Priority' => 'desc'),
+																	'Sorting' => Array('Name' => 'asc'),
+																)
+															),
+					'Fields'			=>	Array(
+											    'PaymentTypeId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
+											    'Name' => Array('type' => 'string', 'not_null' => 1, 'default' => '', 'required'=>true, 'max_len' => 100),
+											    'Description' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL),
+												'Instructions' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
+												'AdminComments' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
+											    'Status' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_Enabled', 0 => 'la_Disabled' ), 'default' => 0, 'not_null' => 1),
+											    'Priority' => Array('type' => 'int', 'not_null' => true, 'default' => 0),
+											    'IsPrimary' => Array('type' => 'int', 'not_null' => true, 'default' => 0),
+											    'BuiltIn' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_BuiltIn', 0 => 'la_UserDefined' ), 'default' => 0, 'not_null' => 1 ),
+											    'GatewayId' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'Gateways', 'option_key_field'=>'GatewayId', 'option_title_field'=>'Name', 'default' => 1, 'not_null' => 1),
+											    'PlacedOrdersEdit' => Array('type' => 'int','not_null' => 1, 'default' => 0),
+											    'ProcessingFee' => Array('type' => 'double', 'formatter'=>'kFormatter','format'=>'%.02f', 'not_null' => '1','default' => '0.00'),
+											    'PortalGroups' => Array('type' => 'string', 'not_null' => 1, 'default' => '',),
+											),
+/*					'VirtualFields'	=> 	Array(
+													'Qty' => 1,
+													),*/
+
+					'Grids'	=> Array(
+								'Default'		=>	Array(
+																	'Icons' => Array('default'=>'icon16_custom.gif','0_0'=>'icon16_payment_disabled.gif','1_0'=>'icon16_payment.gif','1_1'=>'icon16_payment_primary.gif','0_1'=>'icon16_payment_disabled.gif'),
+																	'Fields' => Array(
+																			'PaymentTypeId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+																			'Name' => Array( 'title'=>'la_col_PaymentTypeName', 'data_block' => 'payment_caption_td', 'filter_block' => 'grid_like_filter'),
+																			'Description' => Array( 'title'=>'la_col_Description', 'filter_block' => 'grid_like_filter'),
+																			'BuiltIn' => Array( 'title'=>'la_col_BuiltIn', 'filter_block' => 'grid_options_filter'),
+																		),
+
+																),
+													),
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/payment_type/payment_type_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.19.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/payment_type/payment_type_tag_processor.php
===================================================================
--- branches/5.1.x/in-commerce/units/payment_type/payment_type_tag_processor.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/payment_type/payment_type_tag_processor.php	(revision 12131)
@@ -0,0 +1,53 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class PaymentTypeTagProcessor extends kDBTagProcessor{
+
+	function DeleteError($params){
+		$o = '';
+		$error = $this->Application->RecallVar('pt_delete_error');
+		if ($error){
+			$params['name']=$params['block'];
+			$o = $this->Application->ParseBlock($params);
+			$this->Application->RemoveVar('pt_delete_error');
+		}
+		return $o;
+	}
+
+	function ListGroups($params)
+	{
+
+		$object =& $this->getObject($params);
+		$selected = trim($object->GetDBField('PortalGroups'), ',');
+		$selected_arr = explode(',', $selected);
+		$all_groups = $this->Conn->Query('SELECT GroupId, Name FROM '.TABLE_PREFIX.'PortalGroup ORDER BY NAME', 'GroupId');
+
+
+		$o = '';
+		$mode = array_key_exists('mode', $params) ? $params['mode'] : false;
+
+		foreach ($all_groups as $a_group) {
+			$is_selected = in_array($a_group['GroupId'], $selected_arr);
+			$continue = $mode == 'selected' ? !$is_selected : $is_selected;
+			if ($continue) continue;
+			$block_params = $a_group;
+			$block_params['name']	= $params['render_as'];
+			$o .= $this->Application->ParseBlock($block_params);
+		}
+
+		return $o;
+	}
+
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/payment_type/payment_type_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/manufacturers/manufacturers_tag_processor.php
===================================================================
--- branches/5.1.x/in-commerce/units/manufacturers/manufacturers_tag_processor.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/manufacturers/manufacturers_tag_processor.php	(revision 12131)
@@ -0,0 +1,54 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class ManufacturersTagProcessor extends kDBTagProcessor{
+
+	function BuildListSpecial($params)
+	{
+		if ($this->Special != '') return $this->Special;
+		if ( isset($params['parent_cat_id']) ) {
+			$parent_cat_id = $params['parent_cat_id'];
+		}
+		else {
+			$parent_cat_id = $this->Application->GetVar('c_id');
+			if (!$parent_cat_id) {
+				$parent_cat_id = $this->Application->GetVar('m_cat_id');
+			}
+		}
+		$recursive = isset($params['recursive']);
+
+		$list_unique_key = $this->getUniqueListKey($params).$recursive;
+		if ($list_unique_key == '') {
+			return parent::BuildListSpecial($params);
+		}
+
+		return crc32($parent_cat_id.$list_unique_key);
+	}
+
+	function ListManufacturers($params)
+	{
+		return $this->PrintList2($params);
+	}
+
+	function ManufacturerLink($params)
+	{
+		$object =& $this->getObject($params);
+
+		$params['pass'] = 'm,manuf';
+		$params['m_cat_id'] = 0;
+		$params['manuf_id']	= $object->GetID();
+
+	 	return $this->Application->ProcessParsedTag('m', 'Link', $params);
+	}
+}
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/manufacturers/manufacturers_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3.14.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/manufacturers/manufacturers_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/manufacturers/manufacturers_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/manufacturers/manufacturers_event_handler.php	(revision 12131)
@@ -0,0 +1,116 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class ManufacturersEventHandler extends kDBEventHandler {
+
+	/**
+	 * Allows to override standart permission mapping
+	 *
+	 */
+	function mapPermissions()
+	{
+		parent::mapPermissions();
+		$permissions = Array(
+			'OnItemBuild' => Array('self' => true),
+		);
+
+		$this->permMapping = array_merge($this->permMapping, $permissions);
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function SetCustomQuery(&$event)
+	{
+		if ($this->Application->IsAdmin()) {
+			return true;
+		}
+
+		$category_id = $this->Application->GetVar('m_cat_id');
+		$parent_category_id = $event->getEventParam('parent_cat_id');
+
+		if ($parent_category_id) {
+			if ($parent_category_id != 'any' && $parent_category_id > 0) {
+				$category_id = $parent_category_id;
+			}
+		}
+
+		$sql = 'SELECT m.ManufacturerId, COUNT(p.ProductId)
+				FROM '.TABLE_PREFIX.'Manufacturers m
+				LEFT JOIN '.TABLE_PREFIX.'Products p ON p.ManufacturerId = m.ManufacturerId
+				LEFT JOIN '.TABLE_PREFIX.'CategoryItems ci ON ci.ItemResourceId = p.ResourceId
+				LEFT JOIN '.TABLE_PREFIX.'Category c ON c.CategoryId = ci.CategoryId
+				WHERE (ci.PrimaryCat = 1) AND (p.Status = ' . STATUS_ACTIVE . ') AND (c.Status = ' . STATUS_ACTIVE . ') GROUP BY m.ManufacturerId';
+
+		// add category filter
+
+		$tree_indexes = $this->Application->getTreeIndex($category_id);
+
+		// if category_id is 0 returs false
+		if ($tree_indexes) {
+			$sql .=  ' AND c.TreeLeft BETWEEN '.$tree_indexes['TreeLeft'].' AND '.$tree_indexes['TreeRight'];
+		}
+
+		$manufacturers = $this->Conn->GetCol($sql);
+
+		$object =& $event->getObject();
+
+		$object->addFilter('category_manufacturer_filter', $manufacturers ? '%1$s.ManufacturerId IN (' . implode(',', $manufacturers) . ')' : 'FALSE');
+	}
+
+
+	/**
+	 * Prefill states dropdown with correct values
+	 *
+	 * @param kEvent $event
+	 * @access public
+	 */
+	function OnPrepareStates(&$event)
+	{
+		$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+		$cs_helper->PopulateStates($event, 'State', 'Country');
+
+		$object =& $event->getObject();
+
+		if( $object->isRequired('Country') && $cs_helper->CountryHasStates( $object->GetDBField('Country') ) ) $object->setRequired('State', true);
+	}
+
+	function OnUpdate(&$event)
+	{
+		$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+		$cs_helper->CheckStateField($event, 'State', 'Country');
+
+		parent::OnUpdate($event);
+	}
+
+	function OnCreate(&$event)
+	{
+		$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+		$cs_helper->CheckStateField($event, 'State', 'Country');
+
+		parent::OnCreate($event);
+	}
+
+	function OnPreSave(&$event)
+	{
+		$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+		$cs_helper->CheckStateField($event, 'State', 'Country');
+
+		parent::OnPreSave($event);
+	}
+
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/manufacturers/manufacturers_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7.2.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/manufacturers/manufacturers_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/manufacturers/manufacturers_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/manufacturers/manufacturers_config.php	(revision 12131)
@@ -0,0 +1,139 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+$config	=	Array(
+					'Prefix'			=>	'manuf',
+					'ItemClass'			=>	Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'ManufacturersEventHandler','file'=>'manufacturers_event_handler.php','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'ManufacturersTagProcessor','file'=>'manufacturers_tag_processor.php','build_event'=>'OnBuild'),
+					'AutoLoad'			=>	true,
+					'Hooks'				=>	Array(
+												Array(
+													'Mode' => hAFTER,
+													'Conditional' => false,
+													'HookToPrefix' => 'manuf',
+													'HookToSpecial' => '',
+													'HookToEvent' => Array('OnAfterItemLoad', 'OnBeforeItemCreate', 'OnBeforeItemUpdate', 'OnUpdateAddress'),
+													'DoPrefix' => '',
+													'DoSpecial' => '',
+													'DoEvent' => 'OnPrepareStates',
+												),
+						),
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'Page',
+												3	=>	'event',
+												4	=>	'mode',
+											),
+					'IDField'			=>	'ManufacturerId',
+					'StatusField'		=>	Array(),
+					'TableName'			=>	TABLE_PREFIX.'Manufacturers',
+
+					'TitlePresets'		=>	Array(
+												'default'	=>	Array(	'new_status_labels'		=> Array('manuf'=>'!la_title_AddingManufacturer!'),
+																		'edit_status_labels'	=> Array('manuf'=>'!la_title_EditingManufacturer!'),
+																		'new_titlefield'		=> Array('manuf'=>'!la_title_NewManufacturers!'),
+																),
+
+												'manuf_list'=>Array(	'prefixes'				=> Array('manuf_List'),
+																			'format'				=>	"!la_title_Manufacturers!",
+																),
+
+												'manuf_edit'=>Array(	'prefixes'				=> Array('manuf'),
+																			'new_titlefield'		=> Array('manuf'=>'!la_title_NewManufacturer!'),
+																			'format'				=> "#manuf_status# '#manuf_titlefield#' - !la_title_General!",
+																),
+
+											),
+
+					'PermSection'		=>	Array('main' => 'in-commerce:manufacturers'),
+
+					'Sections'			=>	Array(
+						'in-commerce:manufacturers'	=>	Array(
+							'parent'		=>	'in-commerce',
+							'icon'			=>	'in-commerce:manufacturers',
+							'label'			=>	'la_tab_Manufacturers',
+							'url'			=>	Array('t' => 'in-commerce/manufacturers/manufacturers_list', 'pass' => 'm'),
+							'permissions'	=>	Array('view', 'add', 'edit', 'delete'),
+							'priority'		=>	6,
+							'type'			=>	stTREE,
+						),
+					),
+
+					'TitleField'		=>	'Name',		// field, used in bluebar when editing existing item
+
+
+					'ListSQLs'			=>	Array(	''=>'SELECT * FROM %s',
+													), // key - special, value - list select sql
+					'ItemSQLs'			=>	Array(''=>'SELECT * FROM %s',
+																		),
+					'ListSortings'	=> 	Array(
+																'' => Array(
+																	'Sorting' => Array('Name' => 'asc'),
+																)
+															),
+					'Fields' => Array (
+			            'ManufacturerId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
+			            'Name' => Array('type' => 'string','not_null' => '1','default' => '', 'required'=>true,'max_len'=>255),
+			            'Description' => Array('type' => 'string', 'formatter' => 'kFormatter', 'not_null' => 1, 'using_fck' => 1, 'default' => ''),
+			            'URL' => Array('type' => 'string','not_null' => '1','default' => '','max_len'=>255),
+			            'Logo' => Array (
+			            	'type' => 'string',
+			            	'formatter' => 'kPictureFormatter',
+			            	'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => IMAGES_PATH.'manufacturers/',
+			            	'file_types' => '*.jpg;*.gif;*.png', 'files_description' => '!la_ImageFiles!',
+			            	'multiple' => false,
+			            	'max_len' => 255, 'not_null' => 1, 'default' => ''
+			            ),
+			            'IsPopular' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
+			            'Email' => Array('type' => 'string', 'formatter'=>'kFormatter', 'regexp'=>'/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', 'sample_value' => 'email@domain.com', 'default' => null, 'error_msgs' => Array('invalid_format'=>'!la_invalid_email!') ),
+				        'Phone' => Array('type' => 'string','default' => null),
+				        'Fax' => Array('type' => 'string', 'default' => null),
+				        'Address1' => Array('type' => 'string','default' => null),
+				        'Address2' => Array('type' => 'string', 'default' => null),
+				        'City' => Array('type' => 'string','default' => null),
+				        'State' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array(), 'option_key_field' => 'DestAbbr', 'option_title_field' => 'Translation', 'default' => null),
+				        'Zip' => Array('type' => 'string', 'default' => null),
+				        'Country' => Array('type' => 'string', 'formatter'=>'kOptionsFormatter',
+				            				'options_sql'=>'SELECT %1$s
+																	FROM '.TABLE_PREFIX.'StdDestinations
+																	LEFT JOIN '.TABLE_PREFIX.'Phrase
+																		ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
+																	WHERE
+																		DestType=1
+																		AND
+																		LanguageId = %2$s
+																	ORDER BY Translation',
+									            		'option_key_field'=>'DestAbbr','option_title_field'=>'Translation', 'default' => null),
+					),
+
+					'Grids' => Array (
+						'Default' => Array (
+							'Icons' => Array ('default'=>'icon16_manuf.gif'),
+							'Fields' => Array (
+								'ManufacturerId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+								'Name' => Array ('title' => 'la_col_ManufacturerName', 'filter_block' => 'grid_like_filter'),
+								'IsPopular' => Array ('title' => 'la_col_IsPopular', 'filter_block' => 'grid_options_filter'),
+								'URL' => Array ('title' => 'la_col_URL', 'filter_block' => 'grid_like_filter'),
+							),
+						),
+					),
+
+					'ConfigMapping' => Array (
+						'PerPage' => 'Comm_Perpage_Manufacturers',
+						'ShortListPerPage' => 'Comm_Perpage_Manufacturers_Short',
+					),
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/manufacturers/manufacturers_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.10.2.6
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/shipping/shipping_tag_processor.php
===================================================================
--- branches/5.1.x/in-commerce/units/shipping/shipping_tag_processor.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/shipping/shipping_tag_processor.php	(revision 12131)
@@ -0,0 +1,309 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class ShippingTagProcessor extends kDBTagProcessor {
+
+	function CostInputSize($params)
+	{
+		$object =& $this->Application->recallObject( $this->getPrefixSpecial() );
+		$prec_before_sep = $object->GetDBField('PrecisionBeforeSep');
+		$prec_after_sep = $object->GetDBField('PrecisionAfterSep');
+		return $prec_before_sep + $prec_after_sep + 1 + ($prec_before_sep > 3 ? 1:0);
+	}
+
+	function ShowCostsTable($params)
+	{
+		$object =& $this->Application->recallObject( $this->getPrefixSpecial() );
+		$zones_object =& $this->Application->recallObject('z');
+		$brackets_object =& $this->Application->recallObject('br');
+		$costs_object =& $this->Application->recallObject('sc');
+		$main_processor =& $this->Application->recallObject('m_TagProcessor');
+
+		$zones_sql = 'SELECT * FROM '.$zones_object->TableName.' WHERE ShippingTypeID='.$this->Application->GetVar('s_id').' ORDER BY Name ASC';
+		$brackets_sql = 'SELECT * FROM '.$brackets_object->TableName.' WHERE ShippingTypeID='.$this->Application->GetVar('s_id').' ORDER BY Start ASC';
+
+		$sql = 'SELECT * FROM '.$costs_object->TableName;
+		$costs_array = $this->Conn->Query($sql, 'ShippingCostId');
+
+		$zones = $this->Conn->Query($zones_sql, 'ZoneID');
+		$brackets = $this->Conn->Query($brackets_sql, 'BracketId');
+
+		$oddevenparam['odd'] = 'table-color1';
+		$oddevenparam['even'] = 'table-color2';
+
+		if(!$zones || !$brackets)
+		{
+			return '<tr class="'.$main_processor->Odd_Even($oddevenparam).'"><td>'.$this->Application->Phrase('la_NoZonesOrBrackets').'</td></tr>';
+		}
+
+		uasort($brackets, 'bracket_comp');
+
+		if( $this->Application->GetLinkedVar('CostsTableAligment') )
+		{
+			$column_items = $brackets;
+			$column_object =& $brackets_object;
+			$column_params['header_caption'] = 'bracket_caption';
+			$column_params['IdField'] = 'BracketId';
+			$column_params['prefix'] = 'br';
+
+			$row_items = $zones;
+			$row_object =& $zones_object;
+			$row_params['header_caption'] = 'zone_caption';
+			$row_params['IdField'] = 'ZoneID';
+			$row_params['prefix'] = 'z';
+		}
+		else
+		{
+			$column_items = $zones;
+			$column_object =& $zones_object;
+			$column_params['header_caption'] = 'zone_caption';
+			$column_params['IdField'] = 'ZoneID';
+			$column_params['prefix'] = 'z';
+
+			$row_items = $brackets;
+			$row_object =& $brackets_object;
+			$row_params['header_caption'] = 'bracket_caption';
+			$row_params['IdField'] = 'BracketId';
+			$row_params['prefix'] = 'br';
+		}
+
+		$costs_table = '<tr class="'.$main_processor->Odd_Even($oddevenparam).'"><td>&nbsp;</td>';
+
+		foreach($column_items as $id => $record)
+		{
+			$column_object->Load($id);
+			$head_row_params = $column_params;
+			$head_row_params['name'] = 'column_header';
+			$costs_table .= $this->Application->ParseBlock($head_row_params);
+		}
+		$costs_table .= '</tr>';
+
+		$cost_ids = Array();
+		foreach($row_items as $id =>$record)
+		{
+			$costs_table .= '<tr class="'.$main_processor->Odd_Even($oddevenparam).'">';
+			$row_object->Load($id);
+			$head_row_params = $row_params;
+			$head_row_params['name'] = 'row_header';
+			$costs_table .= $this->Application->ParseBlock($head_row_params);
+			foreach($column_items as $col_id => $col_record)
+			{
+				$res = false;
+
+				foreach($costs_array as $cost_id => $cost_record)
+				{
+					if($cost_record[$row_params['IdField']] == $id && $cost_record[$column_params['IdField']] == $col_id)
+					{
+						$costs_object->SetDBFieldsFromHash($cost_record);
+						$res = true;
+						break;
+					}
+				}
+
+				if($res == false)
+				{
+					$costs_object->SetDefaultValues();
+					$sql = 'SELECT MIN(ShippingCostId) FROM '.$costs_object->TableName;
+					$new_id = $cost_ids ? min( $this->Conn->GetOne($sql) - 1, min($cost_ids) - 1 ) : 0;
+					$costs_object->SetDBField( 'ShippingCostId', $new_id );
+					$cost_ids[] = $new_id;
+				}
+				$column_object->Load($col_id);
+				$costs_object->SetID($costs_object->GetDBField('ShippingCostId'));
+				$cost_cell_params['name'] = 'cost_cell';
+
+				$costs_table .= $this->Application->ParseBlock($cost_cell_params);
+			}
+			$costs_table .= '</tr>';
+		}
+		return $costs_table;
+	}
+
+	function HiddenSelection($params)
+	{
+		// $object = $this->getPrefixSpecial();
+
+		$zones = $this->Application->GetVar('z');
+		$brackets = $this->Application->GetVar('br');
+
+		$ret = '';
+		foreach($zones as $id => $record)
+		{
+			$ret .= '<input type="hidden" name="z['.$id.'][ZoneID]" value="'.$id.'">'."\n";
+		}
+		foreach ($brackets as $id => $record)
+		{
+			$ret .= '<input type="hidden" name="br['.$id.'][BracketId]" value="'.$id.'">'."\n";
+		}
+		return $ret;
+	}
+
+	function Order_PrintShippingTypes($params)
+	{
+		$weight = $this->Application->Parser->GetParam('weight_metric');
+		$items = $this->Application->Parser->GetParam('items');
+		$amount = $this->Application->Parser->GetParam('amount');
+		$selected_id = $this->Application->Parser->GetParam('selected_id');
+		$package_id = $this->Application->Parser->GetParam('package_num');
+
+		// free promo shipping params if applicable, if not then the same as standard
+		$promo_items = $this->Application->Parser->GetParam('promo_items');
+		$promo_amount = $this->Application->Parser->GetParam('promo_amount');
+		$promo_weight = $this->Application->Parser->GetParam('promo_weight_metric');
+		
+		$user_country_id = $this->Application->Parser->GetParam('user_country_id');
+		$user_state_id = $this->Application->Parser->GetParam('user_state_id');
+		$user_zip = $this->Application->Parser->GetParam('user_zip');
+		$user_city = $this->Application->Parser->GetParam('user_city');
+		$user_addr1 = $this->Application->Parser->GetParam('user_addr1');
+		$user_addr2 = $this->Application->Parser->GetParam('user_addr2');
+		$user_name = $this->Application->Parser->GetParam('user_name');
+
+		$limit_types = $this->Application->Parser->GetParam('limit_types');
+
+		$this->Application->recallObject('ShippingQuoteEngine');
+		$quote_engine_collector =& $this->Application->recallObject('ShippingQuoteCollector');
+
+		$shipping_quote_params = Array(
+						'dest_country'	=>	$user_country_id,
+						'dest_state'	=>	$user_state_id,
+						'dest_postal'	=>	$user_zip,
+						'dest_city'		=>	$user_city,
+						'dest_addr1'	=>	$user_addr1,
+						'dest_addr2'	=>	$user_addr2,
+						'dest_name'		=>	$user_name,
+						'packages' 		=>	Array(
+												Array(
+													'package_key'	=>	'package1',
+													'weight'		=>	$weight,
+													'weight_unit'	=>	'KG',
+													'length'		=>	'',
+													'width'			=>	'',
+													'height'		=>	'',
+													'dim_unit'		=>	'IN',
+													'packaging'		=>	'BOX',
+													'contents'		=>	'OTR',
+													'insurance'		=>	'0'
+												),
+											),
+						'amount'		=>	$amount,
+						'items'			=>	$items,						
+						'limit_types' 	=> 	$limit_types,
+						'promo_params'	=>	Array (
+													'items'		=>	$promo_items,
+													'amount'	=>	$promo_amount,
+													'weight'	=>	$promo_weight,
+													)					
+					);
+
+		$shipping_types = $quote_engine_collector->GetShippingQuotes($shipping_quote_params);
+
+		$last_shippings = $this->Application->RecallVar('LastShippings');
+		if($last_shippings)
+		{
+			$last_shippings = unserialize($last_shippings);
+		}
+
+		$order_object =& $this->Application->recallObject('ord');
+		$original_shipping = $order_object->GetDBField('ShippingInfo');
+		$original_shipping = unserialize($original_shipping);
+		$shipping_type_keys = array_keys($shipping_types);
+		if(	getArrayValue($original_shipping, $package_id, 'ShippingId') &&
+			( $this->Application->IsAdmin() || in_array( $original_shipping[$package_id]['ShippingId'], $shipping_type_keys ) ) )
+		{
+			$original_shipping = $original_shipping[$package_id];
+			$key = $original_shipping['ShippingId'];
+			$shipping_types[$key]['TotalCost'] = $this->Application->IsAdmin() ? $original_shipping['TotalCost'] : $shipping_types[$key]['TotalCost'];
+			$shipping_types[$key]['ShippingName'] = $this->Application->IsAdmin() ? 'Original: '.$original_shipping['ShippingName'] : $shipping_types[$key]['ShippingName'];
+			$shipping_types[$key]['ShippingId'] = $key;
+			$selected_id = $key;
+		}
+
+		$last_shippings[$package_id] = $shipping_types;
+		if( $this->Application->IsAdmin() && $key)
+		{
+			$orig_name = ltrim($last_shippings[$package_id][$key]['ShippingName'], 'Original: ');
+			$last_shippings[$package_id][$key]['ShippingName'] = $orig_name;
+		}
+		$this->Application->StoreVar('LastShippings', serialize($last_shippings));
+
+		$o = '';
+		$def_block_params = Array();
+		$def_block_params['name'] = $this->SelectParam($params, 'render_as,block');
+
+		if(!count($shipping_types))
+		{
+			$this->Application->SetVar('ItemShipmentsExists', 0);
+			$o = '';
+		}
+		else
+		{
+			$lang =& $this->Application->recallObject('lang.current');
+			foreach ($shipping_types as $shipping_type) {
+
+				$shipping_type['ShippingFree'] = ($shipping_type['TotalCost'] == 0)? 1 : 0;
+				$iso = $this->GetISO($params['currency']);				
+				$amount = $this->ConvertCurrency($shipping_type['TotalCost'], $iso);
+				$amount = $lang->formatNumber($amount,2);
+				$shipping_type['TotalCost'] = $this->AddCurrencySymbol($amount, $iso);
+
+				$block_params = array_merge($def_block_params, $shipping_type);
+				$block_params['selected'] = $shipping_type['ShippingId'] == $selected_id ? 'selected' : '';
+				if (isset($params['selected_only']) && $block_params['selected'] == '') continue;
+				$o .= $this->Application->ParseBlock($block_params);
+			}
+		}
+		return $o;
+	}
+
+	function AvailableTypes($params)
+	{
+		$quote_engine_collector =& $this->Application->recallObject('ShippingQuoteCollector');
+		$types = $quote_engine_collector->GetAvailableShippingTypes();
+
+		$o;
+		foreach ($types as $a_type)
+		{
+			$block_params = $a_type;
+			$block_params['name']	= $params['render_as'];
+			$o .= $this->Application->ParseBlock($block_params);
+		}
+		return $o;
+	}
+
+	function ListGroups($params)
+	{
+
+		$object =& $this->getObject($params);
+		$selected = trim($object->GetDBField('PortalGroups'), ',');
+		$selected_arr = explode(',', $selected);
+		$all_groups = $this->Conn->Query('SELECT GroupId, Name FROM '.TABLE_PREFIX.'PortalGroup ORDER BY NAME', 'GroupId');
+
+
+		$o = '';
+		foreach ($all_groups as $a_group)
+		{
+			$is_selected = in_array($a_group['GroupId'], $selected_arr);
+			$continue = $params['mode'] == 'selected' ? !$is_selected : $is_selected;
+			if ($continue) continue;
+			$block_params = $a_group;
+			$block_params['name']	= $params['render_as'];
+			$o .= $this->Application->ParseBlock($block_params);
+		}
+		return $o;
+	}
+
+
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/shipping/shipping_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.13.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/shipping/shipping_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/shipping/shipping_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/shipping/shipping_event_handler.php	(revision 12131)
@@ -0,0 +1,196 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class ShippingEventHandler extends kDBEventHandler {
+
+	/**
+	 * Allows to override standart permission mapping
+	 *
+	 */
+	function mapPermissions()
+	{
+		parent::mapPermissions();
+		$permissions = Array(
+								'OnFlip'			=>	Array('self' => 'add|edit'),
+								'OnApplyModifier'	=>	Array('self' => 'add|edit'),
+						);
+		$this->permMapping = array_merge($this->permMapping, $permissions);
+	}
+
+	/**
+	 * Presets shipping cost object based on shipping fields
+	 *
+	 * @param kEvent $event
+	 */
+	function OnAfterItemLoad(&$event)
+	{
+		$object =& $event->getObject();
+
+		$format = '%01.'.$object->GetDBField('PrecisionAfterSep').'f'; // %01.2f
+		$zero_if_empty = $object->GetDBField('ZeroIfEmpty');
+
+		$sc_object =& $this->Application->recallObject('sc', null, Array ('raise_warnings' => 0));
+		/* @var $sc_object kDBItem */
+
+		$flat_options = $sc_object->GetFieldOptions('Flat');
+		$flat_options['format'] = $format;
+		$flat_options['default'] = $zero_if_empty ? 0 : null;
+		$sc_object->SetFieldOptions('Flat', $flat_options);
+
+		$perunit_options = $sc_object->GetFieldOptions('PerUnit');
+		$perunit_options['format'] = $format;
+		$perunit_options['default'] = $zero_if_empty ? 0 : null;
+		$sc_object->SetFieldOptions('PerUnit', $perunit_options);
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 * @return unknown
+	 */
+	function OnApplyModifier(&$event)
+	{
+	//	$event->CallSubEvent('');
+
+		$zones_object =& $this->Application->recallObject('z');
+		$cost_object =& $this->Application->recallObject('sc');
+		$object = $event->getObject();
+
+		$operation = $this->Application->GetVar('operation');
+
+		$formatter =& $this->Application->recallObject('kFormatter');
+		$modify_by = $formatter->TypeCast($this->Application->GetVar('modify_by'), array('type'=>'float'));
+		$cost_type = $object->GetDBField('CostType');
+
+		$brackets = $this->Application->GetVar('br');
+		$zones = $this->Application->GetVar('z');
+		$conditions = Array();
+		if( is_array($zones) ) {
+			$conditions['zones'] = 'ZoneID IN ('.implode( ',', array_keys($zones) ).')';
+		}
+		if( is_array($brackets) ) {
+			$conditions['brackets'] = 'BracketId IN ('.implode( ',', array_keys($brackets) ).')';
+		}
+		$conditions = implode(' OR ', $conditions);
+
+		if(!$conditions)
+		{
+			$this->finalizePopup($event);
+			return false;
+		}
+
+		$sql = 'SELECT ShippingCostId FROM '.$cost_object->TableName.' WHERE '.$conditions;
+		$res = $this->Conn->GetCol($sql);
+
+		switch($cost_type)
+		{
+			case 1:
+				$affected_fields = Array(0 => 'Flat');
+				break;
+			case 2:
+				$affected_fields = Array(0 => 'PerUnit');
+				break;
+			default:
+				$affected_fields = Array(0 => 'PerUnit', 1 => 'Flat');
+		}
+		foreach($affected_fields as $field)
+		{
+			if($operation == '/' && $modify_by == 0) break;
+			$sql = 'UPDATE '.$cost_object->TableName.'
+					SET '.$field.'='.$field.$operation.$modify_by.'
+					WHERE ShippingCostId IN ('.implode(',', $res).')
+					AND NOT('.$field.' IS NULL)
+					AND '.$field.$operation.$modify_by.'>=0';
+			$this->Conn->Query($sql);
+		}
+
+		$this->finalizePopup($event);
+	}
+
+	function OnFlip(&$event)
+	{
+		$object =& $event->getObject();
+		$aligment = $this->Application->GetLinkedVar('CostsTableAligment');
+		$new_align = $aligment ? 0 : 1;
+		$this->Application->SetVar('CostsTableAligment', $new_align);
+		$this->Application->LinkVar('CostsTableAligment');
+
+		$this->OnPreSave($event);
+
+		$event->status=erSUCCESS;
+	}
+
+	function OnSave(&$event)
+	{
+		$this->OnAfterItemLoad($event);
+
+		parent::OnSave($event);
+	}
+
+	function OnAfterItemCreate(&$event)
+	{
+		$event->CallSubEvent('OnAnyChange');
+	}
+
+	function OnAfterItemUpdate(&$event)
+	{
+		$event->CallSubEvent('OnAnyChange');
+	}
+
+	function OnAfterItemDelete(&$event)
+	{
+		$event->CallSubEvent('OnAnyChange');
+	}
+
+	function OnAnyChange(&$event)
+	{
+		$sql = 'DELETE FROM '.TABLE_PREFIX.'Cache WHERE VarName LIKE "ShippingQuotes%"';
+		$this->Conn->Query($sql);
+	}
+
+	function OnPreSaveCreated(&$event){
+		parent::OnPreSaveCreated($event);
+
+		$default_group = $this->Application->ConfigValue('User_LoggedInGroup');
+
+		$object =& $event->getObject( Array('skip_autoload' => true) );
+
+		$object->SetDBField('PortalGroups', ','.$default_group.',');
+	}
+
+	function UpdateGroups(&$event){
+		$object = &$event->getObject();
+
+		if ($event->Name == 'OnPreSaveCreated') {
+			$default_group = $this->Application->ConfigValue('User_LoggedInGroup');
+			$selected_groups = $default_group;
+		}
+		else {
+			$selected_groups = $object->GetDBField('PortalGroups');
+		}
+
+		if ($selected_groups && $selected_groups!='') {
+			$selected_groups = str_replace('|', ',', $selected_groups);
+			$selected_groups = ','.trim($selected_groups, ',').',';
+			$object->SetDBField('PortalGroups', $selected_groups);
+		}
+	}
+
+	function customProcessing(&$event, $when){
+		$this->UpdateGroups($event);
+
+	}
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/shipping/shipping_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.14.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/shipping/shipping_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/shipping/shipping_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/shipping/shipping_config.php	(revision 12131)
@@ -0,0 +1,166 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+$config	=	Array(
+					'Prefix'			=>	's',
+					'ItemClass'			=>	Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'ShippingEventHandler','file'=>'shipping_event_handler.php','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'ShippingTagProcessor','file'=>'shipping_tag_processor.php','build_event'=>'OnBuild'),
+					'AutoLoad'			=>	true,
+					'AggregateTags' => Array(
+															Array(
+																'AggregateTo' => 'ord',
+																'AggregatedTagName' => 'PrintShippingTypes',
+																'LocalTagName' => 'Order_PrintShippingTypes',
+															),
+													),
+					'Hooks'				=>	Array(
+												Array(
+													'Mode' => hBEFORE,
+													'Conditional' => true,
+													'HookToPrefix' => 'sc',
+													'HookToSpecial' => '',
+													'HookToEvent' => Array( 'OnPropagate', 'OnClearAll' ),
+													'DoPrefix' => '',
+													'DoSpecial' => '',
+													'DoEvent' => 'OnPreSave',
+												),
+											),
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'page',
+												3	=>	'event',
+												4	=>	'mode',
+											),
+					'IDField'			=>	'ShippingID',
+					'StatusField'		=>	Array('Status'),
+					'TitleField'		=>  'Name',
+
+					'TitlePresets'		=>	Array(
+												'default'	=>	Array(	'new_status_labels'		=> Array('s'=>'!la_title_AddingShippingType!'),
+																		'edit_status_labels'	=> Array('s'=>'!la_title_EditingShippingType!'),
+																		'new_titlefield'		=> Array('s'=>'!la_title_NewShippingType!'),
+																),
+												'shipping_list'=>Array(		'prefixes'				=> Array('s_List'),
+																			'format'				=>	"!la_title_ShippingTypes!",
+																),
+												'shipping_type_edit'=>Array(	'prefixes'				=> Array('s'),
+																				'format'				=> "#s_status# '#s_titlefield#' - !la_title_General!",
+																),
+
+												'zones'		=>	Array('prefixes' => Array('s'), 'format' => "#s_status# '#s_titlefield#' - !la_title_Zones!"),
+												'brackets'	=>	Array('prefixes' => Array('s'), 'format' => "#s_status# '#s_titlefield#' - !la_title_Brackets!"),
+												'costs'	=>	Array('prefixes' => Array('s'), 'format' => "#s_status# '#s_titlefield#' - !la_title_Costs!"),
+												'groups'	=>	Array('prefixes' => Array('s'), 'format' => "#s_status# '#s_titlefield#' - !la_title_Groups!"),
+												'select_modifier'	=>	Array('prefixes' => Array('s'), 'format' => "!la_title_ApplyModifier!"),
+											),
+
+					'EditTabPresets' => Array (
+						'Default' => Array (
+							'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/shipping/shipping_edit', 'priority' => 1),
+							'zones' => Array ('title' => 'la_tab_ShippingZones', 't' => 'in-commerce/shipping/shipping_zones', 'priority' => 2),
+							'brackets' => Array ('title' => 'la_tab_Brackets', 't' => 'in-commerce/shipping/shipping_brackets', 'priority' => 3),
+							'costs' => Array ('title' => 'la_tab_Costs', 't' => 'in-commerce/shipping/shipping_costs', 'priority' => 4),
+							'groups' => Array ('title' => 'la_tab_Groups', 't' => 'in-commerce/shipping/shipping_type_groups', 'priority' => 5),
+						),
+					),
+
+					'PermSection'		=>	Array('main' => 'in-commerce:shipping'),
+
+					'Sections'			=>	Array(
+						'in-commerce:shipping_folder'	=>	Array(
+							'parent'		=>	'in-commerce:setting_folder',
+							'icon'			=>	'shipping',
+							'label'			=>	'la_tab_Shipping',
+							'permissions'	=>	Array(),
+							'priority'		=>	4,
+							'type'			=>	stTREE,
+						),
+
+						'in-commerce:shipping'	=>	Array(
+							'parent'		=>	'in-commerce:shipping_folder',
+							'icon'			=>	'shipping',
+							'label'			=>	'la_tab_CustomShippingTypes',
+							'url'			=>	Array('t' => 'in-commerce/shipping/shipping_custom_list', 'pass' => 'm'),
+							'permissions'	=>	Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'),
+							'priority'		=>	4.1,
+							'type'			=>	stTAB,
+						),
+					),
+
+					'TableName'			=>	TABLE_PREFIX.'ShippingType',
+
+					'SubItems'	=> Array('z', 'br'),
+
+					'FilterMenu'		=>	Array(
+												'Groups' => Array(
+													Array('mode' => 'AND', 'filters' => Array('show_active','show_disabled'), 'type' => WHERE_FILTER),
+												),
+												'Filters' => Array(
+													'show_active'	=>	Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
+													'show_disabled'	=>	Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0'  ),
+												)
+											),
+
+					'ListSQLs'			=>	Array(	''=>	'SELECT * FROM %s'),
+																		 // key - special, value - list select sql
+					'ItemSQLs'			=>	Array(	''=>	'SELECT * FROM %s'),
+
+					'ListSortings'	=> 	Array(
+																'' => Array(
+																	'Sorting' => Array('Name' => 'asc'),
+																)
+															),
+					'Fields'			=>	Array(
+											    'ShippingID' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+											    'Code' => Array('type' => 'string', 'not_null' => 1, 'default' => '', 'required'=>true, 'max_len'=>25, 'error_msgs' => Array('required' => 'Please fill in')),
+											    'Name' => Array('type' => 'string', 'not_null' => 1, 'default' => '', 'required'=>true, 'max_len'=>100, 'error_msgs' => Array('required' => 'Please fill in')),
+											    'SpeedCode' => Array('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => true, 'max_len' => 25),
+											    'LocationFrom' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'Riga', 2 => 'Salaspils', 3 => 'Chicago', 4 => 'Dublin'), 'not_null' => true, 'default' => 1),
+											    'Type' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(1 => 'la_ByWeight', 2 => 'la_ByItem', 3 => 'la_ByAmount', 4 => 'la_Handling'), 'not_null' => true, 'default' => 1),
+											    'BaseFee' => Array('type'=>'float', 'min_value_inc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => true),
+											    'CODFlatSurcharge' => Array('type'=>'float', 'min_value_inc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => true),
+											    'CODPercentSurcharge' => Array('type'=>'float', 'min_value_inc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => true),
+												'Status' => Array('type' => 'int', 'options' => Array ( 1 => 'la_Active', 0 => 'la_Disabled', 2 => 'la_SelectedOnly' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => true ),
+												'CostType' => Array('type' => 'int', 'options' => Array ( 1 => 'la_Flat', 2 => 'la_PerUnit', 3 => 'la_Combined' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => true ),
+												'ZeroIfEmpty' => Array('type' => 'int', 'options' => Array ( 1 => 'la_Zeros', 0 => 'la_NoShipments' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => true ),
+												'PrecisionBeforeSep' => Array('type' => 'int', 'options' => Array ( 1 => '1 digit', 2 => '2 digits', 3 => '3 digits', 4 => '4 digits' ), 'default' => 2, 'not_null' => true ),
+												'PrecisionAfterSep' => Array('type' => 'int', 'options' => Array ( 0 => 'none', 1 => '1 digit', 2 => '2 digits' ), 'default' => 2, 'not_null' => true ),
+												'PortalGroups' => Array('type' => 'string', 'not_null' => 1, 'default' => 0,),
+												'FreeShippingMinAmount'	=>	Array('type' => 'float', 'formatter' => 'kFormatter', 'not_null' => 1, 'format' => '%.2f', 'default' => 0),
+												'IsFreePromoShipping' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+												'InsuranceFee' => Array('type' => 'float', 'default' => null),
+												'InsuranceType' => Array (
+													'type' => 'int',
+													'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (2 => 'la_Percent', 1 => 'la_Flat',),
+													'not_null' => 1, 'default' => 2
+												),
+											),
+
+					'Grids'	=> Array(
+								'Default'		=>	Array(
+																	'Icons' => Array('default'=>'icon16_shipping.gif', 0=>'icon16_shipping_disabled.gif', 1=>'icon16_shipping.gif'),
+																	'Fields' => Array(
+																				'ShippingID' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+																				'Name' => Array( 'title'=>'la_col_ShippingName', 'filter_block' => 'grid_range_filter'),
+																				'Type' => Array( 'title'=>'la_col_ShippingType', 'filter_block' => 'grid_options_filter'),
+																				'BaseFee' => Array( 'title'=>'la_col_BaseFee', 'filter_block' => 'grid_float_range_filter'),
+																				/*'CODFlatSurcharge' => Array( 'title'=>'la_col_CODFlatSurcharge', 'filter_block' => 'grid_float_range_filter'),*/
+																			),
+
+																),
+													),
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/shipping/shipping_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.16.2.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/parser.php
===================================================================
--- branches/5.1.x/in-commerce/units/parser.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/parser.php	(revision 12131)
@@ -0,0 +1,14 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/parser.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gateway_field_values/gateway_field_values_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/gateway_field_values/gateway_field_values_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gateway_field_values/gateway_field_values_config.php	(revision 12131)
@@ -0,0 +1,48 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+$config	=	Array(
+					'Prefix'			=>	'gwfv',
+					'ItemClass'			=>	Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'kDBEventHandler','file'=>'','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
+					'AutoLoad'			=>	false,
+					'hooks'				=>	Array(),
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'page',
+												3	=>	'event',
+											),
+					'IDField'			=>	'GWConfigValueId',
+					'TableName'			=>	TABLE_PREFIX.'GatewayConfigValues',
+					'ForeignKey' => 'PaymentTypeId',
+					'ParentTableKey' => 'PaymentTypeId',
+					'ParentPrefix' => 'pt',
+					'AutoDelete'	=> true,
+					'AutoClone'	=> true,
+
+					'ListSQLs'			=>	Array	(''=>'SELECT * FROM %s'
+													), // key - special, value - list select sql
+					'ItemSQLs'			=>	Array(	''=>'SELECT * FROM %s',
+																		),
+
+					'Fields' => Array (
+						'GWConfigValueId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
+			            'GWConfigFieldId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
+			            'PaymentTypeId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
+			            'Value' => Array('type' => 'string', 'max_len' => 255, 'default' => null, ),
+					),
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gateway_field_values/gateway_field_values_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/taxes/taxes_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/taxes/taxes_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/taxes/taxes_config.php	(revision 12131)
@@ -0,0 +1,112 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+$config	=	Array(
+					'Prefix'			=>	'tax',
+					'ItemClass'			=>	Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'TaxesEventHandler','file'=>'taxes_event_handler.php','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'TaxesTagProcessor','file'=>'taxes_tag_processor.php','build_event'=>'OnBuild'),
+					'AutoLoad'			=>	true,
+					'hooks'				=>	Array(),
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'page',
+												3	=>	'event',
+												4	=>	'mode',
+											),
+
+					/*'Hooks'				=>	Array(
+							Array(
+								'Mode' => hBEFORE,
+								'Conditional' => true,
+								'HookToPrefix' => 'tax',
+								'HookToSpecial' => '',
+								'HookToEvent' => Array( 'onEdit' ),
+								'DoPrefix' => '',
+								'DoSpecial' => '',
+								'DoEvent' => 'OnLoadZoneForm',
+							),
+						),*/
+					'IDField'			=>	'TaxZoneId',
+					'TitleField'		=>  'Name',
+					'TitlePresets'		=>	Array(
+												'default'	=>	Array(	'new_status_labels'		=> Array('tax'=>'!la_title_AddingTaxZone!'),
+																		'edit_status_labels'	=> Array('tax'=>'!la_title_EditingTaxZone!'),
+																		'new_titlefield'		=> Array('tax'=>'!la_title_NewTaxZone!'),
+																),
+												'taxes_list'=>Array(	'prefixes'				=> Array('tax_List'),
+																		'format'				=>	"!la_title_Taxes!",
+																),
+												'taxes_edit'=>Array(	'prefixes'				=> Array('tax'),
+																		'new_titlefield'		=> Array('tax'=>'!la_title_NewTax!'),
+																		'format'				=> "#tax_status# '#tax_titlefield#' - !la_title_General!",
+																),
+
+
+											),
+					'PermSection'		=>	Array('main' =>'in-commerce:taxes'),
+
+					'Sections'			=>	Array(
+						'in-commerce:taxes'	=>	Array(
+							'parent'		=>	'in-commerce:setting_folder',
+							'icon'			=>	'taxes',
+							'label'			=>	'la_tab_Taxes',
+							'url'			=>	Array('t' => 'in-commerce/taxes/taxes_list', 'pass' => 'm'),
+							'permissions'	=>	Array('view', 'add', 'edit', 'delete'),
+							'priority'		=>	6,
+							'type'			=>	stTREE,
+						),
+					),
+
+					'TableName'			=>	TABLE_PREFIX.'TaxZones',
+					'AutoDelete'	=>	true,
+					'AutoClone'	=> true,
+
+					'SubItems' =>	Array('taxdst'),
+
+					'ListSQLs'			=>	Array(	''=>	'SELECT %1$s.* %2$s FROM %s'),
+																		 // key - special, value - list select sql
+
+
+					'ListSortings'	=> 	Array(
+																'' => Array(
+																	'Sorting' => Array('Name' => 'asc', 'TaxValue' => 'asc'),
+																)
+															),
+					'Fields'			=>	Array(
+											    'TaxZoneId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
+											    'Name' => Array('type' => 'string', 'not_null' => 1, 'default' => '', 'required'=>true, 'max_len'=>100, 'error_msgs' => Array('required' => 'Please fill in')),
+											    'Type' => Array('type'=>'int', 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(1 => 'la_ByCountry', 2 => 'la_ByState', 3 => 'la_ByZIP'), 'not_null' => true, 'default' => 1),
+											    'TaxValue' => Array('type'=>'double', 'not_null' => true, 'default' => 0),
+											    'ApplyToShipping' => Array('type' => 'int', 'not_null' => true, 'default' => 0, 'formatter'=>'kOptionsFormatter', 'use_phrases'=>1, 'options'=>array(0=>'la_No', 1=>'la_Yes')),
+											    'ApplyToProcessing' => Array('type' => 'int', 'not_null' => true, 'default' => 0, 'formatter'=>'kOptionsFormatter', 'use_phrases'=>1, 'options'=>array(0=>'la_No', 1=>'la_Yes')),
+											),
+
+					'Grids'	=> Array(
+								'Default'		=>	Array(
+																	'Icons' => Array('default'=>'icon16_tax.gif'),
+																	'Fields' => Array(
+																			'TaxZoneId' => Array('title'=>'la_col_Id', 'data_block'=>'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+																			'Name' => Array( 'width'=>150, 'title'=>'la_col_ZoneName', 'filter_block' => 'grid_like_filter'),
+																			'Type' => Array( 'width'=>100, 'title'=>'la_col_ZoneType', 'filter_block' => 'grid_options_filter'),
+																			'TaxValue' => Array( 'width'=>100, 'title'=>'la_col_TaxValue', 'filter_block' => 'grid_float_range_filter'),
+																			'ApplyToShipping' => Array( 'width'=>60, 'title'=>'la_col_TaxApplyToShipping', 'filter_block' => 'grid_options_filter'),
+																			'ApplyToProcessing' => Array( 'width'=>60, 'title'=>'la_col_TaxApplyToProcessing', 'filter_block' => 'grid_options_filter'),
+																			),
+
+																),
+													),
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/taxes/taxes_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.11.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/taxes/taxes_tag_processor.php
===================================================================
--- branches/5.1.x/in-commerce/units/taxes/taxes_tag_processor.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/taxes/taxes_tag_processor.php	(revision 12131)
@@ -0,0 +1,490 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class TaxesTagProcessor extends kDBTagProcessor 
+{
+	/*
+	function ShowDestinations($param)
+	{
+		$zone =& $this->Application->recallObject('tax');
+		$zone->SetDBField('TaxZoneId', $zone->ID);
+		$destination =& $this->Application->recallObject('taxdst');
+		
+		if(!$this->Application->GetVar('loaded'))
+		{									
+			if ($zone->GetID() == 0)
+			{
+				$this->Application->DeleteVar('taxdst');
+			}
+			else 
+			{
+				$sql = 'SELECT * FROM '.$destination->TableName.' WHERE TaxZoneId='.$zone->GetID();
+				$res = $this->Conn->Query($sql);
+				if (is_array($res)) foreach ($res as $dest_record)
+				{
+					$temp[$dest_record['TaxZoneDestId']]['TaxZoneDestId'] = $dest_record['TaxZoneDestId'];
+					$temp[$dest_record['TaxZoneDestId']]['StdDestId'] = $dest_record['StdDestId'];
+					$temp[$dest_record['TaxZoneDestId']]['DestValue'] = $dest_record['DestValue'];
+				}
+				$this->Application->SetVar('taxdst', $temp);
+			}
+		}
+		$destination =& $this->Application->recallObject('taxdst');
+		
+		$hidden_clause = '<input type="hidden" name="loaded" value="1"><input type="hidden" name="zone_id" value="'.$zone->GetDBField('TaxZoneId').'">';
+		
+		switch ( $zone->GetDBField('Type') )
+		{
+			case 1:
+				
+				$sql = 'SELECT * FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=1';
+				$res = $this->Conn->Query($sql, 'DestId');
+				
+				$dropdown = '<select name="country">'."\n";
+				foreach ($res as $record)
+				{
+					$dropdown .= '<option value="'.$record['DestId'].'">'.$this->Application->Phrase($record['DestName']).'</option>'."\n";
+				}
+				$dropdown .= '</select>'."\n";
+				
+				$form_params = Array();
+				$form_params['dropdown'] = $dropdown;
+				$form_params['block'] = $param['block'];
+				$form_params['res'] = $res;
+				$ret = $this->ShowDestionationForm($form_params);
+				break;
+			case 2:
+
+				$country_sql = 'SELECT d1.* FROM '.TABLE_PREFIX.'StdDestinations d1,
+								'.TABLE_PREFIX.'StdDestinations d2								
+								WHERE d1.DestType=1 AND d1.DestId=d2.DestParentId
+								GROUP BY d1.DestId';
+				if( !($current_country = $this->Application->GetVar('StatesCountry')) )
+				{
+					$current_country_sql = 'SELECT sd.DestParentId FROM '.TABLE_PREFIX.'StdDestinations sd
+												LEFT JOIN '.$destination->TableName.' zd
+												ON zd.StdDestId = sd.DestId
+												WHERE sd.DestType=2 AND zd.TaxZoneId='.$zone->GetDBField('TaxZoneId');
+					if($zone->GetDBField('TaxZoneId'))
+					{
+						$current_country = $this->Conn->GetOne($current_country_sql);
+					}
+					
+					if(!$current_country)
+					{
+						$current_country_sql = 'SELECT DestId FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=1';
+						$current_country = $this->Conn->GetOne($current_country_sql);
+					}
+				}				
+				$states_sql = 'SELECT * FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=2 AND DestParentId='.$current_country;
+				$countries = $this->Conn->Query($country_sql, 'DestId');
+				$states = $this->Conn->Query($states_sql, 'DestId');
+				
+				if($countries)
+				{
+					$countries_dropdown = '<select name="StatesCountry" onchange="submit_event(\'tax\', \'OnCountryChange\')">'."\n";
+					foreach ($countries as $record)
+					{
+						$countries_dropdown .= '<option value="'.$record['DestId'].'" ';
+						if($record['DestId'] == $current_country)
+						{
+							$countries_dropdown .= 'selected';
+						}
+						$countries_dropdown .= '>'.$this->Application->Phrase($record['DestName']).'</option>'."\n";
+					}
+					$countries_dropdown .= '</select>'."\n";
+				}
+				
+				if($states)
+				{
+					$states_dropdown = '<select name="state">'."\n";
+					foreach ($states as $id => $record)
+					{
+						$states_dropdown .= '<option value="'.$record['DestId'].'">'.$this->Application->Phrase($record['DestName']).'</option>'."\n";
+					}
+					$states_dropdown .= '</select>'."\n";
+				}
+				
+				$form_params = Array();
+				$table = '<table border="0"><tr><td>'.$this->Application->Phrase('la_Country').': </td><td>'.$countries_dropdown.'</td></tr>';
+				$table .= '<tr><td>'.$this->Application->Phrase('la_State').': </td><td>'.$states_dropdown.'</td></tr></table>';
+				$form_params['dropdown'] = $table;
+				$form_params['block'] = $param['block'];
+				$form_params['res'] = $states;
+				$ret = $this->ShowDestionationForm($form_params);
+				
+				break;
+			case 3:
+				
+			if( !($current_country = $this->Application->GetVar('StatesCountry')) )
+				{
+					$current_country_sql = 'SELECT sd.DestParentId FROM '.TABLE_PREFIX.'StdDestinations sd
+												LEFT JOIN '.$destination->TableName.' zd
+												ON zd.StdDestId = sd.DestId
+												WHERE sd.DestType=2 AND zd.TaxZoneId='.$zone->GetDBField('TaxZoneId');
+					if($zone->GetDBField('TaxZoneId'))
+					{
+						$current_country = $this->Conn->GetOne($current_country_sql);
+					}
+
+					if(!$current_country)
+					{
+						$current_country_sql = 'SELECT StdDestId FROM '.$destination->TableName.' WHERE TaxZoneId='.$zone->GetID();
+						$current_country = $this->Conn->GetOne($current_country_sql);
+					}						
+					
+					if(!$current_country)
+					{
+						$current_country_sql = 'SELECT DestId FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=1';
+						$current_country = $this->Conn->GetOne($current_country_sql);
+					}
+				
+				
+				}
+				
+				$country_sql = 'SELECT d1.* FROM '.TABLE_PREFIX.'StdDestinations d1
+								WHERE d1.DestType=1
+								GROUP BY d1.DestId';			
+				$countries = $this->Conn->Query($country_sql, 'DestId');		
+
+				if($countries)
+				{
+					$countries_dropdown = '<select name="StatesCountry" onchange="submit_event(\'tax\', \'OnCountryChange\')">'."\n";
+					foreach ($countries as $record)
+					{
+						print "<br>";
+						$countries_dropdown .= '<option value="'.$record['DestId'].'" ';
+						if($record['DestId'] == $current_country)
+						{
+							$countries_dropdown .= 'selected';
+						}
+						$countries_dropdown .= '>'.$this->Application->Phrase($record['DestName']).'</option>'."\n";
+					}
+					$countries_dropdown .= '</select>'."\n";
+				}				
+				
+				$sql = 'SELECT DestValue FROM '.$this->Application->getUnitOption('taxdst', 'TableName').' WHERE NOT(DestValue IS NULL) AND DestValue<>"" AND StdDestId='.$current_country;
+				$res = array_unique( $this->Conn->GetCol($sql) );
+				$dropdown = '<input type="text" name="zip_input" id="zip_input" size="15">';
+				if($res)
+				{
+					$dropdown .= ' or <select name="zip_dropdown">'."\n";
+					$dropdown .= '<option value=""></option>';
+					foreach ($res as $record)
+					{
+						$dropdown .= '<option value="'.$record.'">'.$record.'</option>'."\n";
+					}
+					$dropdown .= '</select>'."\n";
+				}
+				
+				$table = '<table border="0"><tr><td>'.$this->Application->Phrase('la_Country').': </td><td>'.$countries_dropdown.'</td></tr>';
+				$table .= '<tr><td>'.$this->Application->Phrase('la_fld_ZIP').': </td><td>'.$dropdown.'</td></tr></table>';
+				
+				$form_params = Array();
+				$form_params['dropdown'] = $table;
+				$form_params['block'] = $param['block'];
+				$form_params['res'] = $res;
+				$ret = $this->ShowDestionationForm($form_params);
+				
+				break;
+			default:
+		}
+		
+		$ret .= $hidden_clause;		
+		return $ret;
+	}
+	*/
+	/*
+	function ShowDestionationForm($param)
+	{
+		$add_button = '<input type="button" class="button" value="'.$this->Application->Phrase('la_btn_AddLocation').'" onclick="submit_event(\'tax\', \'OnAddLocation\')">';
+				
+		$main_processor =& $this->Application->RecallObject('m_TagProcessor');
+		$oddevenparam['odd'] = 'table-color1';
+		$oddevenparam['even'] = 'table-color2';
+		$ret = '<tr class="'.$main_processor->Odd_Even($oddevenparam).'"><td></td><td>'.$param['dropdown'].'</td><td>'.$add_button.'</td></tr>';
+		
+		$dest_list = $this->Application->GetVar('taxdst');
+		if (is_array($dest_list))
+		{
+			
+			
+			if (sizeof($dest_list)>0){
+				$ret .= '<tr class="'.$main_processor->Odd_Even($oddevenparam).'"><td>&nbsp;</td><td>';
+				$ret .= '<select multiple name="location_list" onchange="SelectToString(this)">';
+				$hidden = '';
+				
+				foreach ($dest_list as $id => $destination)
+				{
+					$params = $destination;
+					$params['id'] = $id;
+					$hidden .= '<input type="hidden" id="taxdst['.$destination['TaxZoneDestId'].'][TaxZoneDestId]" name="taxdst['.$destination['TaxZoneDestId'].'][TaxZoneDestId]" value="'.$destination['TaxZoneDestId'].'">';
+					if($destination['StdDestId'] && !$destination['DestValue'])
+					{
+						$params['destination_title'] = $param['res'][$destination['StdDestId']]['DestName'];
+						$hidden .= '<input type="hidden" id="taxdst['.$destination['TaxZoneDestId'].'][StdDestId]" name="taxdst['.$destination['TaxZoneDestId'].'][StdDestId]" value="'.$destination['StdDestId'].'">';
+					}
+					else
+					{
+						$params['destination_title'] = $destination['DestValue'];
+						$hidden .= '<input type="hidden" id="taxdst['.$destination['TaxZoneDestId'].'][DestValue]" name="taxdst['.$destination['TaxZoneDestId'].'][DestValue]" value="'.$destination['DestValue'].'">';
+					}
+					
+					$params['name']	= $param['block'];
+					$ret .= $main_processor->ParseBlock($params);
+				}	
+				$ret .= '</select>';
+						
+				$ret .= '</td><td><input type="button" class="button" value="'.$this->Application->Phrase('la_btn_RemoveLocations').'" onclick="remove_location('.$destination['TaxZoneDestId'].')">';
+				$ret .= $hidden;				
+				$ret .= "&nbsp;</td></tr>";				
+			}else{
+				
+			}
+		}
+		
+//		<input type="hidden" id="taxdst[<inp:m_param name="id"/>][TaxZoneDestId]" name="taxdst[<inp:m_param name="id"/>][TaxZoneDestId]" value="<inp:m_param name="id"/>">
+		return $ret;
+	}
+	*/
+	function ShowCountries($param){
+		
+		$param = $this->prepareTagParams($param);
+		$param['name'] = $param['block'];
+		
+		$destination 	= &$this->Application->recallObject('taxdst');
+		$zone 			= &$this->Application->recallObject('tax');
+				
+		switch ($param['show']){
+			case 'current':
+				$sql = 'SELECT sd.* FROM '.TABLE_PREFIX.'StdDestinations sd
+												LEFT JOIN '.$destination->TableName.' zd
+													ON zd.StdDestId = sd.DestId
+												LEFT JOIN '.TABLE_PREFIX.'Phrase
+													ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName													
+												WHERE sd.DestType=1 
+												AND LanguageId='.$this->Application->GetVar('lang.current_id').'
+												AND zd.TaxZoneId='.$zone->GetDBField('TaxZoneId').'
+												ORDER BY Translation
+												';
+				break;
+			case 'available':
+				$sql = 'SELECT sd.* FROM '.TABLE_PREFIX.'StdDestinations sd
+												LEFT JOIN '.$destination->TableName.' zd
+													ON zd.StdDestId = sd.DestId
+												LEFT JOIN '.TABLE_PREFIX.'Phrase
+													ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName													
+												WHERE sd.DestType=1 
+												AND LanguageId='.$this->Application->GetVar('lang.current_id').'
+												AND zd.TaxZoneId IS NULL
+												ORDER BY Translation
+												';
+				break;		
+			case 'all':
+			
+				$selected_country = $this->Application->GetVar('CountrySelector');
+				if (!$selected_country){
+					// get 1st available country ID
+					$selected_country = $this->Conn->GetOne('SELECT StdDestId FROM '.$destination->TableName.'
+								WHERE TaxZoneId='.$zone->GetDBField('TaxZoneId'));
+					if ($selected_country){
+						$this->Application->SetVar('CountrySelector', $selected_country);
+					}
+				}			
+			
+				$sql = 'SELECT sd.* FROM '.TABLE_PREFIX.'StdDestinations sd
+												LEFT JOIN '.TABLE_PREFIX.'Phrase
+													ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
+												WHERE sd.DestType=1
+												AND LanguageId='.$this->Application->GetVar('lang.current_id').'
+												ORDER BY Translation
+												';
+				break;	
+			case 'has_states':
+				$has_states = $this->Conn->GetCol('SELECT DISTINCT DestParentId FROM '.TABLE_PREFIX.'StdDestinations sd
+												WHERE sd.DestType=2');
+				$selected_country = $this->Application->GetVar('CountrySelector');
+				
+				if ($selected_country && !in_array($selected_country, $has_states)){
+					$selected_country = $has_states[0];
+					$this->Application->SetVar('CountrySelector', $selected_country);
+				}
+				
+				if (!$selected_country){
+					// get 1st available country ID
+					$selected_country = $this->Conn->GetOne('SELECT DestParentId FROM '.TABLE_PREFIX.'StdDestinations sd
+								LEFT JOIN '.$destination->TableName.' zd
+								ON zd.StdDestId = sd.DestId
+								WHERE sd.DestType=2 
+								AND zd.TaxZoneId='.$zone->GetDBField('TaxZoneId'));
+					if ($selected_country){
+						$this->Application->SetVar('CountrySelector', $selected_country);
+					}
+					else {
+						$selected_country = $has_states[0];
+						$this->Application->SetVar('CountrySelector', $selected_country);
+					}
+				}
+				
+				
+				$sql = 'SELECT sd.* FROM '.TABLE_PREFIX.'StdDestinations sd
+												LEFT JOIN '.TABLE_PREFIX.'Phrase
+													ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
+												WHERE sd.DestType=1 
+												AND LanguageId='.$this->Application->GetVar('lang.current_id').'
+												AND DestId IN ('.implode(',', $has_states).') 
+												ORDER BY Translation
+												';
+				break;								
+		}
+		
+		$countries = $this->Conn->Query($sql);
+		$o = '';
+		
+		
+		foreach($countries as $key => $country) {
+			$param['id'] = $country['DestId'];
+			$param['destination_title'] = $this->Application->Phrase($country['DestName']);
+			if (isset($selected_country) && $selected_country == $param['id']){
+				$param['selected'] = ' selected="selected"';
+			}
+			else {
+				$param['selected']='';
+			}
+			$o .= $this->Application->ParseBlock($param);
+		}
+		return $o;
+		
+	}
+	
+	function ShowStates($param){
+		
+		$param = $this->prepareTagParams($param);
+		$param['name'] = $param['block'];
+		
+		$destination 	= &$this->Application->recallObject('taxdst');
+		$zone 			= &$this->Application->recallObject('tax');
+		
+		switch ($param['show']){
+			case 'current':
+				$sql = 'SELECT * FROM '.TABLE_PREFIX.'StdDestinations sd
+												LEFT JOIN '.$destination->TableName.' zd
+													ON zd.StdDestId = sd.DestId
+												LEFT JOIN '.TABLE_PREFIX.'Phrase
+													ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
+												WHERE sd.DestType=2 
+												AND LanguageId='.$this->Application->GetVar('lang.current_id').'
+												AND sd.DestParentId='.$this->Application->GetVar('CountrySelector').'
+												AND zd.TaxZoneId='.$zone->GetDBField('TaxZoneId').'
+												ORDER BY Translation
+												';
+				break;
+			case 'available':
+				$sql = 'SELECT * FROM '.TABLE_PREFIX.'StdDestinations sd
+												LEFT JOIN '.$destination->TableName.' zd
+													ON zd.StdDestId = sd.DestId
+												LEFT JOIN '.TABLE_PREFIX.'Phrase
+													ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
+												WHERE sd.DestType=2 
+												AND LanguageId='.$this->Application->GetVar('lang.current_id').'
+												AND zd.TaxZoneId IS NULL 
+												AND sd.DestParentId='.$this->Application->GetVar('CountrySelector').'
+												ORDER BY Translation
+												';
+												
+				break;		
+			case 'all':
+				$sql = 'SELECT sd.* FROM '.TABLE_PREFIX.'StdDestinations sd
+												LEFT JOIN '.TABLE_PREFIX.'Phrase
+													ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
+												WHERE sd.DestType=2 
+												AND LanguageId='.$this->Application->GetVar('lang.current_id').'
+												AND sd.DestParentId='.$this->Application->GetVar('CountrySelector').'
+												ORDER BY Translation
+												';
+				break;	
+		}		
+		
+		$states = $this->Conn->Query($sql);
+		$o = '';
+		foreach($states as $key => $state) {
+			$param['id'] = $state['DestId'];
+			$param['destination_title'] = $this->Application->Phrase($state['DestName']);
+			$o .= $this->Application->ParseBlock($param);
+		}
+		return $o;
+		
+	}
+	
+	function ShowZips($param){
+		
+		$param = $this->prepareTagParams($param);
+		$param['name'] = $param['block'];
+		
+		$destination 	= &$this->Application->recallObject('taxdst');
+		$zone 			= &$this->Application->recallObject('tax');
+		
+		$country_selector = $this->Application->GetVar('CountrySelector');
+		if (!$country_selector){
+			$country_selector=0;
+		}
+		
+		switch ($param['show']){
+			case 'current':
+				$sql = 'SELECT * FROM '.$destination->TableName.'
+												WHERE NOT(DestValue IS NULL) 
+												AND DestValue<>""
+												AND TaxZoneID='.$zone->GetDBField('TaxZoneId').'
+												ORDER BY DestValue
+												';
+				break;
+			case 'available':
+				$selected_zips = $this->Conn->GetCol('SELECT DestValue FROM '.$destination->TableName.'
+												WHERE NOT(DestValue IS NULL) 
+												AND DestValue<>""
+												AND TaxZoneID='.$zone->GetDBField('TaxZoneId').'
+												ORDER BY DestValue
+												');
+				
+				$sql = 'SELECT DISTINCT(DestValue) FROM '.$this->Application->getUnitOption('taxdst', 'TableName').'
+												WHERE NOT(DestValue IS NULL) 
+												AND TaxZoneID!='.$zone->GetDBField('TaxZoneId').'
+												AND DestValue NOT IN ("'.implode('", "', $selected_zips).'")
+												AND DestValue<>"" AND StdDestId='.$country_selector.'
+												ORDER BY DestValue
+												';
+												
+				break;		
+			case 'all':
+				$sql = 'SELECT sd.* FROM '.TABLE_PREFIX.'StdDestinations sd
+												WHERE sd.DestType=3 AND sd.DestParentId='.$country_selector.'
+												ORDER BY DestValue
+												';
+				break;	
+		}		
+		
+		$zips = $this->Conn->Query($sql);
+		$o = '';
+		foreach($zips as $key => $zip) {
+			$param['id'] = $zip['DestId'].'|'.$zip['DestValue'];
+			$param['destination_title'] = $zip['DestValue'];
+			$o .= $this->Application->ParseBlock($param);
+		}
+		return $o;
+		
+	}	
+	
+	
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/taxes/taxes_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/taxes/taxes_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/taxes/taxes_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/taxes/taxes_event_handler.php	(revision 12131)
@@ -0,0 +1,276 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class TaxesEventHandler extends kDBEventHandler {
+
+	/**
+	 * Allows to override standart permission mapping
+	 *
+	 */
+	function mapPermissions()
+	{
+		parent::mapPermissions();
+		$permissions = Array(
+								'OnTypeChange'		=>	Array('self' => 'add|edit'),
+								'OnCountryChange'	=>	Array('self' => 'add|edit'),
+						);
+		$this->permMapping = array_merge($this->permMapping, $permissions);
+	}
+
+	function mapEvents()
+	{
+		parent::mapEvents();	// ensure auto-adding of approve/decine and so on events
+		$zones_events = Array(		'OnAddLocation'		=>	'DestinationAction',
+									'OnRemoveLocation'	=>	'DestinationAction',
+									'OnLoadZoneForm'	=>	'DestinationAction',
+									/*'OnCountryChange'	=>	'DestinationAction',*/
+									'OnNew'				=>	'DestinationAction');
+
+		$this->eventMethods = array_merge($this->eventMethods, $zones_events);
+	}
+
+	function customProcessing(&$event, $type)
+	{
+		$zone_object =& $event->GetObject();
+		switch($type)
+		{
+			case 'before':
+
+				break;
+			case 'after':
+				$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
+				$dst_object =& $this->Application->RecallObject('taxdst');
+				if ($event->Name == 'OnUpdate')
+				{
+					$sql = 'DELETE FROM '.$dst_object->TableName.' WHERE TaxZoneId='.$zone_object->GetID();
+					$this->Conn->Query($sql);
+				}
+				else
+				{
+					$temp = $this->Application->GetVar('taxdst');
+					foreach ($temp as $key => $value)
+					{
+						$temp[$key]['TaxZoneId'] = $zone_object->GetID();
+					}
+					$this->Application->SetVar('taxdst', $temp);
+				}
+
+				$dst_event = new kEvent();
+				$dst_event->Init('taxdst');
+				$dst_event->Name = 'OnCreate';
+				$this->Application->HandleEvent($dst_event);
+				break;
+
+			default:
+		}
+	}
+
+/*	function OnItemBuild(&$event)
+	{
+		parent::OnItemBuild($event);
+		$object = $event->GetObject();
+		$object->SetDBField('ZoneID', $this->Application->GetVar('zone_id') );
+		$object->ID = $this->Application->GetVar('zone_id');
+	}*/
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnTypeChange(&$event)
+	{
+		$this->Application->DeleteVar('taxdst');
+		$event->CallSubEvent('OnPreSave');
+		$event->redirect = false;
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function DestinationAction(&$event)
+	{
+		$event->redirect = false;
+
+		$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
+		if($items_info)
+		{
+			foreach($items_info as $item_id => $field_values)
+			{
+				// this is to receive $item_id
+			}
+		}
+
+		$object =& $event->getObject( Array('skip_autoload' => true) );
+		$object->Load($item_id);
+
+		$object->SetFieldsFromHash($field_values);
+		$object->SetDBField('TaxZoneID', $item_id);
+
+		$destination =& $this->Application->recallObject('taxdst');
+		$tax_object =& $this->Application->recallObject('tax');
+
+		switch($event->Name)
+		{
+			case 'OnAddLocation':
+
+				$temp = $this->Application->GetVar('taxdst');
+				$zip = $this->Application->GetVar('zip_input') ? $this->Application->GetVar('zip_input') : $this->Application->GetVar('zip_dropdown');
+				$exist=0;
+
+				switch ($object->GetDBField('Type'))
+				{
+					case 1:
+						$location_id = $this->Application->GetVar('country');
+						break;
+					case 2:
+						$location_id = $this->Application->GetVar('state');
+						break;
+					default:
+						$location_id = $this->Application->GetVar('StatesCountry');
+						foreach($temp as $temp_id => $temp_val){
+							if ($temp_val['DestValue']==$zip){
+								$exist=1;
+								break;
+							}
+						}
+				}
+
+				if ($exist == 0){
+					$new_id = (int)$this->Conn->GetOne('SELECT MIN('.$destination->IDField.') FROM '.$destination->TableName);
+
+					if($new_id > 0) $new_id = 0;
+					do
+					{
+						$new_id--;
+					} while ($this->check_array($this->Application->GetVar('taxdst'), 'TaxZoneDestId', $new_id));
+
+
+
+
+					if( ($location_id && !$this->check_array($temp, 'StdDestId', $location_id)) ||
+							($zip && !$this->check_array($temp, 'DestValue', $zip)) )
+					{
+
+						if($tax_object->GetDBField('Type') == 3 && $zip ==''){
+							continue;
+						}
+
+						$temp[$new_id]['TaxZoneDestId'] = $new_id;
+						$temp[$new_id]['StdDestId'] = $location_id;
+						$temp[$new_id]['DestValue'] = $zip ? $zip : '';
+
+						$this->Application->SetVar('taxdst', $temp);
+					}
+				}
+				break;
+
+			case 'OnRemoveLocation':
+
+				$temp = $this->Application->GetVar('taxdst');
+				$selected_destinations = explode(',', $this->Application->GetVar('selected_destinations'));
+				foreach ($selected_destinations as $dest)
+				{
+					unset( $temp[$dest] );
+					if (strlen($dest)>0){
+						$sql = 'DELETE FROM '.$destination->TableName.' WHERE TaxZoneDestId ='.$dest;
+						$this->Conn->Query($sql);
+					}
+				}
+				$this->Application->SetVar('taxdst', $temp);
+
+				break;
+
+			case 'OnLoadZoneForm':
+
+				$sql = 'SELECT * FROM '.$destination->TableName.' WHERE TaxZoneId='.$item_id;
+				$res = $this->Conn->Query($sql);
+				$temp = Array();
+				foreach ($res as $dest_record)
+				{
+					$temp[$dest_record['TaxZoneDestId']]['TaxZoneDestId'] = $dest_record['TaxZoneDestId'];
+					$temp[$dest_record['TaxZoneDestId']]['StdDestId'] = $dest_record['StdDestId'];
+					$temp[$dest_record['TaxZoneDestId']]['DestValue'] = $dest_record['DestValue'];
+				}
+				$this->Application->SetVar('taxdst', $temp);
+				//$object =& $event->getObject();
+				//$object->SetDBField('ShippingTypeID', $this->Application->GetVar('s_id'));
+
+				break;
+
+			case 'OnNew':
+
+				//$object =& $event->getObject();
+				//$object->SetDBField('ShippingTypeID', $this->Application->GetVar('s_id'));
+				break;
+
+			case 'OnCountryChange':
+
+				$this->Application->DeleteVar('taxdst');
+
+				break;
+
+			default:
+		}
+		/*if($this->Application->GetVar('tax_OriginalSaveEvent'))
+		{
+			$this->Application->SetVar($event->Prefix_Special.'_SaveEvent', $this->Application->GetVar('tax_OriginalSaveEvent'));
+		}*/
+
+
+		$event->CallSubEvent("OnPreSave");
+/*
+			$child_event = new kEvent();
+			$child_event->Prefix = "tax";
+			$child_event->Special = "";
+			$child_event->Prefix_Special = "tax";
+			$child_event->redirect = false;
+			$child_event->Name = "OnPreSave";
+
+			$this->Application->HandleEvent( $child_event);		*/
+
+	}
+
+	function OnMassDelete(&$event)
+	{
+		$this->StoreSelectedIDs($event);
+
+		$event->setEventParam('ids', $this->getSelectedIDs($event) );
+		$this->customProcessing($event, 'before');
+		$ids = $event->getEventParam('ids');
+		$ids = implode(',', $ids);
+
+		$dst =& $this->Application->recallObject('taxdst');
+		$sql = 'DELETE FROM '.$dst->TableName.' WHERE TaxZoneId IN ('.$ids.')';
+		$this->Conn->Query($sql);
+
+		parent::OnMassDelete($event);
+	}
+
+	function OnCountryChange(&$event)
+	{
+		$destinations = &$this->Application->recallObject('taxdst');
+
+		$queryDel="DELETE FROM ".$destinations->TableName." WHERE TaxZoneId=".(int)$this->Application->GetVar('tax_id');
+		$this->Conn->Query($queryDel);
+
+		$this->Application->DeleteVar('taxdst');
+		$event->CallSubEvent('OnPreSave');
+		$event->redirect = false;
+	}
+
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/taxes/taxes_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.11
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/coupons/coupons_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/coupons/coupons_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/coupons/coupons_config.php	(revision 12131)
@@ -0,0 +1,164 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+$config	=	Array(
+					'Prefix'			=>	'coup',
+					'ItemClass'			=>	Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'CouponsEventHandler','file'=>'coupons_event_handler.php','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'CouponsTagProcessor','file'=>'coupons_tag_processor.php','build_event'=>'OnBuild'),
+					'AutoLoad'			=>	true,
+					'Hooks'	=>	Array(
+												Array(
+													'Mode' => hBEFORE,
+													'Conditional' => false,
+													'HookToPrefix' => 'ord',
+													'HookToSpecial' => '',
+													'HookToEvent' => Array( 'OnUpdateCart', 'OnCheckout' ),
+													'DoPrefix' => '',
+													'DoSpecial' => '',
+													'DoEvent' => 'OnApplyCoupon',
+												),
+											),
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'page',
+												3	=>	'event',
+												4 =>	'mode', // 't' for temp '' for normal
+											),
+					'IDField'			=>	'CouponId',
+					'StatusField'		=>	Array('Status'),
+					'TitleField'		=>	'Name',
+					'TableName'			=>	TABLE_PREFIX.'ProductsCoupons',
+					'SubItems' => Array('coupi'),
+
+					'TitlePresets'		=>	Array(
+												'default'	=>	Array(	'new_status_labels'		=> Array('coup'=>'!la_title_Adding_Coupon!'),
+																		'edit_status_labels'	=> Array('coup'=>'!la_title_Editing_Coupon!'),
+																		'new_titlefield'		=> Array('coup'=>'!la_title_New_Coupon!'),
+																),
+
+												'coupons_list'=>Array('prefixes'				=>	Array('coup_List'),
+																		'format'				=>	"!la_title_Coupons!",
+																),
+
+												'coupons_edit'=>Array(	'prefixes'				=> Array('coup'),
+																		'format'				=> "#coup_status# '#coup_titlefield#' - !la_title_General!",
+																),
+
+												'coupons_items'=>Array('prefixes'				=> Array('coup','coupi_List'),
+																		'format'				=> "#coup_status# '#coup_titlefield#' - !la_title_CouponItems!",
+																),
+												'coupons_clone'=>Array('prefixes'				=> Array('coup'),
+																		'format'				=> "!la_CloneCoupon!",
+																),
+
+												'coupon_selector' => Array('format' => '!la_title_CouponSelector!'),
+
+													),
+
+					'EditTabPresets' => Array (
+						'Default' => Array (
+							'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/discounts/coupon_edit', 'priority' => 1),
+							'items' => Array ('title' => 'la_tab_CouponsItems', 't' => 'in-commerce/discounts/coupon_items', 'priority' => 2),
+						),
+					),
+
+					'PermSection'		=>	Array('main' => 'in-commerce:coupons'),
+
+					'Sections'			=>	Array(
+													'in-commerce:coupons'	=>	Array(
+																						'parent'		=>	'in-commerce:discounts_folder',
+																						'icon'			=>	'discounts',
+																						'label'			=>	'la_tab_Coupons',
+																						'url'			=>	Array('t' => 'in-commerce/discounts/coupons_list', 'pass' => 'm'),
+																						'permissions'	=>	Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'),
+																						'priority'		=>	2.2,
+																						'type'			=>	stTAB,
+																				),
+											),
+
+					'FilterMenu'		=>	Array(
+												'Groups' => Array(
+													Array('mode' => 'AND', 'filters' => Array(0,1,2), 'type' => WHERE_FILTER),
+													Array('mode' => 'AND', 'filters' => Array(4,5/*,6*/), 'type' => WHERE_FILTER),
+												),
+												'Filters' => Array(
+													0	=>	Array('label' =>'la_Enabled', 'on_sql' => '', 'off_sql' => 'Status != 1' ),
+													1	=>	Array('label' => 'la_Used', 'on_sql' => '', 'off_sql' => 'Status != 2'  ),
+													2	=>	Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => 'Status != 0'  ),
+													3	=>	Array(),
+													4	=>	Array('label' => 'la_Flat', 'on_sql' => '', 'off_sql' => 'Type != 1'  ),
+													5	=>	Array('label' => 'la_Percent', 'on_sql' => '', 'off_sql' => 'Type != 2'  ),
+												//	6	=>	Array('label' => 'la_FreeShipping', 'on_sql' => '', 'off_sql' => 'Type != 3'  ),
+												)
+											),
+
+					'ListSQLs'			=>	Array(	''=>'SELECT %1$s.* %2$s FROM %1$s',
+																		), // key - special, value - list select sql
+					'ItemSQLs'			=>	Array(	''=>'SELECT * FROM %1$s',
+																		),
+
+					'ListSortings'	=> 	Array(
+																'' => Array(
+																	'Sorting' => Array('Name' => 'asc'),
+																)
+															),
+					'Fields'			=>	Array(
+											    'CouponId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+											    'Status' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 1 => 'la_Enabled', 2 => 'la_Used', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1 ),
+											    'Name' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
+											    'Code' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255, 'unique'=>Array('Code')),
+											    'Expiration' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null,),
+											    'GroupId' => Array('type' => 'int', 'default' => null, ),
+											    'Type' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_Flat', 2 => 'la_Percent' ), 'not_null' => 1, 'default' => 1 ),		// options => (3 => 'la_FreeShipping')
+											    'Amount' => Array('type'=>'double', 'default' => null),
+											    'LastUsedBy' => Array('type' => 'int','formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options'=>Array(-1=>'root',-2=>'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'','left_key_field'=>'PortalUserId','left_title_field'=>'Login','required'=>0,'default'=>0),
+											  	'LastUsedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => 0),
+											  	'NumberOfUses' => Array('type'=>'int', 'default' => 1,),
+											),
+
+					'Grids'	=> Array(
+								'Default'		=>	Array(
+															'Icons' => Array('default'=>'icon16_custom.gif',1=>'icon16_discount.gif',2=>'icon16_discount_pending.gif',0=>'icon16_discount_disabled.gif'),
+															'Fields' => Array(
+																			'CouponId'	=> Array ('title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+																			'Name' => Array( 'title'=>'la_col_Name', 'filter_block' => 'grid_like_filter'),
+																			'Code' => Array( 'title'=>'la_col_CouponCode', 'filter_block' => 'grid_like_filter'),
+																			'Expiration' => Array( 'title'=>'la_col_Expiration', 'filter_block' => 'grid_date_range_filter'),
+																			'Type' => Array( 'title'=>'la_col_Type', 'filter_block' => 'grid_options_filter'),
+																			'Amount' => Array( 'title'=>'la_col_Amount', 'filter_block' => 'grid_float_range_filter'),
+																			'LastUsedBy' => Array('title'=>'la_col_LastUsedBy', 'filter_block' => 'grid_like_filter'),
+																			'LastUsedOn' => Array('title'=>'la_col_LastUsedOn', 'filter_block' => 'grid_date_range_filter'),
+																			'NumberOfUses' => Array('title'=>'la_col_NumberOfUses', 'filter_block' => 'grid_range_filter'),
+																		),
+													),
+								'Radio'		=>	Array(
+														'Icons' => Array('default'=>'icon16_custom.gif',1=>'icon16_discount.gif',2=>'icon16_discount_pending.gif',0=>'icon16_discount_disabled.gif'),
+														'Selector' => 'radio',
+														'Fields' => Array(
+																		'CouponId'	=> Array ('title'=>'la_col_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter'),
+																		'Name' => Array( 'title'=>'la_col_Name', 'filter_block' => 'grid_like_filter'),
+																		'Code' => Array( 'title'=>'la_col_CouponCode', 'filter_block' => 'grid_like_filter'),
+																		'Expiration' => Array( 'title'=>'la_col_Expiration', 'filter_block' => 'grid_date_range_filter'),
+																		'Type' => Array( 'title'=>'la_col_Type', 'filter_block' => 'grid_options_filter'),
+																		'Amount' => Array( 'title'=>'la_col_Amount', 'filter_block' => 'grid_float_range_filter'),
+																		'LastUsedBy' => Array('title'=>'la_col_LastUsedBy', 'filter_block' => 'grid_like_filter'),
+																		'LastUsedOn' => Array('title'=>'la_col_LastUsedOn', 'filter_block' => 'grid_date_range_filter'),
+																		'NumberOfUses' => Array('title'=>'la_col_NumberOfUses', 'filter_block' => 'grid_range_filter'),
+																	),
+												),
+								),
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/coupons/coupons_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.15.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/coupons/coupons_tag_processor.php
===================================================================
--- branches/5.1.x/in-commerce/units/coupons/coupons_tag_processor.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/coupons/coupons_tag_processor.php	(revision 12131)
@@ -0,0 +1,38 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class CouponsTagProcessor extends kDBTagProcessor {
+
+	function LastCloneCount($params){
+		
+		$clone_count = $this->Application->RecallVar('CoupLastCloneCount');
+		if (!$clone_count){
+			$clone_count = 1;
+		}
+		return $clone_count;
+	}
+	
+	function DefaultExpDate($params){
+		$object = &$this->Application->recallObject($this->getPrefixSpecial());
+		$formatter =& $this->Application->makeClass('kDateFormatter');
+		return $formatter->Format( adodb_mktime() + $this->Application->ConfigValue('Comm_DefaultCouponDuration') * 3600 * 24, 'Expiration_date', $object);
+	}
+	
+	function DefaultExpTime($params){
+		$object = &$this->Application->recallObject($this->getPrefixSpecial());
+		$formatter =& $this->Application->makeClass('kDateFormatter');
+		return $formatter->Format( adodb_mktime() + $this->Application->ConfigValue('Comm_DefaultCouponDuration') * 3600 * 24, 'Expiration_time', $object);
+	}
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/coupons/coupons_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/coupons/coupons_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/coupons/coupons_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/coupons/coupons_event_handler.php	(revision 12131)
@@ -0,0 +1,174 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class CouponsEventHandler extends kDBEventHandler {
+
+	/**
+	 * Allows to override standart permission mapping
+	 *
+	 */
+	function mapPermissions()
+	{
+		parent::mapPermissions();
+		$permissions = Array(
+			'OnItemBuild' => Array('self' => true),
+		);
+
+		$this->permMapping = array_merge($this->permMapping, $permissions);
+	}
+
+
+	function OnApplyClone(&$event)
+	{
+		$item = &$event->getObject();
+		$clone_count = $this->Application->GetVar('clone_items_count');
+		$table = $this->Application->getUnitOption($event->Prefix, 'TableName');
+		if ($clone_count && $clone_count>0){
+			$this->Application->StoreVar('CoupLastCloneCount', $clone_count);
+			for ($i=0; $i<$clone_count; $i++)			{
+				$this->SetNewCode($item);
+
+				$item->SetField('Expiration_date', $this->Application->GetVar('clone_exp_date'));
+				$item->SetField('Expiration_time', $this->Application->GetVar('clone_exp_time'));
+				$item->NameCopy();
+				$validated = $item->Create();
+
+
+			}
+		}
+
+		if ($validated){
+			$this->finalizePopup($event);
+		}else{
+			$event->redirect = false;
+		}
+	}
+
+	function SetNewCode(&$item)
+	{
+		do{
+			$new_code = $this->RandomCouponCode(10);
+			$exists = $this->Conn->GetOne('SELECT COUNT(*) FROM '.TABLE_PREFIX.'ProductsCoupons WHERE Code='.$this->Conn->qstr($new_code));
+			if ($exists){
+				$new_code = false;
+			}
+		} while (!$new_code);
+
+		$item->SetDBField('Code', $new_code);
+	}
+
+	function RandomCouponCode($size)
+	{
+		$rand_code = "";
+		for ($i=0; $i<10; $i++){
+			$is_letter = rand(0,1);
+			if ($is_letter){
+				$rand_char = chr(rand(65,90));
+			}else{
+				$rand_char = rand(0,9);
+			}
+			$rand_code .= $rand_char;
+		}
+		return $rand_code;
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnApplyCoupon(&$event)
+	{
+		$code = $this->Application->GetVar('coupon_code');
+		if ($code == '') {
+			return ;
+		}
+
+		$object =& $event->getObject(Array('skip_autoload' => true));
+		$object->Load($code, 'Code');
+
+		if (!$object->isLoaded()) {
+			$event->status = erFAIL;
+			$this->Application->SetVar('set_checkout_error', 4);
+			$event->redirect = false; // check!!!
+			return ;
+		}
+//		$object->IDField = $this->Application->getUnitOption($event->Prefix, 'IDField');
+//		$object->ID = $object->GetDBField( $object->IDField );
+
+		$expire_date = $object->GetDBField('Expiration');
+		$number_of_use = $object->GetDBField('NumberOfUses');
+		if(	$object->GetDBField('Status') != 1 || ($expire_date && $expire_date < adodb_mktime()) ||
+			(isset($number_of_use) && $number_of_use <= 0))
+		{
+			$event->status = erFAIL;
+			$this->Application->SetVar('set_checkout_error', 5);
+			$event->redirect->false;
+			return ;
+		}
+
+		$last_used = adodb_mktime();
+		$object->SetDBField('LastUsedBy', $this->Application->RecallVar('user_id'));
+		$object->SetDBField('LastUsedOn_date', $last_used);
+		$object->SetDBField('LastUsedOn_time', $last_used);
+		if(isset($number_of_use))
+		{
+			$object->SetDBField('NumberOfUses', $number_of_use - 1);
+			if($number_of_use == 1)
+			{
+				$object->SetDBField('Status', 2);
+			}
+		}
+		$object->Update();
+
+		$this->Application->setUnitOption('ord', 'AutoLoad', true);
+		$order =& $this->Application->recallObject('ord');
+		$order->SetDBField('CouponId', $object->GetDBField('CouponId'));
+		$order->Update();
+
+		$this->Application->SetVar('set_checkout_error', 10);
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnPreCreate(&$event){
+
+		parent::OnPreCreate($event);
+
+		$object = &$event->getObject();
+		$exp_date = adodb_mktime();
+
+		$default_duration = $this->Application->ConfigValue('Comm_DefaultCouponDuration');
+
+		if ($default_duration && $default_duration>0){
+			$exp_date += (int)$default_duration*86400;
+		}
+		$object->SetDBField('Expiration_date', $exp_date);
+	}
+
+	function OnBeforeItemUpdate(&$event)
+	{
+		$object =& $event->getObject();
+		$object->SetDBField( 'Amount', abs($object->GetDBField('Amount')) );
+	}
+
+	function OnBeforeItemCreate(&$event)
+	{
+		$this->OnBeforeItemUpdate($event);
+	}
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/coupons/coupons_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.14
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/discount_items/discount_items_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/discount_items/discount_items_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/discount_items/discount_items_config.php	(revision 12131)
@@ -0,0 +1,116 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+$config	=	Array(
+					'Prefix'			=>	'di',
+					'ItemClass'			=>	Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'DiscountItemsEventHandler','file'=>'discount_items_event_handler.php','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'DiscountItemsTagProcessor','file'=>'discount_items_tag_processor.php','build_event'=>'OnBuild'),
+					'AutoLoad'			=>	true,
+					'Hooks'	=>	Array(
+												Array(
+													'Mode' => hAFTER,
+													'Conditional' => false,
+													'HookToPrefix' => 'p',
+													'HookToSpecial' => '-item',
+													'HookToEvent' => Array('OnAfterItemDelete'),
+													'DoPrefix' => '',
+													'DoSpecial' => '',
+													'DoEvent' => 'OnDeleteDiscountedItem',
+												),
+											),
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'page',
+												3	=>	'event',
+											),
+					'IDField'			=>	'DiscountItemId',
+					'StatusField'		=>	Array('Status'),
+					'TitleField'		=>	'Name',
+					'TableName'			=>	TABLE_PREFIX.'ProductsDiscountItems',
+
+					'CalculatedFields'	=>	Array(
+												''	=>	Array(
+															'ProductId'		=>	'p.ProductId',
+															'ItemName'			=>	'IF(p.Name IS NULL,c.Name,p.l1_Name)',
+															'SKU'			=>	'p.SKU',
+															'Weight'		=>	'p.Weight',
+															'CreatedOn'		=>	'p.CreatedOn',
+															'BackOrderDate'	=>	'p.BackOrderDate',
+															'Status'		=>	'p.Status',
+															'CategoryId'	=>	'c.CategoryId',
+
+														),
+
+											),
+					'ListSQLs'			=>	Array(	''=>'	SELECT %1$s.* %2$s
+															FROM %1$s
+															LEFT JOIN '.TABLE_PREFIX.'Products p ON %1$s.ItemResourceId = p.ResourceId
+															LEFT JOIN '.TABLE_PREFIX.'Category c ON %1$s.ItemResourceId = c.ResourceId',
+																		), // key - special, value - list select sql
+					'ItemSQLs'			=>	Array(	''=>'SELECT * FROM %s',
+																		),
+
+					/*'BelongsTo'			=> Array(
+												Array('prefix' => 'd', 'key' => 'DiscountId', 'ForeignKey' => 'DiscountId'),
+											),*/
+					'ForeignKey'	=>	'DiscountId',
+					'ParentTableKey' => 'DiscountId',
+					'ParentPrefix' => 'd',
+					'AutoDelete'	=>	true,
+					'AutoClone'	=> true,
+
+					'ListSortings'	=> 	Array(
+												'' => Array(
+													'Sorting' => Array('ItemName' => 'asc'),
+												)
+											),
+
+					'Fields' => Array (
+						'DiscountItemId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
+			            'DiscountId' => Array('type' => 'int', 'default' => 0, ),
+			            'ItemResourceId' => Array('type' => 'int', 'default' => 0, ),
+			            'ItemType' => Array('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_Product', 2 => 'la_Category', 0 => 'la_WholeOrder' ), 'default' => 1, ),
+					),
+
+					'VirtualFields'	=> 	Array(
+													'ProductId' => Array(),
+													'ItemName' => Array(),
+													'SKU' => Array(),
+													'Weight' => Array('type'=>'float', 'min_value_exc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f'),
+													'CreatedOn' => Array('formatter' => 'kDateFormatter', 'default'=>'#NOW#' ),
+													'BackOrderDate' => Array('formatter' => 'kDateFormatter'),
+												),
+
+					'Grids'	=> Array(
+								'Default'		=>	Array(
+																	'Icons' => Array('default'=>'icon16_entire_order.gif'),
+																	'Fields' => Array(
+																			'ItemType' => Array( 'title'=>'la_col_ItemType', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_empty_filter'),
+																		),
+
+																),
+								'DiscountItems'		=>	Array(
+																	'Icons' => Array('default'=>'icon16_custom.gif',1=>'icon16_product.gif',2=>'icon16_product_pending.gif',0=>'icon16_product_disabled.gif'),
+																	'Fields' => Array(
+																			'ProductId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_item_td', 'filter_block' => 'grid_range_filter'),
+																			'ItemName' => Array( 'title'=>'la_col_ItemName', 'filter_block' => 'grid_like_filter'),
+																			'ItemType' => Array( 'title'=>'la_col_ItemType', 'filter_block' => 'grid_options_filter'),
+																		),
+
+																),
+													),
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/discount_items/discount_items_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.10.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/discount_items/discount_items_tag_processor.php
===================================================================
--- branches/5.1.x/in-commerce/units/discount_items/discount_items_tag_processor.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/discount_items/discount_items_tag_processor.php	(revision 12131)
@@ -0,0 +1,48 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class DiscountItemsTagProcessor extends kDBTagProcessor  {
+
+	function IsEntireOrder($params)
+	{
+		$table_name = $this->Application->getUnitOption($this->Prefix, 'TableName');
+
+		if ($this->Application->IsTempMode($this->Prefix)) {
+			$table_name = $this->Application->GetTempName($table_name, 'prefix:' . $this->Prefix);
+		}
+
+		$sql = 'SELECT COUNT(*)
+				FROM ' . $table_name . '
+				WHERE (ItemType = 0) AND (DiscountId = ' . $this->Application->GetVar('d_id') . ')';
+		return $this->Conn->GetOne($sql);
+	}
+
+	function ItemIcon($params)
+	{
+		$object =& $this->Application->recallObject($this->getPrefixSpecial(),$this->Prefix, $params);
+		if($object->GetDBField('ItemType') == 2)
+		{
+			$cat_object =& $this->Application->recallObject('c');
+			$cat_object->Load( $object->GetDBField('CategoryId') );
+			$cat_tag_processor =& $this->Application->recallObject('c_TagProcessor');
+			return $cat_tag_processor->ItemIcon();
+		}
+		else
+		{
+			return parent::ItemIcon($params);
+		}
+	}
+
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/discount_items/discount_items_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5.8.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/discount_items/discount_items_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/discount_items/discount_items_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/discount_items/discount_items_event_handler.php	(revision 12131)
@@ -0,0 +1,140 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class DiscountItemsEventHandler extends kDBEventHandler {
+
+	/**
+	 * Allows to override standart permission mapping
+	 *
+	 */
+	function mapPermissions()
+	{
+		parent::mapPermissions();
+		$permissions = Array(
+								'OnEntireOrder'	=>	Array('subitem' => 'add|edit'),
+						);
+		$this->permMapping = array_merge($this->permMapping, $permissions);
+	}
+
+	/**
+	 * Adds products from selected categories and their sub-categories and directly selected products to discount items with duplicate checking
+	 *
+	 * @param kEvent $event
+	 */
+	function OnProcessSelected(&$event)
+	{
+		$object =& $event->getObject( Array('skip_autoload' => true) );
+		$selected_ids = $this->Application->GetVar('selected_ids');
+
+		if ($selected_ids['c'] == $this->Application->GetVar('m_cat_id')) {
+			// no categories were selected, so selector returned current in catalog. This is not needed here
+			$selected_ids['c'] = '';
+		}
+
+		$table_data = $object->getLinkedInfo();
+
+		// in selectors we could select category & item together
+		$prefixes = Array('c', 'p');
+
+		foreach ($prefixes as $prefix) {
+			$item_ids = $selected_ids[$prefix] ? explode(',', $selected_ids[$prefix]) : Array();
+			if (!$item_ids) continue;
+
+			if ($prefix == 'c') {
+				// select all products from selected categories and their subcategories
+				$sql = 'SELECT DISTINCT p.ResourceId
+						FROM '.TABLE_PREFIX.'Category c
+						LEFT JOIN '.TABLE_PREFIX.'CategoryItems ci ON c.CategoryId = ci.CategoryId
+						LEFT JOIN '.TABLE_PREFIX.'Products p ON p.ResourceId = ci.ItemResourceId
+						WHERE (p.ProductId IS NOT NULL) AND (c.ParentPath LIKE "%|'.implode('|%" OR c.ParentPath LIKE "%|', $item_ids).'|%")';
+				$resource_ids = $this->Conn->GetCol($sql);
+			}
+			else {
+				// select selected prodcts
+				$sql = 'SELECT ResourceId
+						FROM '.$this->Application->getUnitOption($prefix, 'TableName').'
+						WHERE '.$this->Application->getUnitOption($prefix, 'IDField').' IN ('.implode(',', $item_ids).')';
+				$resource_ids = $this->Conn->GetCol($sql);
+			}
+
+			if (!$resource_ids) continue;
+
+			$sql = 'SELECT ItemResourceId
+					FROM '.$object->TableName.'
+					WHERE ('.$table_data['ForeignKey'].' = '.$table_data['ParentId'].') AND (ItemResourceId IN ('.implode(',', $resource_ids).'))';
+
+			// 1. don't insert items, that are already in
+			$skip_resource_ids = $this->Conn->GetCol($sql);
+			$resource_ids = array_diff($resource_ids, $skip_resource_ids); // process only not already in db resourceids for current discount
+
+			// 2. insert ids, that left
+			foreach ($resource_ids as $resource_id) {
+				$object->SetDBField($table_data['ForeignKey'], $table_data['ParentId']);
+				$object->SetDBField('ItemResourceId', $resource_id);
+				$object->SetDBField('ItemType', 1);
+				$object->Create();
+				$object->setTempID();
+			}
+		}
+		$this->finalizePopup($event);
+	}
+
+	/**
+	 * Allows to set discount on entire order
+	 *
+	 * @param kEvent $event
+	 * @todo get parent item id through $object->getLinkedInfo()['ParentId']
+	 * @access public
+	 */
+	function OnEntireOrder(&$event)
+	{
+		$object =& $event->GetObject();
+		$sql = 'DELETE FROM '.$object->TableName.' WHERE DiscountId='.$this->Application->GetVar('d_id');
+		$this->Conn->Query($sql);
+
+		$object->SetDBField('DiscountId', $this->Application->GetVar('d_id'));
+		$object->SetDBField('ItemResourceId', -1);
+		$object->SetDBField('ItemType', 0);
+
+		if( $object->Create() )
+		{
+			if( $object->IsTempTable() ) $object->setTempID();
+			$this->customProcessing($event,'after');
+			$event->status=erSUCCESS;
+			$event->redirect_params = Array('opener' => 's'); //stay!
+		}
+		else
+		{
+			$event->status=erFAIL;
+			$this->Application->SetVar($event->Prefix_Special.'_SaveEvent','OnCreate');
+			$object->setID(0);
+		}
+	}
+
+	/**
+	 * Deletes discount items where hooked item (product) is used
+	 *
+	 * @param kEvent $event
+	 */
+	function OnDeleteDiscountedItem(&$event)
+	{
+		$main_object =& $event->MasterEvent->getObject();
+		$resource_id = $main_object->GetDBField('ResourceId');
+
+		$table = $this->Application->getUnitOption($event->Prefix,'TableName');
+		$sql = 'DELETE FROM '.$table.' WHERE ItemResourceId = '.$resource_id;
+		$this->Conn->Query($sql);
+	}
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/discount_items/discount_items_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.11
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/shipping_costs/shipping_costs_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/shipping_costs/shipping_costs_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/shipping_costs/shipping_costs_event_handler.php	(revision 12131)
@@ -0,0 +1,233 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class ShippingCostsEventHandler extends kDBEventHandler {
+
+	/**
+	 * Allows to override standart permission mapping
+	 *
+	 */
+	function mapPermissions()
+	{
+		parent::mapPermissions();
+		$permissions = Array(
+								'OnPropagate'	=>	Array('subitem' => 'add|edit'),
+								'OnClearAll'	=>	Array('subitem' => 'add|edit'),
+								'OnSaveCreated'	=>	Array('subitem' => 'add|edit'),
+						);
+		$this->permMapping = array_merge($this->permMapping, $permissions);
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnCreate(&$event)
+	{
+		$object =& $event->getObject( Array('skip_autoload' => true) );
+		$zones_object =& $this->Application->recallObject('z');
+
+		$sql = 'SELECT ZoneID FROM '.$zones_object->TableName.' WHERE ShippingTypeID='.$this->Application->GetVar('s_id');
+		$res = $this->Conn->GetCol($sql);
+		$sql = 'DELETE FROM '.$object->TableName.' WHERE ZoneID IN ('.implode(',', $res).')';
+		$this->Conn->Query($sql);
+
+		$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
+		if($items_info)
+		{
+			foreach($items_info as $id => $field_values)
+			{
+				$object->SetFieldsFromHash($field_values);
+				$this->customProcessing($event,'before');
+
+				if( $object->Create() )
+				{
+					if ( $object->IsTempTable() ) $object->setTempID();
+					$this->customProcessing($event,'after');
+					$event->status=erSUCCESS;
+				}
+				else
+				{
+					$event->status=erFAIL;
+					$event->redirect=false;
+					$this->Application->SetVar($event->Prefix_Special.'_SaveEvent','OnCreate');
+					$object->setID(0);
+				}
+			}
+		}
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnPropagate(&$event)
+	{
+	//	$this->OnCreate(&$event);
+
+		$object =& $event->getObject();
+
+		$shipping_object =& $this->Application->recallObject('s');
+
+		if( $this->Application->GetVar('br_propagate_id') )
+		{
+			$propagate_id = $this->Application->GetVar('br_propagate_id');
+			$idfield = 'BracketId';
+		}
+		else
+		{
+			$propagate_id = $this->Application->GetVar('z_propagate_id');
+			$idfield = 'ZoneID';
+		}
+
+		$cost_type = $shipping_object->GetDBField('CostType');
+		switch($cost_type)
+		{
+			case 1:
+				$affected_fields = Array(0 => 'Flat');
+				break;
+			case 2:
+				$affected_fields = Array(0 => 'PerUnit');
+				break;
+			default:
+				$affected_fields = Array(0 => 'PerUnit', 1 => 'Flat');
+				break;
+		}
+
+		$sql = 'SELECT ShippingCostId,'.implode(',', $affected_fields).'
+				FROM '.$object->TableName.'
+				WHERE '.$idfield.'='.$propagate_id;
+		$res = $this->Conn->Query($sql);
+
+		if(is_array($res))
+		{
+			$res = array_reverse($res);
+			foreach($affected_fields as $field)
+			{
+				$first_elem = getArrayValue($res, 0);
+				if( (double)$first_elem[$field] )
+				{
+					$iterating_value = $first_elem[$field];
+					$second_elem = getArrayValue($res, 1);
+					if( is_array($second_elem) && (double)$second_elem[$field] )
+					{
+						$increment = $second_elem[$field] - $first_elem[$field];
+					}
+					else
+					{
+						$increment = 0;
+					}
+
+					foreach($res as $record)
+					{
+						$object->Load($record['ShippingCostId']);
+
+						$new_value = ($iterating_value >= 0) ? $iterating_value : null;
+						$object->SetDBField($field, $new_value);
+
+						$object->Update();
+						$iterating_value += $increment;
+					}
+				}
+			}
+		}
+
+	/*	$shipping_event = new kEvent();
+		$shipping_event->Init('s');
+		$shipping_event->Name = 'OnPreSave';
+		$shipping_event->status = erFATAL;
+		$this->Application->HandleEvent(&$shipping_event);*/
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnClearAll(&$event)
+	{
+		$object =& $event->getObject( Array('skip_autoload' => true) );
+		$zones_object =& $this->Application->recallObject('z');
+
+		$sql = 'SELECT ZoneID FROM '.$zones_object->TableName.' WHERE ShippingTypeID='.$this->Application->GetVar('s_id');
+		$res = $this->Conn->GetCol($sql);
+		$sql = 'DELETE FROM '.$object->TableName.' WHERE ZoneID IN ('.implode(',', $res).')';
+		$this->Conn->Query($sql);
+
+		$event->redirect_params = Array('opener' => 's', 'pass_events' => false);
+		$event->status=erSUCCESS;
+	}
+
+	function customProcessing(&$event, $type)
+	{
+		if( $type == 'before' && $this->Application->GetVar('sc') )
+		{
+			$shipping_obj =& $this->Application->recallObject('s');
+			$cost =& $event->getObject();
+			$zero_if_empty = $shipping_obj->GetDBField('ZeroIfEmpty');
+
+			if($cost->GetDBField('Flat') == '')
+			{
+				$flat = $zero_if_empty ? 0 : null;
+				$cost->SetDBField('Flat', $flat);
+			}
+			if($cost->GetDBField('PerUnit') == '')
+			{
+				$per_unit = $zero_if_empty ? 0 : null;
+				$cost->SetDBField('PerUnit', $per_unit);
+			}
+		}
+	}
+
+	function OnSaveCreated(&$event)
+	{
+		$event->CallSubEvent('OnCreate');
+		$event->redirect = false;
+		$event->redirect_params = Array('opener'=>'s','pass'=>'all');
+	}
+
+	function OnAfterCopyToTemp(&$event)
+	{
+		$id = $event->getEventParam('id');
+		$object =& $this->Application->recallObject($event->Prefix.'.-item', $event->Prefix);
+		$object->SwitchToTemp();
+		$object->Load($id);
+		$shipping_obj =& $this->Application->recallObject('s');
+		$lang_object =& $this->Application->recallObject('lang.current');
+		// by weight and US/UK system - we need to store recalculated price per Kg cause shipping calculation is done per Kg!
+		if ($shipping_obj->GetDBField('Type') == 1 && $lang_object->GetDBField('UnitSystem') == 2) {
+			$object->SetDBField('PerUnit', $object->GetDBField('PerUnit') * POUND_TO_KG);
+			$object->Update(null, true);
+		}
+	}
+
+	function OnBeforeCopyToLive(&$event)
+	{
+		$id = $event->getEventParam('id');
+		$object =& $this->Application->recallObject($event->Prefix.'.-item', $event->Prefix);
+		$object->SwitchToTemp();
+		$object->Load($id);
+
+		$shipping_obj =& $this->Application->recallObject('s');
+		$lang_object =& $this->Application->recallObject('lang.current');
+		// by weight and US/UK system - we need to store recalculated price per Kg cause shipping calculation is done per Kg!
+		if ($shipping_obj->GetDBField('Type') == 1 && $lang_object->GetDBField('UnitSystem') == 2) {
+			$object->SetDBField('PerUnit', $object->GetDBField('PerUnit') / POUND_TO_KG);
+			$object->Update(null, true);
+		}
+	}
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/shipping_costs/shipping_costs_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/shipping_costs/shipping_costs_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/shipping_costs/shipping_costs_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/shipping_costs/shipping_costs_config.php	(revision 12131)
@@ -0,0 +1,70 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+	
+$config	=	Array(
+					'Prefix'			=>	'sc',
+					'ItemClass'			=>	Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'ShippingCostsEventHandler','file'=>'shipping_costs_event_handler.php','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
+					'AutoLoad'			=>	true,
+					'Hooks'	=>	Array( 
+												Array(
+													'Mode' => hAFTER,
+													'Conditional' => true,
+													'HookToPrefix' => 's',
+													'HookToSpecial' => '',
+													'HookToEvent' => Array( 'OnPreSaveAndGoToTab', 'OnPreSaveAndGo', 'OnPreSave', 'OnFlip', 'OnApplyModifier' ),
+													'DoPrefix' => '',
+													'DoSpecial' => '',
+													'DoEvent' => 'OnCreate',
+												),
+											),
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'page',
+												3	=>	'event',
+											),
+					'IDField'			=>	'ShippingCostId',
+					'TableName'			=>	TABLE_PREFIX.'ShippingCosts',
+					'ForeignKey' 		=> 	Array('z' => 'ZoneID', 'br' => 'BracketId'),
+					'ParentTableKey' 	=> 	Array('z' => 'ZoneID', 'br' => 'BracketId'),
+					'ParentPrefix'	 	=>	'z',
+					'AutoDelete'		=>	true,
+					'AutoClone'		=>	true,
+										
+					'ListSQLs'			=>	Array(	''=>	'SELECT * FROM %s'),
+																		 // key - special, value - list select sql
+					'ItemSQLs'			=>	Array(	''=>	'SELECT * FROM %s'),
+					
+					'Fields'			=>	Array(
+											    'ShippingCostId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+											    'ZoneID' => Array('type' => 'int', 'not_null' => true, 'default' => 0),
+											    'BracketId' => Array('type' => 'int', 'not_null' => true, 'default' => 0),
+											    'Flat' => Array('type' => 'double', 'formatter' => 'kFormatter', 'default' => 0),
+											    'PerUnit' => Array('type' => 'double', 'formatter' => 'kFormatter', 'default' => 0),
+											),
+											
+					/*'Grids'	=> Array(
+								'Default'		=>	Array(
+																	'Icons' => Array('default'=>'icon16_custom.gif'),
+																	'Fields' => Array(
+																	'Name' => Array( 'width'=>150, 'title'=>'la_col_Title', 'data_block'=>'grid_checkbox_td' ),
+																	'CODallowed' => Array( 'width'=>100, 'title'=>'la_col_CODallowed' )
+																			),
+																	
+																),
+													),*/
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/shipping_costs/shipping_costs_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/zones/zones_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/zones/zones_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/zones/zones_event_handler.php	(revision 12131)
@@ -0,0 +1,264 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class ZonesEventHandler extends kDBEventHandler {
+
+	/**
+	 * Allows to override standart permission mapping
+	 *
+	 */
+	function mapPermissions()
+	{
+		parent::mapPermissions();
+		$permissions = Array(
+								'OnTypeChange'		=>	Array('subitem' => 'add|edit'),
+								'OnCountryChange'	=>	Array('subitem' => 'add|edit'),
+								'OnLoadZoneForm'	=>	Array('subitem' => 'add|edit'),
+						);
+		$this->permMapping = array_merge($this->permMapping, $permissions);
+	}
+
+	function mapEvents()
+	{
+		parent::mapEvents();	// ensure auto-adding of approve/decine and so on events
+		$zones_events = Array(		'OnAddLocation'		=>	'DestinationAction',
+									'OnRemoveLocation'	=>	'DestinationAction',
+									'OnLoadZoneForm'	=>	'DestinationAction',
+									/*'OnCountryChange'	=>	'DestinationAction',*/);
+
+		$this->eventMethods = array_merge($this->eventMethods, $zones_events);
+	}
+
+	function customProcessing(&$event, $type)
+	{
+		$zone_object =& $event->GetObject();
+		switch($type)
+		{
+			case 'before':
+				if ($event->Name == 'OnCreate')
+				{
+					$zone_object->SetDBField('ShippingTypeID', $this->Application->GetVar('s_id'));
+				}
+				break;
+			case 'after':
+				$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
+				$dst_object =& $this->Application->RecallObject('dst');
+				if ($event->Name == 'OnUpdate')
+				{
+					$sql = 'DELETE FROM '.$dst_object->TableName.' WHERE ShippingZoneId='.$zone_object->GetID();
+					$this->Conn->Query($sql);
+				}
+				else
+				{
+					$temp = $this->Application->GetVar('dst');
+					foreach ($temp as $key => $value)
+					{
+						$temp[$key]['ShippingZoneId'] = $zone_object->GetID();
+					}
+					$this->Application->SetVar('dst', $temp);
+				}
+
+				$dst_event = new kEvent();
+				$dst_event->Init('dst');
+				$dst_event->Name = 'OnCreate';
+				$this->Application->HandleEvent($dst_event);
+				break;
+
+			default:
+		}
+	}
+
+/*	function OnItemBuild(&$event)
+	{
+		parent::OnItemBuild($event);
+		$object = $event->GetObject();
+		$object->SetDBField('ZoneID', $this->Application->GetVar('zone_id') );
+		$object->ID = $this->Application->GetVar('zone_id');
+	}*/
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnTypeChange(&$event)
+	{
+		$this->Application->DeleteVar('dst');
+
+		$event->CallSubEvent($this->Application->GetVar('z_OriginalSaveEvent'));
+		$event->redirect = false;
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function DestinationAction(&$event)
+	{
+		$event->redirect = false;
+
+		$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
+		if($items_info)
+		{
+			foreach($items_info as $item_id => $field_values)
+			{
+				// this is to receive $item_id
+			}
+		}
+
+		$object =& $event->getObject( Array('skip_autoload' => true) );
+		$object->Load($item_id);
+
+		$object->SetFieldsFromHash($field_values);
+		$object->SetDBField('ZoneID', $item_id);
+
+		$destination =& $this->Application->recallObject('dst');
+
+		switch($event->Name)
+		{
+			case 'OnAddLocation':
+				$new_id = (int)$this->Conn->GetOne('SELECT MIN('.$destination->IDField.') FROM '.$destination->TableName);
+				if($new_id > 0) $new_id = 0;
+				do
+				{
+					$new_id--;
+				} while ($this->check_array($this->Application->GetVar('dst'), 'ZoneDestId', $new_id));
+
+				switch ($object->GetDBField('Type'))
+				{
+					case 1:
+						$location_id = $this->Application->GetVar('country');
+						break;
+					case 2:
+						$location_id = $this->Application->GetVar('state');
+						break;
+					default:
+						$location_id = '';
+				}
+
+				$temp = $this->Application->GetVar('dst');
+				$zip = $this->Application->GetVar('zip_input') ? $this->Application->GetVar('zip_input') : $this->Application->GetVar('zip_dropdown');
+
+				if( ($location_id && !$this->check_array($temp, 'StdDestId', $location_id)) ||
+						($zip && !$this->check_array($temp, 'DestValue', $zip)) )
+				{
+					$temp[$new_id]['ZoneDestId'] = $new_id;
+					$temp[$new_id]['StdDestId'] = $location_id;
+					$temp[$new_id]['DestValue'] = $zip ? $zip : '';
+
+					$this->Application->SetVar('dst', $temp);
+				}
+				break;
+
+			case 'OnRemoveLocation':
+
+				$temp = $this->Application->GetVar('dst');
+				$selected_destinations = explode(',', $this->Application->GetVar('selected_destinations'));
+				foreach ($selected_destinations as $dest)
+				{
+					unset( $temp[$dest] );
+				}
+				$this->Application->SetVar('dst', $temp);
+
+				break;
+
+			case 'OnLoadZoneForm':
+
+				$sql = 'SELECT * FROM '.$destination->TableName.' WHERE ShippingZoneId='.$item_id;
+				$res = $this->Conn->Query($sql);
+				$temp = Array();
+				foreach ($res as $dest_record)
+				{
+					$temp[$dest_record['ZoneDestId']]['ZoneDestId'] = $dest_record['ZoneDestId'];
+					$temp[$dest_record['ZoneDestId']]['StdDestId'] = $dest_record['StdDestId'];
+					$temp[$dest_record['ZoneDestId']]['DestValue'] = $dest_record['DestValue'];
+				}
+				$this->Application->SetVar('dst', $temp);
+				$object =& $event->getObject();
+				$object->SetDBField('ShippingTypeID', $this->Application->GetVar('s_id'));
+				$this->Application->StoreVar('zone_mode'.$this->Application->GetVar('m_wid'), 'edit');
+
+				break;
+
+			/*case 'OnNew':
+				$object =& $event->getObject();
+				$object->SetDBField('ShippingTypeID', $this->Application->GetVar('s_id'));
+				break;*/
+
+			case 'OnCountryChange':
+
+				$this->Application->DeleteVar('dst');
+
+				break;
+
+			default:
+		}
+//		if($this->Application->GetVar('z_OriginalSaveEvent'))
+//		{
+//			$this->Application->SetVar($event->Prefix_Special.'_SaveEvent', $this->Application->GetVar('z_OriginalSaveEvent'));
+//		}
+	}
+
+	function OnMassDelete(&$event)
+	{
+		$ids = $this->StoreSelectedIDs($event);
+
+		$event->setEventParam('ids', $ids);
+		$this->customProcessing($event, 'before');
+		$ids = $event->getEventParam('ids');
+		$ids = implode(',', $ids);
+
+		$dst =& $this->Application->recallObject('dst');
+		$sql = 'DELETE FROM '.$dst->TableName.' WHERE ShippingZoneId IN ('.$ids.')';
+		$this->Conn->Query($sql);
+
+		parent::OnMassDelete($event);
+	}
+
+	function OnCountryChange(&$event)
+	{
+		$destinations = &$this->Application->recallObject('dst');
+
+		$queryDel="DELETE FROM ".$destinations->TableName." WHERE ShippingZoneId=".$this->Application->GetVar($event->Prefix.'_id');
+		$this->Conn->Query($queryDel);
+
+		$this->Application->DeleteVar('dst');
+
+		$event->CallSubEvent($this->Application->GetVar('z_OriginalSaveEvent'));
+		$event->redirect = false;
+	}
+
+	function OnCancel(&$event){
+
+		parent::OnCancel($event);
+		$dst_object = &$this->Application->recallObject('dst');
+		$delete_zones_sql = 'DELETE FROM '.$dst_object->TableName.' WHERE ShippingZoneId = 0';
+		$this->Conn->Query($delete_zones_sql);
+
+		// if cancelling after create
+		if ($this->Application->RecallVar('zone_mode'.$this->Application->GetVar('m_wid')) == 'create') {
+			$zone =& $event->getObject();
+			$zone->Delete();
+		}
+	}
+
+	function OnNew(&$event)
+	{
+		parent::OnNew($event);
+		$this->Application->StoreVar('zone_mode'.$this->Application->GetVar('m_wid'), 'create');
+	}
+
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/zones/zones_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.13
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/zones/zones_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/zones/zones_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/zones/zones_config.php	(revision 12131)
@@ -0,0 +1,75 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+$config	=	Array(
+					'Prefix'			=>	'z',
+					'ItemClass'			=>	Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'ZonesEventHandler','file'=>'zones_event_handler.php','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'ZonesTagProcessor','file'=>'zones_tag_processor.php','build_event'=>'OnBuild'),
+					'AutoLoad'			=>	true,
+					'hooks'				=>	Array(),
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'page',
+												3	=>	'event',
+											),
+					'IDField'			=>	'ZoneID',
+					'TitleField'		=>  'Name',
+					'TitlePresets'		=>	Array(
+												'default'	=>	Array(	'new_status_labels'		=> Array('z'=>'!la_title_AddingShippingZone!'),
+																		'edit_status_labels'	=> Array('z'=>'!la_title_EditingShippingZone!'),
+																		'new_titlefield'		=> Array('z'=>'!la_title_NewShippingZone!'),
+																),
+												'zones_edit'		=>	Array(	'prefixes' => Array('z'), 'format' => "#z_status# - '#z_titlefield#'"),
+											),
+					'TableName'			=>	TABLE_PREFIX.'ShippingZones',
+					'ForeignKey' 		=> 	'ShippingTypeID', //Name of the field in this table used as ForeignKey
+					'ParentTableKey' 	=> 	'ShippingID', //Name of the field in parent table linked with ForeignKey
+					'ParentPrefix'	=> 's', //Prefix of parent item
+					'AutoDelete'	=>	true,
+					'AutoClone'	=> true,
+
+					'SubItems' =>	Array('dst', 'sc'),
+
+					'ListSQLs'			=>	Array(	''=>	'SELECT * FROM %s'),
+																		 // key - special, value - list select sql
+					'ItemSQLs'			=>	Array(	''=>	'SELECT * FROM %s'),
+
+					'ListSortings'	=> 	Array(
+																'' => Array(
+																	'Sorting' => Array('Name' => 'asc'),
+																)
+															),
+					'Fields' => Array (
+						'ZoneID' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
+			            'ShippingTypeID' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
+			            'Name' => Array('type' => 'string', 'required'=>true, 'max_len'=>100, 'error_msgs' => Array('required' => 'Please fill in'), 'not_null' => 1, 'default' => '', ),
+			            'Type' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options' => Array(1 => 'la_ByCountry', 2 => 'la_ByState', 3 => 'la_ByZIP'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1, ),
+			            'CODallowed' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options' => Array(1 => 'la_Allowed', 0 => 'la_NotAllowed'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1, ),
+					),
+
+					'Grids'	=> Array(
+								'Default'		=>	Array(
+																	'Icons' => Array('default'=>'icon16_custom.gif'),
+																	'Fields' => Array(
+																	'ZoneID' => Array( 'width'=>150, 'title'=>'la_col_Id', 'data_block'=>'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+																	'Name' => Array( 'width'=>150, 'title'=>'la_col_Title', 'filter_block' => 'grid_like_filter'),
+																	'CODallowed' => Array( 'width'=>100, 'title'=>'la_col_CODallowed', 'filter_block' => 'grid_options_filter')
+																			),
+
+																),
+													),
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/zones/zones_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/zones/zones_tag_processor.php
===================================================================
--- branches/5.1.x/in-commerce/units/zones/zones_tag_processor.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/zones/zones_tag_processor.php	(revision 12131)
@@ -0,0 +1,479 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class ZonesTagProcessor extends kDBTagProcessor 
+{
+	/*
+	function ShowDestinations($param)
+	{
+		$zone =& $this->Application->recallObject('z');
+		$zone->SetDBField('ZoneID', $zone->ID);
+		$destination =& $this->Application->recallObject('dst');
+		
+		if(!$this->Application->GetVar('loaded'))
+		{									
+			if ($zone->GetID() == 0)
+			{
+				$this->Application->DeleteVar('dst');
+			}
+			else 
+			{
+				$sql = 'SELECT * FROM '.$destination->TableName.' WHERE ShippingZoneId='.$zone->GetID();
+				$res = $this->Conn->Query($sql);
+				if (is_array($res)) foreach ($res as $dest_record)
+				{
+					$temp[$dest_record['ZoneDestId']]['ZoneDestId'] = $dest_record['ZoneDestId'];
+					$temp[$dest_record['ZoneDestId']]['StdDestId'] = $dest_record['StdDestId'];
+					$temp[$dest_record['ZoneDestId']]['DestValue'] = $dest_record['DestValue'];
+				}
+				$this->Application->SetVar('dst', $temp);
+			}
+		}
+		
+		$hidden_clause = '<input type="hidden" name="loaded" value="1"><input type="hidden" name="zone_id" value="'.$zone->GetDBField('ZoneID').'">';
+		
+		switch ( $zone->GetDBField('Type') )
+		{
+			case 1:
+				
+				$sql = 'SELECT * FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=1';
+				$res = $this->Conn->Query($sql, 'DestId');
+				$dropdown = '<select name="country">'."\n";
+				foreach ($res as $record)
+				{
+					$dropdown .= '<option value="'.$record['DestId'].'">'.$this->Application->Phrase($record['DestName']).'</option>'."\n";
+				}
+				$dropdown .= '</select>'."\n";
+				
+				$form_params = Array();
+				$form_params['dropdown'] = $dropdown;
+				$form_params['block'] = $param['block'];
+				$form_params['res'] = $res;
+				$ret = $this->ShowDestionationForm($form_params);
+				
+				break;
+			case 2:
+
+				$country_sql = 'SELECT d1.* FROM '.TABLE_PREFIX.'StdDestinations d1,
+								'.TABLE_PREFIX.'StdDestinations d2								
+								WHERE d1.DestType=1 AND d1.DestId=d2.DestParentId
+								GROUP BY d1.DestId';
+				if( !($current_country = $this->Application->GetVar('StatesCountry')) )
+				{
+					$current_country_sql = 'SELECT sd.DestParentId FROM '.TABLE_PREFIX.'StdDestinations sd
+												LEFT JOIN '.$destination->TableName.' zd
+												ON zd.StdDestId = sd.DestId
+												WHERE sd.DestType=2 AND zd.ShippingZoneId='.$zone->GetDBField('ZoneID');
+					if($zone->GetDBField('ZoneID'))
+					{
+						$current_country = $this->Conn->GetOne($current_country_sql);
+					}
+					
+					if(!$current_country)
+					{
+						$current_country_sql = '	SELECT d1.DestId FROM '.TABLE_PREFIX.'StdDestinations d1
+													LEFT JOIN '.TABLE_PREFIX.'StdDestinations d2
+													ON d1.DestId = d2.DestParentId
+													WHERE d1.DestType=1
+													AND d2.DestId IS NOT NULL';
+						$current_country = $this->Conn->GetOne($current_country_sql);
+					}
+				}				
+				$states_sql = 'SELECT * FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=2 AND DestParentId='.$current_country;
+				$countries = $this->Conn->Query($country_sql, 'DestId');
+				$states = $this->Conn->Query($states_sql, 'DestId');
+				
+				if($countries)
+				{
+					$countries_dropdown = '<select name="StatesCountry" onchange="submit_event(\'z\', \'OnCountryChange\')">'."\n";
+					foreach ($countries as $record)
+					{
+						$countries_dropdown .= '<option value="'.$record['DestId'].'" ';
+						if($record['DestId'] == $current_country)
+						{
+							$countries_dropdown .= 'selected';
+						}
+						$countries_dropdown .= '>'.$this->Application->Phrase($record['DestName']).'</option>'."\n";
+					}
+					$countries_dropdown .= '</select>'."\n";
+				}
+				
+				if($states)
+				{
+					$states_dropdown = '<select name="state">'."\n";
+					foreach ($states as $id => $record)
+					{
+						$states_dropdown .= '<option value="'.$record['DestId'].'">'.$this->Application->Phrase($record['DestName']).'</option>'."\n";
+					}
+					$states_dropdown .= '</select>'."\n";
+				}
+				
+				$form_params = Array();
+				$table = '<table border="0"><tr><td>'.$this->Application->Phrase('la_fld_Country').': </td><td>'.$countries_dropdown.'</td></tr>';
+				$table .= '<tr><td>'.$this->Application->Phrase('la_fld_State').': </td><td>'.$states_dropdown.'</td></tr></table>';
+				$form_params['dropdown'] = $table;
+				$form_params['block'] = $param['block'];
+				$form_params['res'] = $states;
+				$ret = $this->ShowDestionationForm($form_params);
+				
+				break;
+			case 3:
+				
+				$country_sql = 'SELECT * FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=1';
+				if( !($current_country = $this->Application->GetVar('ZIPCountry')) )
+				{
+					$current_country_sql = 'SELECT StdDestId FROM '.$destination->TableName.'
+												WHERE ShippingZoneId='.$zone->GetDBField('ZoneID');
+					$cur_country = (int)$this->Conn->GetOne($current_country_sql);
+					if($zone->GetDBField('ZoneID') && $cur_country)
+					{
+						$current_country = $cur_country;
+					}
+					else 
+					{
+						$current_country_sql = 'SELECT MIN(DestId) FROM '.TABLE_PREFIX.'StdDestinations';
+						$current_country = (int)$this->Conn->GetOne($current_country_sql);
+					}
+				}				
+				$countries = $this->Conn->Query($country_sql, 'DestId');
+				
+				if($countries)
+				{
+					$countries_dropdown = '<select name="ZIPCountry" onchange="submit_event(\'z\', \'OnCountryChange\')">'."\n";
+					foreach ($countries as $record)
+					{
+						$countries_dropdown .= '<option value="'.$record['DestId'].'" ';
+						if($record['DestId'] == $current_country)
+						{
+							$countries_dropdown .= 'selected';
+						}
+						$countries_dropdown .= '>'.$this->Application->Phrase($record['DestName']).'</option>'."\n";
+					}
+					$countries_dropdown .= '</select>'."\n";
+				}
+			
+			
+				$sql = 'SELECT DestValue FROM '.TABLE_PREFIX.'ShippingZonesDestinations WHERE NOT(DestValue IS NULL) AND DestValue<>"" AND StdDestId='.$current_country;
+				$res = array_unique( $this->Conn->GetCol($sql) );
+				$dropdown = '<input type="text" name="zip_input" id="zip_input" size="15">';
+				if($res)
+				{
+					$dropdown .= ' or <select name="zip_dropdown">'."\n";
+					$dropdown .= '<option value=""></option>';
+					foreach ($res as $record)
+					{
+						$dropdown .= '<option value="'.$record.'">'.$record.'</option>'."\n";
+					}
+					$dropdown .= '</select>'."\n";
+				}
+				
+				$table = '<table border="0"><tr><td>'.$this->Application->Phrase('la_fld_Country').': </td><td>'.$countries_dropdown.'</td></tr>';
+				$table .= '<tr><td>'.$this->Application->Phrase('la_fld_ZIP').': </td><td>'.$dropdown.'</td></tr></table>';
+				
+				$form_params = Array();
+				$form_params['dropdown'] = $table;
+				$form_params['block'] = $param['block'];
+				$form_params['res'] = $res;
+				$ret = $this->ShowDestionationForm($form_params);
+				
+				break;
+			default:
+		}
+		
+		$ret .= $hidden_clause;		
+		return $ret;
+	}
+	
+	function ShowDestionationForm($param)
+	{
+		$add_button = '<input type="button" class="button" value="'.$this->Application->Phrase('la_btn_AddLocation').'" onclick="submit_event(\'z\', \'OnAddLocation\')">';
+				
+		$main_processor =& $this->Application->RecallObject('m_TagProcessor');
+		$oddevenparam['odd'] = 'table-color1';
+		$oddevenparam['even'] = 'table-color2';
+		$ret = '<tr class="'.$main_processor->Odd_Even($oddevenparam).'"><td></td><td>'.$param['dropdown'].'</td><td>'.$add_button.'</td></tr>';
+		
+		$dest_list = $this->Application->GetVar('dst');
+		if (is_array($dest_list) && count($dest_list))
+		{
+			$ret .= '<tr class="'.$main_processor->Odd_Even($oddevenparam).'"><td></td><td><select multiple name="location_list" onchange="SelectToString(this)">';
+			$hidden = '';
+			
+			foreach ($dest_list as $id => $destination)
+			{
+				$params = $destination;
+				$params['id'] = $id;
+				$hidden .= '<input type="hidden" id="dst['.$destination['ZoneDestId'].'][ZoneDestId]" name="dst['.$destination['ZoneDestId'].'][ZoneDestId]" value="'.$destination['ZoneDestId'].'">';
+				
+				$zones_object =& $this->Application->recallObject('z');
+				
+				switch($zones_object->GetDBField('Type'))
+				{
+					case 1:
+						$params['destination_title'] = $this->Application->Phrase( $param['res'][$destination['StdDestId']]['DestName'] );
+						$hidden .= '<input type="hidden" id="dst['.$destination['ZoneDestId'].'][StdDestId]" name="dst['.$destination['ZoneDestId'].'][StdDestId]" value="'.$destination['StdDestId'].'">';
+						break;
+					case 2:
+						$params['destination_title'] = $this->Application->Phrase( $param['res'][$destination['StdDestId']]['DestName'] );
+						$hidden .= '<input type="hidden" id="dst['.$destination['ZoneDestId'].'][StdDestId]" name="dst['.$destination['ZoneDestId'].'][StdDestId]" value="'.$destination['StdDestId'].'">';
+						break;
+					case 3:
+						$params['destination_title'] = $destination['DestValue'];
+						$hidden .= '<input type="hidden" id="dst['.$destination['ZoneDestId'].'][DestValue]" name="dst['.$destination['ZoneDestId'].'][DestValue]" value="'.$destination['DestValue'].'">';
+						
+				}
+								
+				$params['name']	= $param['block'];
+				$ret .= $main_processor->ParseBlock($params);
+			}	
+			$ret .= '</select></td><td><input type="button" class="button" value="'.$this->Application->Phrase('la_btn_RemoveLocations').'" onclick="remove_location('.$destination['ZoneDestId'].')"></td><tr>';
+			$ret .= $hidden;				
+		}
+		
+		return $ret;
+	}
+	*/
+	
+	
+	function ShowCountries($param){
+		
+		$param = $this->prepareTagParams($param);
+		$param['name'] = $param['block'];
+		
+		$destination 	= &$this->Application->recallObject('dst');
+		$zone 			= &$this->Application->recallObject('z');
+
+		$selected_country = Array(); // this prevents 241 warnings to me raised :D	
+		switch ($param['show']){
+			case 'current':
+				$sql = 'SELECT sd.* FROM '.TABLE_PREFIX.'StdDestinations sd
+												LEFT JOIN '.$destination->TableName.' zd
+													ON zd.StdDestId = sd.DestId
+												LEFT JOIN '.TABLE_PREFIX.'Phrase
+													ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName													
+												WHERE sd.DestType=1 
+												AND LanguageId='.$this->Application->GetVar('lang.current_id').'
+												AND zd.ShippingZoneId='.$zone->GetDBField('ZoneID').'
+												ORDER BY Translation
+												';
+				break;
+			case 'available':
+				$sql = 'SELECT sd.* FROM '.TABLE_PREFIX.'StdDestinations sd
+												LEFT JOIN '.$destination->TableName.' zd
+													ON zd.StdDestId = sd.DestId
+												LEFT JOIN '.TABLE_PREFIX.'Phrase
+													ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName	
+												WHERE sd.DestType=1 
+												AND LanguageId='.$this->Application->GetVar('lang.current_id').'
+												AND zd.ShippingZoneId IS NULL
+												ORDER BY Translation
+												';
+				break;		
+			case 'all':
+			
+				$selected_country = $this->Application->GetVar('CountrySelector');
+				if (!$selected_country){
+					// get 1st available country ID
+					$selected_country = $this->Conn->GetOne('SELECT StdDestId FROM '.$destination->TableName.'
+								WHERE ShippingZoneId='.$zone->GetDBField('ZoneID'));
+					if ($selected_country){
+						$this->Application->SetVar('CountrySelector', $selected_country);
+					}
+				}			
+			
+				$sql = 'SELECT sd.* FROM '.TABLE_PREFIX.'StdDestinations sd
+												LEFT JOIN '.TABLE_PREFIX.'Phrase
+													ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName	
+												WHERE sd.DestType=1
+												AND LanguageId='.$this->Application->GetVar('lang.current_id').'
+												ORDER BY Translation
+												';
+				break;	
+			case 'has_states':
+				$has_states = $this->Conn->GetCol('SELECT DISTINCT DestParentId FROM '.TABLE_PREFIX.'StdDestinations sd
+												WHERE sd.DestType=2');
+				$selected_country = $this->Application->GetVar('CountrySelector');
+				
+				if ($selected_country && !in_array($selected_country, $has_states)){
+					$selected_country = $has_states[0];
+					$this->Application->SetVar('CountrySelector', $selected_country);
+				}
+				
+				if (!$selected_country){
+					// get 1st available country ID
+					$selected_country = $this->Conn->GetOne('SELECT DestParentId FROM '.TABLE_PREFIX.'StdDestinations sd
+								LEFT JOIN '.$destination->TableName.' zd
+								ON zd.StdDestId = sd.DestId
+								WHERE sd.DestType=2 
+								AND zd.ShippingZoneId='.$zone->GetDBField('ZoneID'));
+					if ($selected_country){
+						$this->Application->SetVar('CountrySelector', $selected_country);
+					}
+					else {
+						$selected_country = $has_states[0];
+						$this->Application->SetVar('CountrySelector', $selected_country);
+					}
+				}
+				
+				
+				$sql = 'SELECT sd.* FROM '.TABLE_PREFIX.'StdDestinations sd
+												LEFT JOIN '.TABLE_PREFIX.'Phrase
+													ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName	
+												WHERE sd.DestType=1 
+												AND LanguageId='.$this->Application->GetVar('lang.current_id').'
+												AND DestId IN ('.implode(',', $has_states).')
+												ORDER BY Translation
+												';
+				break;								
+		}
+		
+		$countries = $this->Conn->Query($sql);
+		$o = '';
+		
+		
+		foreach($countries as $key => $country) {
+			$param['id'] = $country['DestId'];
+			$param['destination_title'] = $this->Application->Phrase($country['DestName']);
+			if ($selected_country && $selected_country == $param['id']){
+				$param['selected'] = ' selected="selected"';
+			}
+			else {
+				$param['selected']='';
+			}
+			$o .= $this->Application->ParseBlock($param);
+		}
+		return $o;
+		
+	}
+	
+	function ShowStates($param){
+		
+		$param = $this->prepareTagParams($param);
+		$param['name'] = $param['block'];
+		
+		$destination 	= &$this->Application->recallObject('dst');
+		$zone 			= &$this->Application->recallObject('z');
+		
+		switch ($param['show']){
+			case 'current':
+				$sql = 'SELECT * FROM '.TABLE_PREFIX.'StdDestinations sd
+												LEFT JOIN '.$destination->TableName.' zd
+													ON zd.StdDestId = sd.DestId
+												LEFT JOIN '.TABLE_PREFIX.'Phrase
+													ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName	
+												WHERE sd.DestType=2 
+												AND LanguageId='.$this->Application->GetVar('lang.current_id').'
+												AND sd.DestParentId='.$this->Application->GetVar('CountrySelector').'
+												AND zd.ShippingZoneId='.$zone->GetDBField('ZoneID').'
+												ORDER BY Translation
+												';
+				break;
+			case 'available':
+				$sql = 'SELECT * FROM '.TABLE_PREFIX.'StdDestinations sd
+												LEFT JOIN '.$destination->TableName.' zd
+													ON zd.StdDestId = sd.DestId
+												LEFT JOIN '.TABLE_PREFIX.'Phrase
+													ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName	
+												WHERE sd.DestType=2 
+												AND zd.ShippingZoneId IS NULL 
+												AND LanguageId='.$this->Application->GetVar('lang.current_id').'
+												AND sd.DestParentId='.$this->Application->GetVar('CountrySelector').'
+												ORDER BY Translation
+												';
+												
+				break;		
+			case 'all':
+				$sql = 'SELECT sd.* FROM '.TABLE_PREFIX.'StdDestinations sd
+												LEFT JOIN '.TABLE_PREFIX.'Phrase
+													ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName	
+												WHERE sd.DestType=2 
+												AND LanguageId='.$this->Application->GetVar('lang.current_id').'
+												AND sd.DestParentId='.$this->Application->GetVar('CountrySelector').'
+												ORDER BY Translations
+												';
+				break;	
+		}		
+		
+		$states = $this->Conn->Query($sql);
+		$o = '';
+		foreach($states as $key => $state) {
+			$param['id'] = $state['DestId'];
+			$param['destination_title'] = $this->Application->Phrase($state['DestName']);
+			$o .= $this->Application->ParseBlock($param);
+		}
+		return $o;
+		
+	}
+	
+	function ShowZips($param){
+		
+		$param = $this->prepareTagParams($param);
+		$param['name'] = $param['block'];
+		
+		$destination 	= &$this->Application->recallObject('dst');
+		$zone 			= &$this->Application->recallObject('z');
+		
+		$country_selector = $this->Application->GetVar('CountrySelector');
+		if (!$country_selector){
+			$country_selector=0;
+		}		
+		
+		switch ($param['show']){
+			case 'current':
+				$sql = 'SELECT * FROM '.$destination->TableName.'
+												WHERE NOT(DestValue IS NULL) 
+												AND DestValue<>""
+												AND ShippingZoneID='.$zone->GetDBField('ZoneID').'
+												ORDER BY DestValue
+												';
+				break;
+			case 'available':
+				$selected_zips = $this->Conn->GetCol('SELECT DestValue FROM '.$destination->TableName.'
+												WHERE NOT(DestValue IS NULL) 
+												AND DestValue<>""
+												AND ShippingZoneID='.$zone->GetDBField('ZoneID').'
+												ORDER BY DestValue
+												');
+				
+				$sql = 'SELECT DISTINCT(DestValue) FROM '.$this->Application->getUnitOption('dst', 'TableName').'
+												WHERE NOT(DestValue IS NULL) 
+												AND ShippingZoneID!='.$zone->GetDBField('ZoneID').'
+												AND DestValue NOT IN ("'.implode('", "', $selected_zips).'")
+												AND DestValue<>"" AND StdDestId='.$country_selector.'
+												ORDER BY DestValue
+												';
+												
+				break;		
+			case 'all':
+				$sql = 'SELECT sd.* FROM '.TABLE_PREFIX.'StdDestinations sd
+												WHERE sd.DestType=3 AND sd.DestParentId='.$country_selector.'
+												ORDER BY DestValue
+												';
+				break;	
+		}		
+		
+		$zips = $this->Conn->Query($sql);
+		$o = '';
+		foreach($zips as $key => $zip) {
+			$param['id'] = $zip['DestId'].'|'.$zip['DestValue'];
+			$param['destination_title'] = $zip['DestValue'];
+			$o .= $this->Application->ParseBlock($param);
+		}
+		return $o;
+		
+	}		
+	
+	
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/zones/zones_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.8
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/orders/orders_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/orders/orders_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/orders/orders_event_handler.php	(revision 12131)
@@ -0,0 +1,4065 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class OrdersEventHandler extends kDBEventHandler
+{
+
+	/**
+	 * Checks permissions of user
+	 *
+	 * @param kEvent $event
+	 */
+	function CheckPermission(&$event)
+	{
+		if (!$this->Application->IsAdmin()) {
+			if ($event->Name == 'OnCreate') {
+				// user can't initiate custom order creation directly
+				return false;
+			}
+
+			$user_id = $this->Application->RecallVar('user_id');
+			$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
+			if ($items_info) {
+				// when POST is present, then check when is beeing submitted
+				$order_session_id = $this->Application->RecallVar($event->getPrefixSpecial(true).'_id');
+				$order_dummy =& $this->Application->recallObject($event->Prefix.'.-item', null, Array('skip_autoload' => true));
+				foreach ($items_info as $id => $field_values) {
+					if ($order_session_id != $id) {
+						// user is trying update not his order, even order from other guest
+						return false;
+					}
+
+					$order_dummy->Load($id);
+
+					// session_id matches order_id from submit
+					if ($order_dummy->GetDBField('PortalUserId') != $user_id) {
+						// user performs event on other user order
+						return false;
+					}
+
+					$status_field = array_shift($this->Application->getUnitOption($event->Prefix, 'StatusField'));
+					if (isset($field_values[$status_field]) && $order_dummy->GetDBField($status_field) != $field_values[$status_field]) {
+						// user can't change status by himself
+						return false;
+					}
+
+					if ($order_dummy->GetDBField($status_field) != ORDER_STATUS_INCOMPLETE) {
+						// user can't edit orders being processed
+						return false;
+					}
+
+					if ($event->Name == 'OnUpdate') {
+						// all checks were ok -> it's user's order -> allow to modify
+						return true;
+					}
+				}
+			}
+		}
+
+		return parent::CheckPermission($event);
+	}
+
+	/**
+	 * Allows to override standart permission mapping
+	 *
+	 */
+	function mapPermissions()
+	{
+		parent::mapPermissions();
+		$permissions = Array(
+								// admin
+								'OnRecalculateItems'	=>	Array('self' => 'add|edit'),
+								'OnResetToUser'			=>	Array('self' => 'add|edit'),
+								'OnResetToBilling'		=>	Array('self' => 'add|edit'),
+								'OnResetToShipping'		=>	Array('self' => 'add|edit'),
+								'OnMassOrderApprove'	=>	Array('self' => 'advanced:approve'),
+								'OnMassOrderDeny'		=>	Array('self' => 'advanced:deny'),
+								'OnMassOrderArchive'	=>	Array('self' => 'advanced:archive'),
+								'OnMassPlaceOrder'		=>	Array('self' => 'advanced:place'),
+								'OnMassOrderProcess'	=>	Array('self' => 'advanced:process'),
+								'OnMassOrderShip'		=>	Array('self' => 'advanced:ship'),
+								'OnResetToPending'		=>	Array('self' => 'advanced:reset_to_pending'),
+								'OnLoadSelected'		=>	Array('self' => 'view'),	// print in this case
+								'OnGoToOrder'			=>	Array('self' => 'view'),
+
+								// front-end
+								'OnViewCart'			=>	Array('self' => true),
+								'OnAddToCart'			=>	Array('self' => true),
+								'OnRemoveFromCart'		=>	Array('self' => true),
+								'OnUpdateCart'			=>	Array('self' => true),
+								'OnUpdateItemOptions'	=>	Array('self' => true),
+								'OnCleanupCart'			=>	Array('self' => true),
+								'OnContinueShopping'	=>	Array('self' => true),
+								'OnCheckout'			=>	Array('self' => true),
+								'OnSelectAddress'		=>	Array('self' => true),
+								'OnProceedToBilling'	=>	Array('self' => true),
+								'OnProceedToPreview'	=>	Array('self' => true),
+								'OnCompleteOrder'		=>	Array('self' => true),
+
+								'OnRemoveCoupon'		=>	Array('self' => true),
+								'OnRemoveGiftCertificate'		=>	Array('self' => true),
+
+								'OnCancelRecurring'		=>	Array('self' => true),
+								'OnAddVirtualProductToCart'		=>	Array('self' => true),
+								'OnItemBuild'		=>	Array('self' => true),
+								'OnDownloadLabel' 	=>  Array('self' => true, 'subitem' => true),
+
+						);
+		$this->permMapping = array_merge($this->permMapping, $permissions);
+	}
+
+	function mapEvents()
+	{
+		parent::mapEvents();
+		$common_events = Array(
+								'OnResetToUser'		=>	'OnResetAddress',
+								'OnResetToBilling'	=>	'OnResetAddress',
+								'OnResetToShipping'	=>	'OnResetAddress',
+
+								'OnMassOrderProcess'	=>	'MassInventoryAction',
+								'OnMassOrderApprove'	=>	'MassInventoryAction',
+								'OnMassOrderDeny'		=>	'MassInventoryAction',
+								'OnMassOrderArchive'	=>	'MassInventoryAction',
+								'OnMassOrderShip'		=>	'MassInventoryAction',
+
+								'OnOrderProcess'	=>	'InventoryAction',
+								'OnOrderApprove'	=>	'InventoryAction',
+								'OnOrderDeny'		=>	'InventoryAction',
+								'OnOrderArchive'	=>	'InventoryAction',
+								'OnOrderShip'		=>	'InventoryAction',
+							);
+		$this->eventMethods = array_merge($this->eventMethods, $common_events);
+	}
+
+	/* ======================== FRONT ONLY ======================== */
+
+	function OnQuietPreSave(&$event)
+	{
+		$object =& $event->getObject();
+		$object->IgnoreValidation = true;
+		$event->CallSubEvent('OnPreSave');
+		$object->IgnoreValidation = false;
+	}
+
+	/**
+	 * Sets new address to order
+	 *
+	 * @param kEvent $event
+	 */
+	function OnSelectAddress(&$event)
+	{
+		if ($this->Application->IsAdmin()) return true;
+
+		$object =& $event->getObject();
+
+		$shipping_address_id = $this->Application->GetVar('shipping_address_id');
+		$billing_address_id = $this->Application->GetVar('billing_address_id');
+
+		if ($shipping_address_id || $billing_address_id) {
+			$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+			$address =& $this->Application->recallObject('addr.-item','addr', Array('skip_autoload' => true));
+			$addr_list =& $this->Application->recallObject('addr', 'addr_List', Array('per_page'=>-1, 'skip_counting'=>true) );
+			$addr_list->Query();
+		}
+
+		if ($shipping_address_id > 0) {
+			$addr_list->CopyAddress($shipping_address_id, 'Shipping');
+			$address->Load($shipping_address_id);
+			$address->MarkAddress('Shipping');
+
+			$cs_helper->PopulateStates($event, 'ShippingState', 'ShippingCountry');
+			$object->setRequired('ShippingState', false);
+		}
+		elseif ($shipping_address_id == -1) {
+			$object->ResetAddress('Shipping');
+		}
+
+		if ($billing_address_id > 0) {
+			$addr_list->CopyAddress($billing_address_id, 'Billing');
+			$address->Load($billing_address_id);
+			$address->MarkAddress('Billing');
+
+			$cs_helper->PopulateStates($event, 'BillingState', 'BillingCountry');
+			$object->setRequired('BillingState', false);
+		}
+		elseif ($billing_address_id == -1) {
+			$object->ResetAddress('Billing');
+		}
+
+		$event->redirect = false;
+
+		$object->IgnoreValidation = true;
+		$this->RecalculateTax($event);
+		$object->Update();
+	}
+
+	/**
+	 * Updates order with registred user id
+	 *
+	 * @param kEvent $event
+	 */
+	function OnUserCreate(&$event)
+	{
+		if( !($event->MasterEvent->status == erSUCCESS) ) return false;
+
+		$ses_id = $this->Application->RecallVar('front_order_id');
+		if($ses_id)
+		{
+			$this->updateUserID($ses_id, $event);
+			$this->Application->RemoveVar('front_order_id');
+		}
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param unknown_type $event
+	 * @return unknown
+	 */
+	function OnUserLogin(&$event)
+	{
+		if( !($event->MasterEvent->status == erSUCCESS) ) {
+			return false;
+		}
+
+		$ses_id = $this->Application->RecallVar('ord_id');
+		if ($ses_id) $this->updateUserID($ses_id, $event);
+
+		$user_id = $this->Application->RecallVar('user_id');
+		$affiliate_id = $this->isAffiliate($user_id);
+		if($affiliate_id) $this->Application->setVisitField('AffiliateId', $affiliate_id);
+
+		$event->CallSubEvent('OnRecalculateItems');
+	}
+
+	function updateUserID($order_id, &$event)
+	{
+		$table = $this->Application->getUnitOption($event->Prefix,'TableName');
+		$id_field = $this->Application->getUnitOption($event->Prefix,'IDField');
+		$user_id = $this->Application->RecallVar('user_id');
+		$this->Conn->Query('UPDATE '.$table.' SET PortalUserId = '.$user_id.' WHERE '.$id_field.' = '.$order_id);
+
+		$affiliate_id = $this->isAffiliate($user_id);
+		if($affiliate_id)
+		{
+			$this->Conn->Query('UPDATE '.$table.' SET AffiliateId = '.$affiliate_id.' WHERE '.$id_field.' = '.$order_id);
+		}
+	}
+
+	function isAffiliate($user_id)
+	{
+		$affiliate_user =& $this->Application->recallObject('affil.-item', null, Array('skip_autoload' => true) );
+		$affiliate_user->Load($user_id, 'PortalUserId');
+		return $affiliate_user->isLoaded() ? $affiliate_user->GetDBField('AffiliateId') : 0;
+	}
+
+	function ChargeOrder(&$order)
+	{
+		$gw_data = $order->getGatewayData();
+
+		$this->Application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
+		$gateway_object =& $this->Application->recallObject( $gw_data['ClassName'] );
+
+		$payment_result = $gateway_object->DirectPayment($order->FieldValues, $gw_data['gw_params']);
+		$sql = 'UPDATE %s SET GWResult1 = %s WHERE %s = %s';
+		$sql = sprintf($sql, $order->TableName, $this->Conn->qstr($gateway_object->getGWResponce()), $order->IDField, $order->GetID() );
+		$this->Conn->Query($sql);
+		$order->SetDBField('GWResult1', $gateway_object->getGWResponce() );
+
+		return array('result'=>$payment_result, 'data'=>$gateway_object->parsed_responce, 'gw_data' => $gw_data, 'error_msg'=>$gateway_object->getErrorMsg());
+	}
+
+	function OrderEmailParams(&$order)
+	{
+		$billing_email = $order->GetDBField('BillingEmail');
+		$user_email = $this->Conn->GetOne('	SELECT Email FROM '.$this->Application->getUnitOption('u', 'TableName').'
+											WHERE PortalUserId = '.$order->GetDBField('PortalUserId'));
+		$email_params = Array();
+		$email_params['_user_email'] = $user_email; //for use when shipping vs user is required in InvetnoryAction
+		$email_params['to_email'] = $billing_email ? $billing_email : $user_email;
+		$email_params['to_name'] = $order->GetDBField('BillingTo');
+		return $email_params;
+	}
+
+	function PrepareCoupons(&$event, &$order)
+	{
+		$order_items =& $this->Application->recallObject('orditems.-inv','orditems_List',Array('skip_counting'=>true,'per_page'=>-1) );
+		$order_items->linkToParent($order->Special);
+		$order_items->Query();
+		$order_items->GoFirst();
+
+		$assigned_coupons = array();
+		$coup_handler =& $this->Application->recallObject('coup_EventHandler');
+		foreach($order_items->Records as $product_item)
+		{
+			if ($product_item['ItemData']) {
+				$item_data = unserialize($product_item['ItemData']);
+				if (isset($item_data['AssignedCoupon']) && $item_data['AssignedCoupon']) {
+					$coupon_id = $item_data['AssignedCoupon'];
+					// clone coupon, get new coupon ID
+					$coupon =& $this->Application->recallObject('coup',null,array('skip_autload' => true));
+					/* @var $coupon kDBItem */
+					$coupon->Load($coupon_id);
+					if (!$coupon->isLoaded()) continue;
+
+					$coup_handler->SetNewCode($coupon);
+					$coupon->NameCopy();
+					$coupon->SetDBField('Name', $coupon->GetDBField('Name').' (Order #'.$order->GetField('OrderNumber').')');
+					$coupon->Create();
+
+					// add coupon code to array
+					array_push($assigned_coupons, $coupon->GetDBField('Code'));
+				}
+			}
+		}
+
+		/* @var $order OrdersItem */
+		if ($assigned_coupons) {
+			$comments = $order->GetDBField('AdminComment');
+			if ($comments) $comments .= "\r\n";
+			$comments .= "Issued coupon(s): ". join(',', $assigned_coupons);
+			$order->SetDBField('AdminComment', $comments);
+			$order->Update();
+		}
+
+		if ($assigned_coupons) $this->Application->SetVar('order_coupons', join(',', $assigned_coupons));
+	}
+
+	/**
+	 * Completes order if possible
+	 *
+	 * @param kEvent $event
+	 * @return bool
+	 */
+	function OnCompleteOrder(&$event)
+	{
+		$this->LockTables($event);
+		if (!$this->CheckQuantites($event)) return;
+
+		$this->ReserveItems($event);
+
+		$order =& $event->getObject();
+		$charge_result = $this->ChargeOrder($order);
+
+		if (!$charge_result['result']) {
+			$this->FreeItems($event);
+			$this->Application->StoreVar('gw_error', $charge_result['error_msg']);
+
+			//$this->Application->StoreVar('gw_error', getArrayValue($charge_result, 'data', 'responce_reason_text') );
+			$event->redirect = $this->Application->GetVar('failure_template');
+			$event->redirect_params['m_cat_id'] = 0;
+			if ($event->Special == 'recurring') { // if we set failed status for other than recurring special the redirect will not occur
+				$event->status = erFAIL;
+			}
+			return false;
+		}
+
+		// call CompleteOrder events for items in order BEFORE SplitOrder (because ApproveEvents are called there)
+		$order_items =& $this->Application->recallObject('orditems.-inv','orditems_List',Array('skip_counting'=>true,'per_page'=>-1) );
+		$order_items->linkToParent($order->Special);
+		$order_items->Query(true);
+		$order_items->GoFirst();
+
+		foreach($order_items->Records as $product_item)
+		{
+			if (!$product_item['ProductId']) continue; // product may have been deleted
+			$this->raiseProductEvent('CompleteOrder', $product_item['ProductId'], $product_item);
+		}
+
+		$shipping_control = getArrayValue($charge_result, 'gw_data', 'gw_params', 'shipping_control');
+		if ($event->Special != 'recurring') {
+			if ($shipping_control && $shipping_control != SHIPPING_CONTROL_PREAUTH ) {
+				// we have to do it here, because the coupons are used in the e-mails
+				$this->PrepareCoupons($event, $order);
+			}
+
+			$email_event_user 	=& $this->Application->EmailEventUser('ORDER.SUBMIT', $order->GetDBField('PortalUserId'), $this->OrderEmailParams($order));
+			$email_event_admin 	=& $this->Application->EmailEventAdmin('ORDER.SUBMIT');
+		}
+
+		if ($shipping_control === false || $shipping_control == SHIPPING_CONTROL_PREAUTH ) {
+			$order->SetDBField('Status', ORDER_STATUS_PENDING);
+			$order->Update();
+		}
+		else {
+			$this->SplitOrder($event, $order);
+		}
+
+		if( !$this->Application->IsAdmin() )
+		{
+			// for tracking code
+			$this->Application->StoreVar('last_order_amount', $order->GetDBField('TotalAmount'));
+			$this->Application->StoreVar('last_order_number', $order->GetDBField('OrderNumber'));
+			$this->Application->StoreVar('last_order_customer', $order->GetDBField('BillingTo'));
+			$this->Application->StoreVar('last_order_user', $order->GetDBField('Username'));
+
+			$event->redirect = $this->Application->GetVar('success_template');
+			$event->redirect_params['m_cat_id'] = 0;
+		}
+		else
+		{
+//			$event->CallSubEvent('OnSave');
+		}
+
+		$order_id = $order->GetId();
+		$order_idfield = $this->Application->getUnitOption('ord','IDField');
+		$order_table = $this->Application->getUnitOption('ord','TableName');
+		$original_amount = $order->GetDBField('SubTotal') + $order->GetDBField('ShippingCost') + $order->GetDBField('VAT') + $order->GetDBField('ProcessingFee') + $order->GetDBField('InsuranceFee') - $order->GetDBField('GiftCertificateDiscount');
+		$sql = 'UPDATE '.$order_table.'
+				SET OriginalAmount = '.$original_amount.'
+				WHERE '.$order_idfield.' = '.$order_id;
+		$this->Conn->Query($sql);
+
+		$this->Application->StoreVar('front_order_id', $order_id);
+		$this->Application->RemoveVar('ord_id');
+	}
+
+	/**
+	 * Set billing address same as shipping
+	 *
+	 * @param kEvent $event
+	 */
+	function setBillingAddress(&$event)
+	{
+		$object =& $event->getObject();
+		if ($object->HasTangibleItems()) {
+			if ($this->Application->GetVar('same_address')) {
+				// copy shipping address to billing
+				$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
+				list($id, $field_values) = each($items_info);
+
+				$address_fields = Array('To', 'Company', 'Phone', 'Fax', 'Email', 'Address1', 'Address2', 'City', 'State', 'Zip', 'Country');
+				foreach ($address_fields as $address_field) {
+					$items_info[$id]['Billing'.$address_field] = $object->GetDBField('Shipping'.$address_field);
+				}
+				$this->Application->SetVar($event->getPrefixSpecial(true), $items_info);
+			}
+		}
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnProceedToPreview(&$event)
+	{
+		$this->setBillingAddress($event);
+
+		$event->CallSubEvent('OnUpdate');
+		$event->redirect = $this->Application->GetVar('preview_template');
+	}
+
+
+	function OnViewCart(&$event)
+	{
+		$this->StoreContinueShoppingLink();
+		$event->redirect = $this->Application->GetVar('viewcart_template');
+	}
+
+	function OnContinueShopping(&$event)
+	{
+		$env = $this->Application->GetVar('continue_shopping_template');
+		if (!$env || $env == '__default__') {
+			$env = $this->Application->RecallVar('continue_shopping');
+		}
+		if (!$env) {
+			$env = 'in-commerce/index';
+		}
+
+		$event->redirect = $env;
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnCheckout(&$event)
+	{
+		$this->OnUpdateCart($event);
+		if ($event->getEventParam('RecalculateChangedCart'))
+		{
+			$event->SetRedirectParam('checkout_error', $event->redirect_params['checkout_error']);
+		}
+		else
+		{
+			$object =& $event->getObject();
+			if(!$object->HasTangibleItems())
+			{
+				$object->SetDBField('ShippingTo', '');
+				$object->SetDBField('ShippingCompany', '');
+				$object->SetDBField('ShippingPhone', '');
+				$object->SetDBField('ShippingFax', '');
+				$object->SetDBField('ShippingEmail', '');
+				$object->SetDBField('ShippingAddress1', '');
+				$object->SetDBField('ShippingAddress2', '');
+				$object->SetDBField('ShippingCity', '');
+				$object->SetDBField('ShippingState', '');
+				$object->SetDBField('ShippingZip', '');
+				$object->SetDBField('ShippingCountry', '');
+				$object->SetDBField('ShippingType', 0);
+				$object->SetDBField('ShippingCost', 0);
+				$object->SetDBField('ShippingCustomerAccount', '');
+				$object->SetDBField('ShippingTracking', '');
+				$object->SetDBField('ShippingDate', 0);
+				$object->SetDBField('ShippingOption', 0);
+				$object->SetDBField('ShippingInfo', '');
+				$object->Update();
+			}
+
+			$event->redirect = $this->Application->GetVar('next_step_template');
+
+			$order_id = $this->Application->GetVar('order_id');
+			if($order_id !== false) $event->redirect_params['ord_id'] = $order_id;
+		}
+	}
+
+	/**
+	 * Redirect user to Billing checkout step
+	 *
+	 * @param kEvent $event
+	 */
+	function OnProceedToBilling(&$event)
+	{
+		$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
+		if($items_info)
+		{
+			list($id,$field_values) = each($items_info);
+
+			$object =& $event->getObject();
+			$payment_type_id = $object->GetDBField('PaymentType');
+			if(!$payment_type_id)
+			{
+				$default_type = $this->Conn->GetOne('SELECT PaymentTypeId FROM '.TABLE_PREFIX.'PaymentTypes WHERE IsPrimary = 1');
+				if($default_type)
+				{
+					$field_values['PaymentType'] = $default_type;
+					$items_info[$id] = $field_values;
+					$this->Application->SetVar( $event->getPrefixSpecial(true), $items_info );
+				}
+			}
+		}
+
+		$event->CallSubEvent('OnUpdate');
+		$event->redirect = $this->Application->GetVar('next_step_template');
+	}
+
+	function OnCancelRecurring(&$event)
+	{
+		$order =& $event->GetObject();
+		$order->SetDBField('IsRecurringBilling', 0);
+		$order->Update();
+		if ($this->Application->GetVar('cancelrecurring_ok_template'))
+		{
+			$event->redirect = $this->Application->GetVar('cancelrecurring_ok_template');
+		}
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnAfterItemUpdate(&$event)
+	{
+		$object =& $event->getObject();
+
+		$cvv2 = $object->GetDBField('PaymentCVV2');
+ 		if($cvv2 !== false) $this->Application->StoreVar('CVV2Code', $cvv2);
+	}
+
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnUpdate(&$event)
+	{
+		$this->setBillingAddress($event);
+
+		$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+
+		$object =& $event->getObject();
+		if( $object->HasTangibleItems() )
+		{
+			$cs_helper->CheckStateField($event, 'ShippingState', 'ShippingCountry');
+		}
+
+		$cs_helper->CheckStateField($event, 'BillingState', 'BillingCountry');
+
+		parent::OnUpdate($event);
+
+		if ($this->Application->IsAdmin()) {
+			return true;
+		}
+		else {
+			$event->redirect_params = Array('opener' => 's');
+		}
+
+		if ($event->status == erSUCCESS) {
+			$this->createMissingAddresses($event);
+		}
+		else {
+			// strange: recalculate total amount on error
+			$object->SetDBField('TotalAmount', $object->getTotalAmount());
+		}
+	}
+
+	/**
+	 * Creates new address
+	 *
+	 * @param kEvent $event
+	 */
+	function createMissingAddresses(&$event)
+	{
+		if (!$this->Application->LoggedIn()) {
+			return false;
+		}
+
+		$object =& $event->getObject();
+		$addr_list =& $this->Application->recallObject('addr', 'addr_List', Array('per_page'=>-1, 'skip_counting'=>true) );
+		$addr_list->Query();
+
+		$address_dummy =& $this->Application->recallObject('addr.-item', null, Array('skip_autoload' => true));
+
+		$address_prefixes = Array('Billing', 'Shipping');
+		$address_fields = Array('To','Company','Phone','Fax','Email','Address1','Address2','City','State','Zip','Country');
+		foreach ($address_prefixes as $address_prefix) {
+			$address_id = $this->Application->GetVar(strtolower($address_prefix).'_address_id');
+
+			if (!$this->Application->GetVar('check_'.strtolower($address_prefix).'_address')) {
+				// form type doesn't match check type, e.g. shipping check on billing form
+				continue;
+			}
+
+			if ($address_id > 0) {
+				$address_dummy->Load($address_id);
+			}
+			else {
+				$address_dummy->SetDBField('PortalUserId', $this->Application->RecallVar('user_id') );
+			}
+
+			foreach ($address_fields as $address_field) {
+				$address_dummy->SetDBField($address_field, $object->GetDBField($address_prefix.$address_field));
+			}
+
+			$address_dummy->MarkAddress($address_prefix, false);
+
+			$ret = ($address_id > 0) ? $address_dummy->Update() : $address_dummy->Create();
+		}
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnPreSave(&$event)
+	{
+		$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+
+		$object =& $event->getObject();
+		if ( $object->GetID() !== false)
+		{
+			if( $object->HasTangibleItems() )
+			{
+				$cs_helper->CheckStateField($event, 'ShippingState', 'ShippingCountry');
+			}
+			$cs_helper->CheckStateField($event, 'BillingState', 'BillingCountry');
+		}
+
+		parent::OnPreSave($event);
+	}
+
+	function OnUpdateCart(&$event)
+	{
+		$this->Application->HandleEvent($items_event, 'orditems:OnUpdate');
+		return $event->CallSubEvent('OnRecalculateItems');
+	}
+
+	/**
+	 * Adds item to cart
+	 *
+	 * @param kEvent $event
+	 */
+	function OnAddToCart(&$event)
+	{
+		$this->StoreContinueShoppingLink();
+
+		$qty = $this->Application->GetVar('qty');
+		$options = $this->Application->GetVar('options');
+
+		// multiple or options add
+		$items = Array();
+		if (is_array($qty)) {
+			foreach ($qty as $item_id => $combinations)
+			{
+				if (is_array($combinations)) {
+					foreach ($combinations as $comb_id => $comb_qty) {
+						if ($comb_qty == 0) continue;
+						$items[] = array('item_id' => $item_id, 'qty' => $comb_qty, 'comb' => $comb_id);
+					}
+				}
+				else {
+					$items[] = array('item_id' => $item_id, 'qty' => $combinations);
+				}
+			}
+		}
+
+		if (!$items) {
+			if (!$qty || is_array($qty)) $qty = 1;
+			$item_id = $this->Application->GetVar('p_id');
+			if (!$item_id) return ;
+			$items = array(array('item_id' => $item_id, 'qty' => $qty));
+		}
+
+		// remember item data passed to event when called
+		$default_item_data = $event->getEventParam('ItemData');
+		$default_item_data = $default_item_data ? unserialize($default_item_data) : Array();
+
+		foreach ($items as $an_item) {
+			$item_id = $an_item['item_id'];
+			$qty = $an_item['qty'];
+			$comb = getArrayValue($an_item, 'comb');
+
+			$item_data = $default_item_data;
+			$product =& $this->Application->recallObject('p', null, Array('skip_autoload' => true));
+			$product->Load($item_id);
+
+			$event->setEventParam('ItemData', null);
+
+			if ($product->GetDBField('AssignedCoupon')) {
+				$item_data['AssignedCoupon'] = $product->GetDBField('AssignedCoupon');
+			}
+
+			// 1. store options information OR
+			if ($comb) {
+				$combination = $this->Conn->GetOne('SELECT Combination FROM '.TABLE_PREFIX.'ProductOptionCombinations WHERE CombinationId = '.$comb);
+				$item_data['Options'] = unserialize($combination);
+			}
+			elseif (is_array($options)) {
+				$item_data['Options'] = $options[$item_id];
+			}
+
+			// 2. store subscription information OR
+			if( $product->GetDBField('Type') == 2 )	// subscriptions
+			{
+				$item_data = $this->BuildSubscriptionItemData($item_id, $item_data);
+			}
+
+			// 3. store package information
+			if( $product->GetDBField('Type') == 5 )	// package
+			{
+				$package_content_ids = $product->GetPackageContentIds();
+				$product_package_item =& $this->Application->recallObject('p.-packageitem');
+				$package_item_data = array();
+
+				foreach ($package_content_ids as $package_item_id){
+					$product_package_item->Load($package_item_id);
+					$package_item_data[$package_item_id] = array();
+					if( $product_package_item->GetDBField('Type') == 2 )	// subscriptions
+					{
+						$package_item_data[$package_item_id] = $this->BuildSubscriptionItemData($package_item_id, $item_data);
+					}
+				}
+
+				$item_data['PackageContent'] = $product->GetPackageContentIds();
+				$item_data['PackageItemsItemData'] = $package_item_data;
+			}
+
+			$event->setEventParam('ItemData', serialize($item_data));
+			// 1 for PacakgeNum when in admin - temporary solution to overcome splitting into separate sub-orders
+			// of orders with items added through admin when approving them
+			$this->AddItemToOrder($event, $item_id, $qty, $this->Application->IsAdmin() ? 1 : null);
+		}
+		if ($event->status == erSUCCESS && !$event->redirect) {
+			$event->redirect_params['pass'] = 'm';
+			$event->redirect_params['pass_category'] = 0; //otherwise mod-rewrite shop-cart URL will include category
+			$event->redirect = true;
+		}
+		else {
+			if ($this->Application->IsAdmin()) {
+				$event->redirect_params['opener'] = 'u';
+			}
+		}
+	}
+
+	/**
+	 * Check if required options are selected & selected option combination is in stock
+	 *
+	 * @param kEvent $event
+	 * @param Array $options
+	 * @param int $product_id
+	 * @param int $qty
+	 * @param int $selection_mode
+	 * @return bool
+	 */
+	function CheckOptions(&$event, &$options, $product_id, $qty, $selection_mode)
+	{
+		// 1. check for required options
+		$selection_filter = $selection_mode == 1 ? ' AND OptionType IN (1,3,6) ' : '';
+		$req_options = $this->Conn->GetCol('SELECT ProductOptionId FROM '.TABLE_PREFIX.'ProductOptions WHERE ProductId = '.$product_id.' AND Required = 1 '.$selection_filter);
+		$result = true;
+		foreach ($req_options as $opt_id) {
+			if (!getArrayValue($options, $opt_id)) {
+				$this->Application->SetVar('opt_error', 1); //let the template know we have an error
+				$result = false;
+			}
+		}
+
+		// 2. check for option combinations in stock
+		$comb_salt = $this->OptionsSalt($options, true);
+		if ($comb_salt) {
+			// such option combination is defined explicitly
+			$poc_table = $this->Application->getUnitOption('poc', 'TableName');
+			$sql = 'SELECT Availability
+					FROM '.$poc_table.'
+					WHERE CombinationCRC = '.$comb_salt;
+			$comb_availble = $this->Conn->GetOne($sql);
+
+			// 2.1. check if Availability flag is set, then
+			if ($comb_availble == 1) {
+				// 2.2. check for quantity in stock
+				$table = Array();
+				$table['poc'] = $this->Application->getUnitOption('poc', 'TableName');
+				$table['p'] = $this->Application->getUnitOption('p', 'TableName');
+				$table['oi'] = $this->TablePrefix($event).'OrderItems';
+
+				$object =& $event->getObject();
+				$ord_id = $object->GetID();
+
+				// 2.3. check if some amount of same combination & product are not already in shopping cart
+				$sql = 'SELECT '.
+								$table['p'].'.InventoryStatus,'.
+								$table['p'].'.BackOrder,
+								IF('.$table['p'].'.InventoryStatus = 2, '.$table['poc'].'.QtyInStock, '.$table['p'].'.QtyInStock) AS QtyInStock,
+								IF('.$table['oi'].'.OrderItemId IS NULL, 0, '.$table['oi'].'.Quantity) AS Quantity
+						FROM '.$table['p'].'
+						LEFT JOIN '.$table['poc'].' ON
+								'.$table['p'].'.ProductId = '.$table['poc'].'.ProductId
+						LEFT JOIN '.$table['oi'].' ON
+								('.$table['oi'].'.OrderId = '.$ord_id.') AND
+								('.$table['oi'].'.OptionsSalt = '.$comb_salt.') AND
+								('.$table['oi'].'.ProductId = '.$product_id.') AND
+								('.$table['oi'].'.BackOrderFlag = 0)
+						WHERE '.$table['poc'].'.CombinationCRC = '.$comb_salt;
+				$product_info = $this->Conn->GetRow($sql);
+
+				if ($product_info['InventoryStatus']) {
+					$backordering = $this->Application->ConfigValue('Comm_Enable_Backordering');
+					if (!$backordering || $product_info['BackOrder'] == 0) {
+						// backordering is not enabled generally or for this product directly, then check quantities in stock
+						if ($qty + $product_info['Quantity'] > $product_info['QtyInStock']) {
+							$this->Application->SetVar('opt_error', 2);
+							$result = false;
+						}
+					}
+				}
+			}
+			elseif ($comb_availble !== false) {
+				$this->Application->SetVar('opt_error', 2);
+				$result = false;
+			}
+		}
+
+		if ($result) {
+			$event->status = erSUCCESS;
+			$event->redirect = $this->Application->IsAdmin() ? true : $this->Application->GetVar('shop_cart_template');
+		}
+		else {
+			$event->status = erFAIL;
+		}
+		return $result;
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnUpdateItemOptions(&$event)
+	{
+		$opt_data = $this->Application->GetVar('options');
+		$options = getArrayValue($opt_data, $this->Application->GetVar('p_id'));
+
+		if (!$options) {
+			$qty_data = $this->Application->GetVar('qty');
+			$comb_id = key(getArrayValue($qty_data, $this->Application->GetVar('p_id')));
+			$options = unserialize($this->Conn->GetOne('SELECT Combination FROM '.TABLE_PREFIX.'ProductOptionCombinations WHERE CombinationId = '.$comb_id));
+		}
+
+		if (!$options) return;
+
+		$ord_item =& $this->Application->recallObject('orditems.-opt', null, Array ('skip_autoload' => true));
+		/* @var $ord_item kDBItem */
+
+		$ord_item->Load($this->Application->GetVar('orditems_id'));
+
+		// assuming that quantity cannot be changed during order item editing
+		if (!$this->CheckOptions($event, $options, $ord_item->GetDBField('ProductId'), 0, $ord_item->GetDBField('OptionsSelectionMode'))) return;
+
+		$item_data = unserialize($ord_item->GetDBField('ItemData'));
+		$item_data['Options'] = $options;
+		$ord_item->SetDBField('ItemData', serialize($item_data));
+		$ord_item->SetDBField('OptionsSalt', $this->OptionsSalt($options));
+		$ord_item->Update();
+		$event->CallSubEvent('OnRecalculateItems');
+		if ($event->status == erSUCCESS && $this->Application->IsAdmin()) {
+			$event->redirect_params['opener'] = 'u';
+		}
+	}
+
+	function BuildSubscriptionItemData($item_id, $item_data)
+	{
+		$products_table = $this->Application->getUnitOption('p', 'TableName');
+		$products_idfield = $this->Application->getUnitOption('p', 'IDField');
+		$sql = 'SELECT AccessGroupId FROM %s WHERE %s = %s';
+		$item_data['PortalGroupId'] = $this->Conn->GetOne( sprintf($sql, $products_table, $products_idfield, $item_id) );
+
+		$pricing_table = $this->Application->getUnitOption('pr', 'TableName');
+		$pricing_idfield = $this->Application->getUnitOption('pr', 'IDField');
+//		$sql = 'SELECT AccessDuration, AccessUnit, DurationType, AccessExpiration FROM %s WHERE %s = %s';
+		$sql = 'SELECT * FROM %s WHERE %s = %s';
+		$pricing_id = $this->GetPricingId($item_id, $item_data);
+		$item_data['PricingId'] = $pricing_id;
+
+		$pricing_info = $this->Conn->GetRow( sprintf($sql, $pricing_table, $pricing_idfield, $pricing_id ) );
+		$unit_secs = Array(1 => 1, 2 => 60, 3 => 3600, 4 => 86400, 5 => 604800, 6 => 2592000, 7 => 31536000);
+
+/*
+		// Customization healtheconomics.org
+		$item_data['DurationType'] = $pricing_info['DurationType'];
+		$item_data['AccessExpiration'] = $pricing_info['AccessExpiration'];
+		// Customization healtheconomics.org --
+*/
+
+		$item_data['Duration'] = $pricing_info['AccessDuration'] * $unit_secs[ $pricing_info['AccessUnit'] ];
+
+		return $item_data;
+	}
+
+	function OnRemoveCoupon(&$event)
+	{
+		$object =& $event->getObject();
+		$this->RemoveCoupon($object);
+		$event->CallSubEvent('OnRecalculateItems');
+		$event->SetRedirectParam('checkout_error', 7);
+	}
+
+	function RemoveCoupon(&$object)
+	{
+		$coupon_id = $object->GetDBField('CouponId');
+		$coupon =& $this->Application->recallObject('coup', null, Array('skip_autoload' => true));
+		$res = $coupon->Load($coupon_id);
+		$uses = $coupon->GetDBField('NumberOfUses');
+
+		if($res && isset($uses))
+		{
+			$coupon->SetDBField('NumberOfUses', $uses + 1);
+			$coupon->SetDBField('Status', 1);
+			$coupon->Update();
+		}
+		$object->SetDBField('CouponId', 0);
+		$object->SetDBField('CouponDiscount', 0);
+
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnAddVirtualProductToCart(&$event)
+	{
+		$l_info = $this->Application->GetVar('l');
+		if($l_info)
+		{
+			foreach($l_info as $link_id => $link_info) {}
+			$item_data['LinkId'] = $link_id;
+			$item_data['ListingTypeId'] = $link_info['ListingTypeId'];
+		}
+		else
+		{
+			$link_id = $this->Application->GetVar('l_id');
+			$sql = 'SELECT ResourceId FROM '.$this->Application->getUnitOption('l', 'TableName').'
+					WHERE LinkId = '.$link_id;
+			$sql = 'SELECT ListingTypeId FROM '.$this->Application->getUnitOption('ls', 'TableName').'
+					WHERE ItemResourceId = '.$this->Conn->GetOne($sql);
+			$item_data['LinkId'] = $link_id;
+			$item_data['ListingTypeId'] = $this->Conn->GetOne($sql);
+		}
+
+		$sql = 'SELECT VirtualProductId FROM '.$this->Application->getUnitOption('lst', 'TableName').'
+				WHERE ListingTypeId = '.$item_data['ListingTypeId'];
+		$item_id = $this->Conn->GetOne($sql);
+
+		$event->setEventParam('ItemData', serialize($item_data));
+		$this->AddItemToOrder($event, $item_id);
+
+		$event->redirect = $this->Application->GetVar('shop_cart_template');
+
+		// don't pass unused info to shopping cart, brokes old mod-rewrites
+		$event->SetRedirectParam('pass', 'm'); // not to pass link id
+		$event->SetRedirectParam('m_cat_id', 0); // not to pass link id
+	}
+
+	function OnRemoveFromCart(&$event)
+	{
+		$ord_item_id = $this->Application->GetVar('orditems_id');
+		$ord_id = $this->getPassedId($event);
+		$this->Conn->Query('DELETE FROM '.TABLE_PREFIX.'OrderItems WHERE OrderId = '.$ord_id.' AND OrderItemId = '.$ord_item_id);
+		$this->OnRecalculateItems($event);
+	}
+
+	function OnCleanupCart(&$event)
+	{
+		$object =& $event->getObject();
+
+		$sql = 'DELETE FROM '.TABLE_PREFIX.'OrderItems
+				WHERE OrderId = '.$this->getPassedID($event);
+		$this->Conn->Query($sql);
+
+		$this->RemoveCoupon($object);
+		$this->RemoveGiftCertificate($object);
+
+		$this->OnRecalculateItems($event);
+	}
+
+	/**
+	 * Returns order id from session or last used
+	 *
+	 * @param kEvent $event
+	 * @return int
+	 */
+	function getPassedId(&$event)
+	{
+		$event->setEventParam('raise_warnings', 0);
+		$passed = parent::getPassedID($event);
+		if( $this->Application->IsAdmin() ) return $passed;
+
+		if ($event->Special == 'last') {
+			// return last order id (for using on thank you page)
+			return $this->Application->RecallVar('front_order_id');
+		}
+
+		$ses_id = $this->Application->RecallVar( $event->getPrefixSpecial(true).'_id' );
+		if ( $passed && ($passed != $ses_id) )
+		{
+			$query = 'SELECT PortalUserId FROM '.TABLE_PREFIX.'Orders WHERE OrderId = '.$passed;
+			$user_id = $this->Conn->GetOne($query);
+			if ($user_id != $this->Application->RecallVar('user_id'))
+			{
+				$this->Application->SetVar($event->getPrefixSpecial().'_id', 0);
+				return 0;
+			}
+			else
+			{
+				return $passed;
+			}
+		}
+		else // not passed or equals to ses_id
+		{
+			if (!$ses_id)
+			{
+				$this->CreateNewCart($event);
+				return $this->Application->RecallVar($event->getPrefixSpecial(true).'_id');
+			}
+			else
+			{
+				return $ses_id;
+			}
+		}
+		return $passed;
+	}
+
+	function CreateNewCart(&$event)
+	{
+		$object =& $event->getObject( Array('skip_autoload' => true) );
+		$new_number = $this->getNextOrderNumber($event);
+		$object->SetDBField('Number', $new_number);
+		$object->SetDBField('SubNumber', 0);
+		$object->SetDBField('Type', 0); //incomplete
+		$object->SetDBField('VisitId', $this->Application->RecallVar('visit_id') );
+
+		$user_id = $this->Application->RecallVar('user_id');
+		if (!$user_id) $user_id = -2; //Guest
+		$object->SetDBField('PortalUserId', $user_id);
+
+		$affiliate_id = $this->isAffiliate($user_id);
+		if($affiliate_id)
+		{
+			$object->SetDBField('AffiliateId', $affiliate_id);
+		}
+		else
+		{
+			$affiliate_storage_method = $this->Application->ConfigValue('Comm_AffiliateStorageMethod');
+			$object->SetDBField('AffiliateId', $affiliate_storage_method == 1 ? (int)$this->Application->RecallVar('affiliate_id') : (int)$this->Application->GetVar('affiliate_id') );
+		}
+
+		$default_type = $this->Conn->GetOne('SELECT PaymentTypeId FROM '.TABLE_PREFIX.'PaymentTypes WHERE IsPrimary = 1');
+		if($default_type)
+		{
+			$object->SetDBField('PaymentType', $default_type);
+		}
+
+		$object->Create();
+
+		$this->Application->SetVar($event->getPrefixSpecial(true).'_id', $object->GetId());
+		$this->Application->StoreVar($event->getPrefixSpecial(true).'_id', $object->GetId());
+	}
+
+	function StoreContinueShoppingLink()
+	{
+		list($index_file, $env) = explode('|', $this->Application->recallVar('last_template'));
+		$last_t = $this->Application->BaseURL().$index_file.'?'.ENV_VAR_NAME.'='.$env;
+		$this->Application->StoreVar('continue_shopping', 'external:'.PROTOCOL.SERVER_NAME.$this->Application->RecallVar('last_url'));
+	}
+
+	/**
+	 * Sets required fields for order, based on current checkout step
+	 * !!! Do not use switch here, since all cases may be on the same form simultaniously
+	 *
+	 * @param kEvent $event
+	 */
+	function SetStepRequiredFields(&$event)
+	{
+		$order =& $event->getObject();
+
+		$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+		/* @var $cs_helper kCountryStatesHelper */
+
+		$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
+		if ($items_info) {
+			// updated address available from SUBMIT -> use it
+			list($id, $field_values) = each($items_info);
+		}
+		else {
+			// no updated address -> use current address
+			$field_values = Array (
+				'ShippingCountry' => $order->GetDBField('ShippingCountry'),
+				'BillingCountry' => $order->GetDBField('BillingCountry'),
+				'PaymentType' => $order->GetDBField('PaymentType'),
+			);
+		}
+
+		// shipping address required fields
+		if ($this->Application->GetVar('check_shipping_address')) {
+			$has_tangibles = $order->HasTangibleItems();
+			$req_fields = array('ShippingTo', 'ShippingAddress1', 'ShippingCity', 'ShippingZip', 'ShippingCountry', 'ShippingPhone');
+			foreach ($req_fields as $field) {
+				$order->Fields[$field]['required'] = $has_tangibles;
+			}
+			if ($cs_helper->CountryHasStates( getArrayValue($field_values, 'ShippingCountry') )) {
+				$order->Fields['ShippingState']['required'] = true; // $has_tangibles
+			}
+		}
+
+		// billing address required fields
+		if ($this->Application->GetVar('check_billing_address')) {
+			$req_fields = array('BillingTo', 'BillingAddress1', 'BillingCity', 'BillingZip', 'BillingCountry', 'BillingPhone');
+			foreach ($req_fields as $field) {
+				$order->Fields[$field]['required'] = true;
+			}
+			if ($cs_helper->CountryHasStates( getArrayValue($field_values, 'BillingCountry') )) {
+				$order->Fields['BillingState']['required'] = true;
+			}
+		}
+
+		$check_cc = $this->Application->GetVar('check_credit_card');
+		$ord_event = $this->Application->GetVar($event->getPrefixSpecial().'_event');
+		if (($ord_event !== 'OnProceedToPreview') && !$this->Application->IsAdmin()) {
+			// don't check credit card when going from "billing info" to "order preview" step
+			$check_cc = 0;
+		}
+
+		if ($check_cc && ($field_values['PaymentType'] == $order->GetDBField('PaymentType'))) {
+			// cc check required AND payment type was not changed during SUBMIT
+			if ($this->Application->IsAdmin()) {
+				$req_fields = array('PaymentCardType', 'PaymentAccount', 'PaymentNameOnCard', 'PaymentCCExpDate');
+			}
+			else {
+				$req_fields = array('PaymentCardType', 'PaymentAccount', 'PaymentNameOnCard', 'PaymentCCExpDate', 'PaymentCVV2');
+			}
+
+			foreach ($req_fields as $field) {
+				$order->Fields[$field]['required'] = true;
+			}
+		}
+	}
+
+	/**
+	 * Set's order's user_id to user from session or Guest otherwise
+	 *
+	 * @param kEvent $event
+	 */
+	function CheckUser(&$event)
+	{
+		if ( $this->Application->IsAdmin() ) return;
+		$order =& $event->GetObject();
+
+		$ses_user = $this->Application->RecallVar('user_id');
+
+		if ($order->GetDBField('PortalUserId') != $ses_user) {
+			if ($ses_user == 0) $ses_user = -2; //Guest
+			$order->SetDBField('PortalUserId', $ses_user);
+			// since CheckUser is called in OnBeforeItemUpdate, we don't need to call udpate here, just set the field
+		}
+	}
+
+	/* ======================== ADMIN ONLY ======================== */
+
+	/**
+	 * Prepare temp tables and populate it
+	 * with items selected in the grid
+	 *
+	 * @param kEvent $event
+	 */
+	function OnPreCreate(&$event)
+	{
+		parent::OnPreCreate($event);
+
+		$object =& $event->getObject();
+		$new_number = $this->getNextOrderNumber($event);
+		$object->SetDBField('Number', $new_number);
+		$object->SetDBField('SubNumber', 0);
+		$object->SetDBField('OrderIP', $_SERVER['REMOTE_ADDR']);
+		$order_type = $this->getTypeBySpecial( $this->Application->GetVar('order_type') );
+		$object->SetDBField('Status', $order_type);
+	}
+
+	/**
+	 * When cloning orders set new order number to them
+	 *
+	 * @param kEvent $event
+	 */
+	function OnBeforeClone(&$event)
+	{
+		$object =& $event->getObject();
+
+		if (substr($event->Special, 0, 9) == 'recurring') {
+			$object->SetDBField('SubNumber', $object->getNextSubNumber());
+			$object->SetDBField('OriginalAmount', 0); // needed in this case ?
+		}
+		else {
+			$new_number = $this->getNextOrderNumber($event);
+			$object->SetDBField('Number', $new_number);
+			$object->SetDBField('SubNumber', 0);
+			$object->SetDBField('OriginalAmount', 0);
+		}
+		$object->SetDBField('OrderDate', adodb_mktime());
+		$object->UpdateFormattersSubFields();
+		$object->SetDBField('GWResult1', '');
+		$object->SetDBField('GWResult2', '');
+	}
+
+	function OnReserveItems(&$event)
+	{
+		$order_items =& $this->Application->recallObject('orditems.-inv','orditems_List',Array('skip_counting'=>true,'per_page'=>-1) );
+		$order_items->linkToParent('-inv');
+		// force re-query, since we are updateing through orditem ITEM, not the list, and
+		// OnReserveItems may be called 2 times when fullfilling backorders through product edit - first time
+		// from FullFillBackorders and second time from OnOrderProcess
+		$order_items->Query(true);
+		$order_items->GoFirst();
+
+		// query all combinations used in this order
+
+
+		$product_object =& $this->Application->recallObject('p', null, Array('skip_autoload' => true));
+		$product_object->SwitchToLive();
+
+		$order_item =& $this->Application->recallObject('orditems.-item', null, Array('skip_autoload' => true));
+		$combination_item =& $this->Application->recallObject('poc.-item', null, Array('skip_autoload' => true));
+
+		$combinations = $this->queryCombinations($order_items);
+
+		$event->status = erSUCCESS;
+		while (!$order_items->EOL()) {
+			$rec = $order_items->getCurrentRecord();
+			$product_object->Load( $rec['ProductId'] );
+			if (!$product_object->GetDBField('InventoryStatus')) {
+				$order_items->GoNext();
+				continue;
+			}
+
+			$inv_object =& $this->getInventoryObject($product_object, $combination_item, $combinations[ $rec['ProductId'].'_'.$rec['OptionsSalt'] ]);
+
+			$lack = $rec['Quantity'] - $rec['QuantityReserved'];
+			if ($lack > 0) {
+				// reserve lack or what is available (in case if we need to reserve anything, by Alex)
+				$to_reserve = min($lack, $inv_object->GetDBField('QtyInStock') - $product_object->GetDBField('QtyInStockMin'));
+
+			if ($to_reserve < $lack) $event->status = erFAIL; // if we can't reserve the full lack
+
+			//reserve in order
+			$order_item->SetDBFieldsFromHash($rec);
+			$order_item->SetDBField('QuantityReserved', $rec['QuantityReserved'] + $to_reserve);
+			$order_item->SetId($rec['OrderItemId']);
+			$order_item->Update();
+
+			//update product - increase reserved, decrease in stock
+				$inv_object->SetDBField('QtyReserved', $inv_object->GetDBField('QtyReserved') + $to_reserve);
+				$inv_object->SetDBField('QtyInStock', $inv_object->GetDBField('QtyInStock') - $to_reserve);
+				$inv_object->SetDBField('QtyBackOrdered', $inv_object->GetDBField('QtyBackOrdered') - $to_reserve);
+				$inv_object->Update();
+
+				if ($product_object->GetDBField('InventoryStatus') == 2) {
+					// inventory by options, then restore changed combination values back to common $combinations array !!!
+					$combinations[ $rec['ProductId'].'_'.$rec['OptionsSalt'] ] = $inv_object->FieldValues;
+				}
+			}
+			$order_items->GoNext();
+		}
+		return true;
+	}
+
+	function OnOrderPrint(&$event)
+	{
+		$event->redirect_params = Array('opener'=>'s');
+	}
+
+	/**
+	 * Processes order each tab info resetting to other tab info / to user info
+	 *
+	 * @param kEvent $event
+	 * @access public
+	 */
+	function OnResetAddress(&$event)
+	{
+		$to_tab = $this->Application->GetVar('to_tab');
+		$from_tab = substr($event->Name,strlen('OnResetTo'));
+
+		// load values from db
+		$object =& $event->getObject();
+
+		// update values from submit
+		$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
+		if($items_info) $field_values = array_shift($items_info);
+		$object->SetFieldsFromHash($field_values);
+
+		$this->DoResetAddress($object, $from_tab, $to_tab);
+
+		$object->Update();
+		$event->redirect = false;
+	}
+
+	/**
+	 * Processes item selection from popup item selector
+	 *
+	 * @todo Is this called ? (by Alex)
+	 * @param kEvent $event
+	 */
+	function OnProcessSelected(&$event)
+	{
+		$selected_ids = $this->Application->GetVar('selected_ids');
+		$product_ids = $selected_ids['p'];
+
+		if ($product_ids) {
+			$product_ids = explode(',', $product_ids);
+
+			// !!! LOOK OUT - Adding items to Order in admin is handled in order_ITEMS_event_handler !!!
+			foreach ($product_ids as $product_id) {
+				$this->AddItemToOrder($event, $product_id);
+			}
+		}
+
+		$this->finalizePopup($event);
+	}
+
+	function OnMassPlaceOrder(&$event)
+	{
+		$object =& $event->getObject( Array('skip_autoload' => true) );
+		$ids = $this->StoreSelectedIDs($event);
+
+		if($ids)
+		{
+			foreach($ids as $id)
+			{
+				$object->Load($id);
+				$this->DoPlaceOrder($event);
+			}
+		}
+		$event->status = erSUCCESS;
+
+	}
+
+
+
+	/**
+	 * Universal
+	 * Checks if QtyInStock is enough to fullfill backorder (Qty - QtyReserved in order)
+	 *
+	 * @param int $ord_id
+	 * @return bool
+	 */
+	function ReadyToProcess($ord_id)
+	{
+		$poc_table = $this->Application->getUnitOption('poc', 'TableName');
+		$query = '	SELECT SUM(IF( IF('.TABLE_PREFIX.'Products.InventoryStatus = 2, '.$poc_table.'.QtyInStock, '.TABLE_PREFIX.'Products.QtyInStock) - '.TABLE_PREFIX.'Products.QtyInStockMin >= ('.TABLE_PREFIX.'OrderItems.Quantity - '.TABLE_PREFIX.'OrderItems.QuantityReserved), 0, 1))
+							FROM '.TABLE_PREFIX.'OrderItems
+					LEFT JOIN '.TABLE_PREFIX.'Products ON '.TABLE_PREFIX.'Products.ProductId = '.TABLE_PREFIX.'OrderItems.ProductId
+					LEFT JOIN '.$poc_table.' ON ('.$poc_table.'.CombinationCRC = '.TABLE_PREFIX.'OrderItems.OptionsSalt) AND ('.$poc_table.'.ProductId = '.TABLE_PREFIX.'OrderItems.ProductId)
+							WHERE OrderId = '.$ord_id.'
+							GROUP BY OrderId';
+
+		// IF (IF(InventoryStatus = 2, poc.QtyInStock, p.QtyInStock) - QtyInStockMin >= (Quantity - QuantityReserved), 0, 1
+		return ($this->Conn->GetOne($query) == 0);
+	}
+
+	/**
+	 * Return all option combinations used in order
+	 *
+	 * @param kDBList $order_items
+	 * @return Array
+	 */
+	function queryCombinations(&$order_items)
+	{
+		// 1. collect combination crc used in order
+		$combinations = Array();
+		while (!$order_items->EOL()) {
+			$row = $order_items->getCurrentRecord();
+			if ($row['OptionsSalt'] == 0) {
+				$order_items->GoNext();
+				continue;
+			}
+			$combinations[] = '(poc.ProductId = '.$row['ProductId'].') AND (poc.CombinationCRC = '.$row['OptionsSalt'].')';
+			$order_items->GoNext();
+		}
+		$order_items->GoFirst();
+		$combinations = array_unique($combinations); // if same combination+product found as backorder & normal order item
+
+		if ($combinations) {
+			// 2. query data about combinations
+			$poc_table = $this->Application->getUnitOption('poc', 'TableName');
+			$sql = 'SELECT CONCAT(poc.ProductId, "_", poc.CombinationCRC) AS CombinationKey, poc.*
+					FROM '.$poc_table.' poc
+					WHERE ('.implode(') OR (', $combinations).')';
+
+			return $this->Conn->Query($sql, 'CombinationKey');
+		}
+
+		return Array();
+	}
+
+	/**
+	 * Returns object to perform inventory actions on
+	 *
+	 * @param ProductsItem $product current product object in order
+	 * @param kDBItem $combination combination dummy object
+	 * @param Array $combination_data pre-queried combination data
+	 * @return kDBItem
+	 */
+	function &getInventoryObject(&$product, &$combination, $combination_data)
+	{
+		if ($product->GetDBField('InventoryStatus') == 2) {
+			// inventory by option combinations
+			$combination->SetDBFieldsFromHash($combination_data);
+			$combination->setID($combination_data['CombinationId']);
+			$change_item =& $combination;
+		}
+		else {
+			// inventory by product ifself
+			$change_item =& $product;
+		}
+
+		return $change_item;
+	}
+
+	/**
+	 * Approve order ("Pending" tab)
+	 *
+	 * @param kDBList $order_items
+	 * @return int new status of order if any
+	 */
+	function approveOrder(&$order_items)
+	{
+		$product_object =& $this->Application->recallObject('p', null, Array('skip_autoload' => true));
+		$order_item =& $this->Application->recallObject('orditems.-item', null, Array('skip_autoload' => true));
+		$combination_item =& $this->Application->recallObject('poc.-item', null, Array('skip_autoload' => true));
+
+		$combinations = $this->queryCombinations($order_items);
+
+		while (!$order_items->EOL()) {
+			$rec = $order_items->getCurrentRecord();
+
+			$order_item->SetDBFieldsFromHash($rec);
+			$order_item->SetId($rec['OrderItemId']);
+			$order_item->SetDBField('QuantityReserved', 0);
+			$order_item->Update();
+
+			$product_object->Load( $rec['ProductId'] );
+			if (!$product_object->GetDBField('InventoryStatus')) {
+				// if no inventory info is collected, then skip this order item
+				$order_items->GoNext();
+				continue;
+			}
+
+			$inv_object =& $this->getInventoryObject($product_object, $combination_item, $combinations[ $rec['ProductId'].'_'.$rec['OptionsSalt'] ]);
+
+			// decrease QtyReserved by amount of product used in order
+			$inv_object->SetDBField('QtyReserved', $inv_object->GetDBField('QtyReserved') - $rec['Quantity']);
+			$inv_object->Update();
+
+			if ($product_object->GetDBField('InventoryStatus') == 2) {
+				// inventory by options, then restore changed combination values back to common $combinations array !!!
+				$combinations[ $rec['ProductId'].'_'.$rec['OptionsSalt'] ] = $inv_object->FieldValues;
+			}
+
+			$order_items->GoNext();
+		}
+		return true;
+	}
+
+	function restoreOrder(&$order_items)
+	{
+		$product_object =& $this->Application->recallObject('p', null, Array('skip_autoload' => true));
+		$product_object->SwitchToLive();
+
+		$order_item =& $this->Application->recallObject('orditems.-item', null, Array('skip_autoload' => true));
+		$combination_item =& $this->Application->recallObject('poc.-item', null, Array('skip_autoload' => true));
+
+		$combinations = $this->queryCombinations($order_items);
+
+		while( !$order_items->EOL() )
+		{
+			$rec = $order_items->getCurrentRecord();
+
+			$product_object->Load( $rec['ProductId'] );
+			if (!$product_object->GetDBField('InventoryStatus')) {
+				// if no inventory info is collected, then skip this order item
+				$order_items->GoNext();
+				continue;
+			}
+
+			$inv_object =& $this->getInventoryObject($product_object, $combination_item, $combinations[ $rec['ProductId'].'_'.$rec['OptionsSalt'] ]);
+
+			// cancelling backorderd qty if any
+			$lack = $rec['Quantity'] - $rec['QuantityReserved'];
+			if ($lack > 0 && $rec['BackOrderFlag'] > 0) { // lack should have been recorded as QtyBackOrdered
+				$inv_object->SetDBField('QtyBackOrdered', $inv_object->GetDBField('QtyBackOrdered') - $lack);
+			}
+
+			// canceling reservation in stock
+			$inv_object->SetDBField('QtyReserved', $inv_object->GetDBField('QtyReserved') - $rec['QuantityReserved']);
+			// putting remaining freed qty back to stock
+			$inv_object->SetDBField('QtyInStock', $inv_object->GetDBField('QtyInStock') + $rec['QuantityReserved']);
+			$inv_object->Update();
+
+			$product_h =& $this->Application->recallObject('p_EventHandler');
+			if ($product_object->GetDBField('InventoryStatus') == 2) {
+				// inventory by options, then restore changed combination values back to common $combinations array !!!
+				$combinations[ $rec['ProductId'].'_'.$rec['OptionsSalt'] ] = $inv_object->FieldValues;
+
+				// using freed qty to fullfill possible backorders
+				$product_h->FullfillBackOrders($product_object, $inv_object->GetID());
+			}
+			else {
+				// using freed qty to fullfill possible backorders
+				$product_h->FullfillBackOrders($product_object, 0);
+			}
+
+			$order_item->SetDBFieldsFromHash($rec);
+			$order_item->SetId($rec['OrderItemId']);
+			$order_item->SetDBField('QuantityReserved', 0);
+			$order_item->Update();
+
+			$order_items->GoNext();
+		}
+		return true;
+	}
+
+	/**
+	 * Approve order + special processing
+	 *
+	 * @param kEvent $event
+	 */
+	function MassInventoryAction(&$event)
+	{
+		if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
+			return;
+		}
+
+		// process order products
+		$object =& $this->Application->recallObject($event->Prefix.'.-inv', null, Array('skip_autoload' => true));
+
+		$ids = $this->StoreSelectedIDs($event);
+
+		if($ids)
+		{
+			foreach($ids as $id)
+			{
+				$object->Load($id);
+				$this->InventoryAction($event);
+			}
+		}
+	}
+
+	function InventoryAction(&$event)
+	{
+		if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
+			return;
+		}
+
+		$event_status_map = Array(
+											'OnMassOrderApprove' 	=>	ORDER_STATUS_TOSHIP,
+											'OnOrderApprove' 	=>	ORDER_STATUS_TOSHIP,
+											'OnMassOrderDeny'		=>	ORDER_STATUS_DENIED,
+											'OnOrderDeny'		=>	ORDER_STATUS_DENIED,
+											'OnMassOrderArchive'	=>	ORDER_STATUS_ARCHIVED,
+											'OnOrderArchive'	=>	ORDER_STATUS_ARCHIVED,
+											'OnMassOrderShip' => ORDER_STATUS_PROCESSED,
+											'OnOrderShip' => ORDER_STATUS_PROCESSED,
+											'OnMassOrderProcess' => ORDER_STATUS_TOSHIP,
+											'OnOrderProcess' => ORDER_STATUS_TOSHIP,
+		);
+		$order_items =& $this->Application->recallObject('orditems.-inv','orditems_List',Array('skip_counting'=>true,'per_page'=>-1) );
+		$order_items->linkToParent('-inv');
+		$order_items->Query();
+		$order_items->GoFirst();
+
+		$object =& $this->Application->recallObject($event->Prefix.'.-inv');
+		/* @var $object OrdersItem */
+
+		if ($object->GetDBField('OnHold')) {
+			// any actions have no effect while on hold
+			return ;
+		}
+
+		// preparing new status, but not setting it yet
+		$object->SetDBField('Status', $event_status_map[$event->Name]);
+
+		$set_new_status = false;
+		$event->status = erSUCCESS;
+
+		$email_params = $this->OrderEmailParams($object);
+
+		switch ($event->Name) {
+			case 'OnMassOrderApprove':
+			case 'OnOrderApprove':
+				$set_new_status = false; //on succsessfull approve order will be split and new orders will have new statuses
+
+				if ($object->GetDBField('ChargeOnNextApprove')) {
+					$charge_info = $this->ChargeOrder($object);
+					if (!$charge_info['result']) {
+						break;
+					}
+
+					// removing ChargeOnNextApprove
+					$object->SetDBField('ChargeOnNextApprove', 0);
+					$sql = 'UPDATE '.$object->TableName.' SET ChargeOnNextApprove = 0 WHERE '.$object->IDField.' = '.$object->GetID();
+					$this->Conn->Query($sql);
+				}
+
+				// charge user for order in case if we user 2step charging (e.g. AUTH_ONLY + PRIOR_AUTH_CAPTURE)
+				$gw_data = $object->getGatewayData();
+
+				$this->Application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
+				$gateway_object =& $this->Application->recallObject( $gw_data['ClassName'] );
+
+				$charge_result = $gateway_object->Charge($object->FieldValues, $gw_data['gw_params']);
+				$sql = 'UPDATE %s SET GWResult2 = %s WHERE %s = %s';
+				$sql = sprintf($sql, $object->TableName, $this->Conn->qstr($gateway_object->getGWResponce()), $object->IDField, $object->GetID() );
+				$this->Conn->Query($sql);
+				$object->SetDBField('GWResult2', $gateway_object->getGWResponce() );
+
+				if ($charge_result) {
+					$product_object =& $this->Application->recallObject('p', null, Array('skip_autoload' => true));
+					foreach ($order_items->Records as $product_item) {
+						if (!$product_item['ProductId']) {
+							 // product may have been deleted
+							continue;
+						}
+						$product_object->Load($product_item['ProductId']);
+						$hits = floor( $product_object->GetDBField('Hits') ) + 1;
+						$sql = 'SELECT MAX(Hits) FROM '.$this->Application->getUnitOption('p', 'TableName').'
+								WHERE FLOOR(Hits) = '.$hits;
+						$hits = ( $res = $this->Conn->GetOne($sql) ) ? $res + 0.000001 : $hits;
+						$product_object->SetDBField('Hits', $hits);
+						$product_object->Update();
+
+						/*$sql = 'UPDATE '.$this->Application->getUnitOption('p', 'TableName').'
+								SET Hits = Hits + '.$product_item['Quantity'].'
+								WHERE ProductId = '.$product_item['ProductId'];
+						$this->Conn->Query($sql);*/
+					}
+
+					$this->PrepareCoupons($event, $object);
+					$this->SplitOrder($event, $object);
+					if ($object->GetDBField('IsRecurringBilling') != 1) {
+						$email_event_user =& $this->Application->EmailEventUser('ORDER.APPROVE', $object->GetDBField('PortalUserId'), $email_params);
+
+						// Mask credit card with XXXX
+						if ($this->Application->ConfigValue('Comm_MaskProcessedCreditCards')) {
+							$this->maskCreditCard($object, 'PaymentAccount');
+							$set_new_status = 1;
+						}
+					}
+				}
+
+				break;
+
+			case 'OnMassOrderDeny':
+			case 'OnOrderDeny':
+				foreach ($order_items->Records as $product_item) {
+					if (!$product_item['ProductId']) {
+						 // product may have been deleted
+						continue;
+					}
+					$this->raiseProductEvent('Deny', $product_item['ProductId'], $product_item);
+				}
+				$email_event_user =& $this->Application->EmailEventUser('ORDER.DENY', $object->GetDBField('PortalUserId'), $email_params);
+
+				if ($event->Name == 'OnMassOrderDeny' || $event->Name == 'OnOrderDeny') {
+					// inform payment gateway that order was declined
+					$gw_data = $object->getGatewayData();
+
+					$this->Application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
+					$gateway_object =& $this->Application->recallObject( $gw_data['ClassName'] );
+
+					$gateway_object->OrderDeclined($object->FieldValues, $gw_data['gw_params']);
+				}
+
+				// !!! LOOK HERE !!!
+				// !!!! no break !!!! here on purpose!!!
+			case 'OnMassOrderArchive':
+			case 'OnOrderArchive':
+				// it's critical to update status BEFORE processing items because
+				// FullfillBackorders could be called during processing and in case
+				// of order denial/archive fullfill could reserve the qtys back for current backorder
+				$object->Update();
+				$this->restoreOrder($order_items);
+				$set_new_status = false; // already set
+				break;
+
+			case 'OnMassOrderShip':
+			case 'OnOrderShip':
+				$ret = Array();
+
+				// try to create usps order
+				if ( $object->GetDBField('ShippingType') == 0 && strpos($object->GetDBField('ShippingInfo'), 'USPS')) {
+					$ses_usps_erros = Array();
+					$ret = $this->MakeUSPSOrder($object);
+				}
+
+				if ( !array_key_exists('error_number', $ret) ) {
+					$set_new_status = $this->approveOrder($order_items);
+
+	//				$set_new_status = $this->shipOrder($order_items);
+					$object->SetDBField('ShippingDate', adodb_mktime());
+					$object->UpdateFormattersSubFields();
+
+					$shipping_email = $object->GetDBField('ShippingEmail');
+					$email_params['to_email'] = $shipping_email ? $shipping_email : $email_params['_user_email'];
+					$email_event_user =& $this->Application->EmailEventUser('ORDER.SHIP', $object->GetDBField('PortalUserId'), $email_params);
+
+					// inform payment gateway that order was shipped
+					$gw_data = $object->getGatewayData();
+
+					$this->Application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
+					$gateway_object =& $this->Application->recallObject( $gw_data['ClassName'] );
+
+					$gateway_object->OrderShipped($object->FieldValues, $gw_data['gw_params']);
+				}
+				else {
+					$usps_errors[$object->GetField('OrderNumber')] = $ret['error_description'];
+					$ses_usps_erros = Array();
+					$ses_usps_erros = unserialize($this->Application->RecallVar('usps_errors'));
+					if ( is_array($ses_usps_erros) ) {
+						$usps_errors = array_merge($usps_errors, $ses_usps_erros);
+					}
+					$this->Application->StoreVar('usps_errors', serialize($usps_errors));
+				}
+
+				break;
+
+			case 'OnMassOrderProcess':
+			case 'OnOrderProcess':
+				if ($this->ReadyToProcess($object->GetID())) {
+					$event->CallSubEvent('OnReserveItems');
+					if ($event->status == erSUCCESS) $set_new_status = true;
+					$email_event_user =& $this->Application->EmailEventUser('BACKORDER.PROCESS', $object->GetDBField('PortalUserId'), $email_params);
+				} else {
+					$event->status = erFAIL;
+				}
+				break;
+		}
+
+		if ($set_new_status) {
+			$object->Update();
+		}
+	}
+
+	/**
+	 * Hides last 4 digits from credit card number
+	 *
+	 * @param OrdersItem $object
+	 * @param string $field
+	 */
+	function maskCreditCard(&$object, $field)
+	{
+		$value = $object->GetDBField($field);
+		$value = preg_replace('/'.substr($value, -4).'$/', str_repeat('X', 4), $value);
+		$object->SetDBField($field, $value);
+	}
+
+	/**
+	 * Get next free order number
+	 *
+	 * @param kEvent $event
+	 */
+	function getNextOrderNumber(&$event)
+	{
+		$object =& $event->getObject();
+		$sql = 'SELECT MAX(Number) FROM '.$this->Application->GetLiveName($object->TableName);
+		return max($this->Conn->GetOne($sql) + 1, $this->Application->ConfigValue('Comm_Next_Order_Number'));
+	}
+
+	/**
+	 * Set's new order address based on another address from order (e.g. billing from shipping)
+	 *
+	 * @param unknown_type $object
+	 * @param unknown_type $from
+	 * @param unknown_type $to
+	 */
+	function DoResetAddress(&$object, $from, $to)
+	{
+		$fields = Array('To','Company','Phone','Fax','Email','Address1','Address2','City','State','Zip','Country');
+
+		if ($from == 'User') {
+			// skip theese fields when coping from user, because they are not present in user profile
+			$tmp_fields = array_flip($fields);
+//			unset($tmp_fields['Company'], $tmp_fields['Fax'], $tmp_fields['Address2']);
+			$fields = array_flip($tmp_fields);
+		}
+
+		// apply modification
+		foreach ($fields as $field_name) {
+			$object->SetDBField($to.$field_name, $object->GetDBField($from.$field_name));
+		}
+	}
+
+	/**
+	 * Set's additional view filters set from "Orders" => "Search" tab
+	 *
+	 * @param kEvent $event
+	 */
+	function AddFilters(&$event)
+	{
+		parent::AddFilters($event);
+
+		if($event->Special != 'search') return true;
+
+		$search_filter = $this->Application->RecallVar('ord.search_search_filter');
+		if(!$search_filter) return false;
+
+		$search_filter = unserialize($search_filter);
+		$event->setPseudoClass('_List');
+		$object =& $event->getObject();
+
+		foreach($search_filter as $filter_name => $filter_params)
+		{
+			$filter_type = $filter_params['type'] == 'where' ? WHERE_FILTER : HAVING_FILTER;
+			$object->addFilter($filter_name, $filter_params['value'], $filter_type, FLT_VIEW);
+		}
+	}
+
+	/**
+	 * Set's status incomplete to all cloned orders
+	 *
+	 * @param kEvent $event
+	 */
+	function OnAfterClone(&$event)
+	{
+		$id = $event->getEventParam('id');
+		$table = $this->Application->getUnitOption($event->Prefix,'TableName');
+		$id_field = $this->Application->getUnitOption($event->Prefix,'IDField');
+
+		// set cloned order status to Incomplete
+		$sql = 'UPDATE '.$table.' SET Status = 0 WHERE '.$id_field.' = '.$id;
+		$this->Conn->Query($sql);
+	}
+
+
+	/* ======================== COMMON CODE ======================== */
+
+	/**
+	 * Split one timestamp field into 2 virtual fields
+	 *
+	 * @param kEvent $event
+	 * @access public
+	 */
+	function OnAfterItemLoad(&$event)
+	{
+		// get user fields
+		$object =& $event->getObject();
+		$user_id = $object->GetDBField('PortalUserId');
+		if($user_id)
+		{
+			$user_info = $this->Conn->GetRow('SELECT *, CONCAT(FirstName,\' \',LastName) AS UserTo FROM '.TABLE_PREFIX.'PortalUser WHERE PortalUserId = '.$user_id);
+
+			$fields = Array('UserTo'=>'UserTo','UserPhone'=>'Phone','UserFax'=>'Fax','UserEmail'=>'Email',
+							'UserAddress1'=>'Street','UserAddress2'=>'Street2','UserCity'=>'City','UserState'=>'State',
+							'UserZip'=>'Zip','UserCountry'=>'Country','UserCompany'=>'Company');
+			foreach($fields as $object_field => $user_field)
+			{
+				$object->SetDBField($object_field,$user_info[$user_field]);
+			}
+		}
+
+		$object->SetDBField('PaymentCVV2', $this->Application->RecallVar('CVV2Code') );
+
+		$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+		$cs_helper->PopulateStates($event, 'ShippingState', 'ShippingCountry');
+		$cs_helper->PopulateStates($event, 'BillingState', 'BillingCountry');
+
+		$this->SetStepRequiredFields($event);
+
+		// needed in OnAfterItemUpdate
+		$this->Application->SetVar('OriginalShippingOption', $object->GetDBField('ShippingOption'));
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnBeforeItemUpdate(&$event)
+	{
+		$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+		$cs_helper->PopulateStates($event, 'ShippingState', 'ShippingCountry');
+		$cs_helper->PopulateStates($event, 'BillingState', 'BillingCountry');
+
+		$object = &$event->getObject();
+		if ($object->GetDBField('Status') > ORDER_STATUS_PENDING) return;
+
+		$this->CheckUser($event);
+		if(!$object->GetDBField('OrderIP'))
+		{
+			$object->SetDBField('OrderIP', $_SERVER['REMOTE_ADDR']);
+		}
+
+		$shipping_option = $this->Application->GetVar('OriginalShippingOption');
+		$new_shipping_option = $object->GetDBField('ShippingOption');
+		if ($shipping_option != $new_shipping_option) {
+			$this->UpdateShippingOption($event);
+		}
+		else {
+			$this->UpdateShippingTypes($event);
+		}
+		$this->RecalculateProcessingFee($event);
+		$this->UpdateShippingTotal($event);
+		$this->RecalculateGift($event);
+	}
+
+	/**
+	 * Apply any custom changes to list's sql query
+	 *
+	 * @param kEvent $event
+	 * @access protected
+	 * @see OnListBuild
+	 */
+	function SetCustomQuery(&$event)
+	{
+		$object =& $event->getObject();
+
+		$types = $event->getEventParam('types');
+		if($types == 'myorders' || $types == 'myrecentorders')
+		{
+			$user_id = $this->Application->RecallVar('user_id');
+			$object->addFilter('myitems_user1','%1$s.PortalUserId = '.$user_id);
+			$object->addFilter('myitems_user2','%1$s.PortalUserId > 0');
+			$object->addFilter('Status','%1$s.Status != 0');
+		}
+		else if ($event->Special == 'returns') {
+//			$object->addFilter('returns_filter',TABLE_PREFIX.'Orders.Status = '.ORDER_STATUS_PROCESSED.' AND (
+//				SELECT SUM(ReturnType)
+//				FROM '.TABLE_PREFIX.'OrderItems oi
+//				WHERE oi.OrderId = '.TABLE_PREFIX.'Orders.OrderId
+//			) > 0');
+			$object->addFilter('returns_filter',TABLE_PREFIX.'Orders.Status = '.ORDER_STATUS_PROCESSED.' AND '.TABLE_PREFIX.'Orders.ReturnTotal > 0');
+		}
+		else if ($event->Special == 'user') {
+			$user_id = $this->Application->GetVar('u_id');
+			$object->addFilter('user_filter','%1$s.PortalUserId = '.$user_id);
+		}
+		else {
+			$special = $event->Special ? $event->Special : $this->Application->GetVar('order_type');
+			if ($special != 'search') {
+				// don't filter out orders by special in case of search tab
+				$object->addFilter( 'status_filter', '%1$s.Status='.$this->getTypeBySpecial($special) );
+			}
+
+			if ( $event->getEventParam('selected_only') ) {
+				$ids = $this->StoreSelectedIDs($event);
+				$object->addFilter( 'selected_filter', '%1$s.OrderId IN ('.implode(',', $ids).')');
+			}
+		}
+	}
+
+	function getTypeBySpecial($special)
+	{
+		$special2type = Array('incomplete'=>0,'pending'=>1,'backorders'=>2,'toship'=>3,'processed'=>4,'denied'=>5,'archived'=>6);
+		return $special2type[$special];
+	}
+
+	function getSpecialByType($type)
+	{
+		$type2special = Array(0=>'incomplete',1=>'pending',2=>'backorders',3=>'toship',4=>'processed',5=>'denied',6=>'archived');
+		return $type2special[$type];
+	}
+
+	function LockTables(&$event)
+	{
+		$read = Array();
+		$write_lock = '';
+		$read_lock = '';
+		$write = Array('Orders','OrderItems','Products');
+		foreach ($write as $tbl) {
+			$write_lock .= TABLE_PREFIX.$tbl.' WRITE,';
+		}
+		foreach ($read as $tbl) {
+			$read_lock .= TABLE_PREFIX.$tbl.' READ,';
+		}
+		$write_lock = rtrim($write_lock, ',');
+		$read_lock = rtrim($read_lock, ',');
+		$lock = trim($read_lock.','.$write_lock, ',');
+		//$this->Conn->Query('LOCK TABLES '.$lock);
+	}
+
+	/**
+	 * Checks shopping cart products quantities
+	 *
+	 * @param kEvent $event
+	 * @return bool
+	 */
+	function CheckQuantites(&$event)
+	{
+		if ($this->OnRecalculateItems($event)) { // if something has changed in the order
+			if ( $this->Application->IsAdmin() )
+			{
+				if ($this->UseTempTables($event)) {
+					$event->redirect = 'in-commerce/orders/orders_edit_items';
+				}
+			}
+			else
+			{
+				$event->redirect = $this->Application->GetVar('viewcart_template');
+			}
+			return false;
+		}
+		return true;
+	}
+
+	function DoPlaceOrder(&$event)
+	{
+		$order =& $event->getObject();
+
+		$table_prefix = $this->TablePrefix($event);
+
+		$this->LockTables($event);
+
+		if (!$this->CheckQuantites($event)) return false;
+
+		//everything is fine - we could reserve items
+		$this->ReserveItems($event);
+		$this->SplitOrder($event, $order);
+		return true;
+	}
+
+	function &queryOrderItems(&$event, $table_prefix)
+	{
+		$order =& $event->getObject();
+		$ord_id = $order->GetId();
+
+		// TABLE_PREFIX and $table_prefix are NOT the same !!!
+		$poc_table = $this->Application->getUnitOption('poc', 'TableName');
+		$query = '	SELECT
+							 BackOrderFlag, '.
+							 $table_prefix.'OrderItems.OrderItemId, '.
+							 $table_prefix.'OrderItems.Quantity, '.
+							 $table_prefix.'OrderItems.QuantityReserved,
+							 IF('.TABLE_PREFIX.'Products.InventoryStatus = 2, '.$poc_table.'.QtyInStock, '.TABLE_PREFIX.'Products.QtyInStock) AS QtyInStock, '.
+							 TABLE_PREFIX.'Products.QtyInStockMin, '.
+							 $table_prefix.'OrderItems.ProductId, '.
+							 TABLE_PREFIX.'Products.InventoryStatus,'.
+							 $table_prefix.'OrderItems.OptionsSalt AS CombinationCRC
+					FROM '.$table_prefix.'OrderItems
+					LEFT JOIN '.TABLE_PREFIX.'Products ON '.TABLE_PREFIX.'Products.ProductId = '.$table_prefix.'OrderItems.ProductId
+					LEFT JOIN '.$poc_table.' ON ('.$poc_table.'.CombinationCRC = '.$table_prefix.'OrderItems.OptionsSalt) AND ('.$poc_table.'.ProductId = '.$table_prefix.'OrderItems.ProductId)
+					WHERE OrderId = '.$ord_id.' AND '.TABLE_PREFIX.'Products.Type = 1
+					ORDER BY BackOrderFlag ASC';
+
+		$items = $this->Conn->Query($query);
+		return $items;
+	}
+
+	function ReserveItems(&$event)
+	{
+		$table_prefix = $this->TablePrefix($event);
+		$items =& $this->queryOrderItems($event, $table_prefix);
+
+		foreach ($items as $an_item) {
+			if (!$an_item['InventoryStatus']) {
+				$to_reserve = $an_item['Quantity'] - $an_item['QuantityReserved'];
+			}
+			else {
+				if ($an_item['BackOrderFlag'] > 0) { // we don't need to reserve if it's backordered item
+					$to_reserve = 0;
+				}
+				else {
+					$to_reserve = min($an_item['Quantity']-$an_item['QuantityReserved'], $an_item['QtyInStock']-$an_item['QtyInStockMin']); //it should be equal, but just in case
+				}
+
+				$to_backorder = $an_item['BackOrderFlag'] > 0 ? $an_item['Quantity']-$an_item['QuantityReserved'] : 0;
+			}
+
+			if ($to_backorder < 0) $to_backorder = 0; //just in case
+			$query = '	UPDATE '.$table_prefix.'OrderItems
+						SET QuantityReserved = IF(QuantityReserved IS NULL, '.$to_reserve.', QuantityReserved + '.$to_reserve.')
+						WHERE OrderItemId = '.$an_item['OrderItemId'];
+			$this->Conn->Query($query);
+
+			if (!$an_item['InventoryStatus']) continue;
+
+			$update_clause = '	QtyInStock = QtyInStock - '.$to_reserve.',
+							  	QtyReserved = QtyReserved + '.$to_reserve.',
+								QtyBackOrdered = QtyBackOrdered + '.$to_backorder;
+
+			if ($an_item['InventoryStatus'] == 1) {
+				// inventory by product, then update it's quantities
+				$query = '	UPDATE '.TABLE_PREFIX.'Products
+							SET '.$update_clause.'
+								WHERE ProductId = '.$an_item['ProductId'];
+			}
+			else {
+				// inventory = 2 -> by product option combinations
+				$poc_idfield = $this->Application->getUnitOption('poc', 'IDField');
+				$poc_table = $this->Application->getUnitOption('poc', 'TableName');
+				$query = '	UPDATE '.$poc_table.'
+							SET '.$update_clause.'
+							WHERE (ProductId = '.$an_item['ProductId'].') AND (CombinationCRC = '.$an_item['CombinationCRC'].')';
+			}
+			$this->Conn->Query($query);
+		}
+	}
+
+	function FreeItems(&$event)
+	{
+		$table_prefix = $this->TablePrefix($event);
+		$items =& $this->queryOrderItems($event, $table_prefix);
+
+		foreach ($items as $an_item) {
+				$to_free = $an_item['QuantityReserved'];
+
+				if ($an_item['InventoryStatus']) {
+				if ($an_item['BackOrderFlag'] > 0) { // we don't need to free if it's backordered item
+					$to_free = 0;
+				}
+
+				// what's not reserved goes to backorder in stock for orderitems marked with BackOrderFlag
+				$to_backorder_free = $an_item['BackOrderFlag'] > 0 ? $an_item['Quantity'] - $an_item['QuantityReserved'] : 0;
+				if ($to_backorder_free < 0) $to_backorder_free = 0; //just in case
+
+				$update_clause = '	QtyInStock = QtyInStock + '.$to_free.',
+								  	QtyReserved = QtyReserved - '.$to_free.',
+							  		QtyBackOrdered = QtyBackOrdered - '.$to_backorder_free;
+
+				if ($an_item['InventoryStatus'] == 1) {
+					// inventory by product
+					$query = '	UPDATE '.TABLE_PREFIX.'Products
+								SET '.$update_clause.'
+									WHERE ProductId = '.$an_item['ProductId'];
+				}
+				else {
+					// inventory by option combinations
+					$poc_idfield = $this->Application->getUnitOption('poc', 'IDField');
+					$poc_table = $this->Application->getUnitOption('poc', 'TableName');
+					$query = '	UPDATE '.$poc_table.'
+								SET '.$update_clause.'
+								WHERE (ProductId = '.$an_item['ProductId'].') AND (CombinationCRC = '.$an_item['CombinationCRC'].')';
+				}
+
+					$this->Conn->Query($query);
+				}
+
+			$query = '	UPDATE '.$table_prefix.'OrderItems
+						SET QuantityReserved = IF(QuantityReserved IS NULL, 0, QuantityReserved - '.$to_free.')
+									WHERE OrderItemId = '.$an_item['OrderItemId'];
+				$this->Conn->Query($query);
+		}
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 * @param OrdersItem $object
+	 */
+	function SplitOrder(&$event, &$object)
+	{
+		$affiliate_event = new kEvent('affil:OnOrderApprove');
+		$affiliate_event->setEventParam('Order_PrefixSpecial', $object->getPrefixSpecial() );
+		$this->Application->HandleEvent($affiliate_event);
+
+		$table_prefix = $this->TablePrefix($event);
+		$order =& $object;
+		$ord_id = $order->GetId();
+
+		$shipping_option = $order->GetDBField('ShippingOption');
+		$backorder_select = $shipping_option == 0 ? '0 As BackOrderFlag' : 'BackOrderFlag';
+
+
+		// setting PackageNum to 0 for Non-tangible items, for tangibles first package num is always 1
+		$query = '	SELECT OrderItemId
+					FROM '.$table_prefix.'OrderItems
+					LEFT JOIN '.TABLE_PREFIX.'Products
+					ON '.TABLE_PREFIX.'Products.ProductId = '.$table_prefix.'OrderItems.ProductId
+					WHERE '.TABLE_PREFIX.'Products.Type > 1 AND OrderId = '.$ord_id;
+		$non_tangibles = $this->Conn->GetCol($query);
+		if ($non_tangibles) {
+			$query = 'UPDATE '.$table_prefix.'OrderItems SET PackageNum = 0 WHERE OrderItemId IN ('.implode(',', $non_tangibles).')';
+			$this->Conn->Query($query);
+		}
+
+		// grouping_data:
+		// 0 => Product Type
+		// 1 => if NOT tangibale and NOT downloadable - OrderItemId,
+		//			2 => ProductId
+		// 3 => Shipping PackageNum
+		$query = 'SELECT
+					'.$backorder_select.',
+					PackageNum,
+					ProductName,
+					ShippingTypeId,
+					CONCAT('.TABLE_PREFIX.'Products.Type,
+						"_",
+						IF ('.TABLE_PREFIX.'Products.Type NOT IN ('.PRODUCT_TYPE_DOWNLOADABLE.','.PRODUCT_TYPE_TANGIBLE.'),
+							CONCAT(OrderItemId, "_", '.TABLE_PREFIX.'Products.ProductId),
+							""),
+						"_",
+						PackageNum
+						) AS Grouping,
+					SUM(Quantity) AS TotalItems,
+					SUM('.$table_prefix.'OrderItems.Weight*Quantity) AS TotalWeight,
+					SUM(Price * Quantity) AS TotalAmount,
+					SUM(QuantityReserved) AS TotalReserved,
+					'.TABLE_PREFIX.'Products.Type AS ProductType
+				FROM '.$table_prefix.'OrderItems
+				LEFT JOIN '.TABLE_PREFIX.'Products
+					ON '.TABLE_PREFIX.'Products.ProductId = '.$table_prefix.'OrderItems.ProductId
+				WHERE OrderId = '.$ord_id.'
+				GROUP BY BackOrderFlag, Grouping
+				ORDER BY BackOrderFlag ASC, PackageNum ASC, ProductType ASC';
+
+		$sub_orders = $this->Conn->Query($query);
+
+		$processed_sub_orders = Array();
+
+		// in case of recurring billing this will not be 0 as usual
+		//$first_sub_number = ($event->Special == 'recurring') ? $object->getNextSubNumber() - 1 : 0;
+		$first_sub_number = $object->GetDBField('SubNumber');
+
+		$next_sub_number = $first_sub_number;
+		$group = 1;
+
+		$order_has_gift = $order->GetDBField('GiftCertificateDiscount') > 0 ? 1 : 0;
+
+		$skip_types = Array (PRODUCT_TYPE_TANGIBLE, PRODUCT_TYPE_DOWNLOADABLE);
+		foreach ($sub_orders as $sub_order_data) {
+			$sub_order =& $this->Application->recallObject('ord.-sub'.$next_sub_number, 'ord');
+			/* @var $sub_order OrdersItem */
+
+			if ($this->UseTempTables($event) && $next_sub_number == 0) {
+				$sub_order =& $order;
+			}
+			$sub_order->SetDBFieldsFromHash($order->FieldValues);
+			$sub_order->SetDBField('SubNumber', $next_sub_number);
+			$sub_order->SetDBField('SubTotal', $sub_order_data['TotalAmount']);
+
+			$grouping_data = explode('_', $sub_order_data['Grouping']);
+			$named_grouping_data['Type'] = $grouping_data[0];
+
+			if (!in_array($named_grouping_data['Type'], $skip_types)) {
+				$named_grouping_data['OrderItemId'] = $grouping_data[1];
+				$named_grouping_data['ProductId'] = $grouping_data[2];
+				$named_grouping_data['PackageNum'] = $grouping_data[3];
+			}
+			else {
+				$named_grouping_data['PackageNum'] = $grouping_data[2];
+			}
+
+			if ($named_grouping_data['Type'] == PRODUCT_TYPE_TANGIBLE) {
+				$sub_order->SetDBField('ShippingCost', getArrayValue( unserialize($order->GetDBField('ShippingInfo')), $sub_order_data['PackageNum'], 'TotalCost') );
+				$sub_order->SetDBField('InsuranceFee', getArrayValue( unserialize($order->GetDBField('ShippingInfo')), $sub_order_data['PackageNum'], 'InsuranceFee') );
+				$sub_order->SetDBField('ShippingInfo', serialize(Array(1 => getArrayValue( unserialize($order->GetDBField('ShippingInfo')), $sub_order_data['PackageNum']))));
+			}
+			else {
+				$sub_order->SetDBField('ShippingCost', 0);
+				$sub_order->SetDBField('InsuranceFee', 0);
+				$sub_order->SetDBField('ShippingInfo', ''); //otherwise orders w/o shipping wills still have shipping info!
+			}
+
+			$amount_percent = $sub_order->getTotalAmount() * 100 / $order->getTotalAmount();
+			// proportional affiliate commission splitting
+			if ($order->GetDBField('AffiliateCommission') > 0) {
+				$sub_order->SetDBField('AffiliateCommission', $order->GetDBField('AffiliateCommission') * $amount_percent / 100 );
+			}
+
+			$amount_percent = ($sub_order->GetDBField('SubTotal') + $sub_order->GetDBField('ShippingCost')) * 100 / ($order->GetDBField('SubTotal') + $order->GetDBField('ShippingCost'));
+			if ($order->GetDBField('ProcessingFee') > 0) {
+				$sub_order->SetDBField('ProcessingFee', round($order->GetDBField('ProcessingFee') * $amount_percent / 100, 2));
+			}
+
+			$sub_order->RecalculateTax();
+
+			$original_amount = $sub_order->GetDBField('SubTotal') + $sub_order->GetDBField('ShippingCost') + $sub_order->GetDBField('VAT') + $sub_order->GetDBField('ProcessingFee') + $sub_order->GetDBField('InsuranceFee') - $sub_order->GetDBField('GiftCertificateDiscount');
+			$sub_order->SetDBField('OriginalAmount', $original_amount);
+
+			if ($named_grouping_data['Type'] == 1 && ($sub_order_data['BackOrderFlag'] > 0
+					||
+					($sub_order_data['TotalItems'] != $sub_order_data['TotalReserved'])) ) {
+				$sub_order->SetDBField('Status', ORDER_STATUS_BACKORDERS);
+
+				if ($event->Special != 'recurring') { // just in case if admin uses tangible backordered products in recurring orders
+					$email_event_user 	=& $this->Application->EmailEventUser('BACKORDER.ADD', $sub_order->GetDBField('PortalUserId'), $this->OrderEmailParams($sub_order));
+		    		$email_event_admin 	=& $this->Application->EmailEventAdmin('BACKORDER.ADD');
+				}
+			}
+			else {
+				switch ($named_grouping_data['Type']) {
+					case PRODUCT_TYPE_DOWNLOADABLE:
+						$sql = 'SELECT oi.*
+								FROM '.TABLE_PREFIX.'OrderItems oi
+								LEFT JOIN '.TABLE_PREFIX.'Products p ON p.ProductId = oi.ProductId
+								WHERE (OrderId = %s) AND (p.Type = '.PRODUCT_TYPE_DOWNLOADABLE.')';
+						$downl_products = $this->Conn->Query( sprintf($sql, $ord_id) );
+						$product_ids = Array();
+						foreach ($downl_products as $downl_product) {
+							$this->raiseProductEvent('Approve', $downl_product['ProductId'], $downl_product, $next_sub_number);
+							$product_ids[] = $downl_product['ProductId'];
+						}
+						break;
+
+					case PRODUCT_TYPE_TANGIBLE:
+						$sql = 'SELECT '.$backorder_select.', oi.*
+								FROM '.TABLE_PREFIX.'OrderItems oi
+								LEFT JOIN '.TABLE_PREFIX.'Products p ON p.ProductId = oi.ProductId
+								WHERE (OrderId = %s) AND (BackOrderFlag = 0) AND (p.Type = '.PRODUCT_TYPE_TANGIBLE.')';
+
+							$products = $this->Conn->Query( sprintf($sql, $ord_id) );
+							foreach ($products as $product) {
+								$this->raiseProductEvent('Approve', $product['ProductId'], $product, $next_sub_number);
+							}
+						break;
+
+					default:
+						$order_item_fields = $this->Conn->GetRow('SELECT * FROM '.TABLE_PREFIX.'OrderItems WHERE OrderItemId = '.$named_grouping_data['OrderItemId']);
+						$this->raiseProductEvent('Approve', $named_grouping_data['ProductId'], $order_item_fields, $next_sub_number);
+						break;
+				}
+
+				$sub_order->SetDBField('Status', $named_grouping_data['Type'] == PRODUCT_TYPE_TANGIBLE ? ORDER_STATUS_TOSHIP : ORDER_STATUS_PROCESSED);
+			}
+
+			if ($next_sub_number == $first_sub_number) {
+				$sub_order->SetId($order->GetId());
+				$sub_order->Update();
+			}
+			else {
+				$sub_order->Create();
+			}
+
+			switch ($named_grouping_data['Type']) {
+				case PRODUCT_TYPE_TANGIBLE:
+					$query = 'UPDATE '.$table_prefix.'OrderItems SET OrderId = %s WHERE OrderId = %s AND PackageNum = %s';
+					$query = sprintf($query, $sub_order->GetId(), $ord_id, $sub_order_data['PackageNum']);
+					break;
+
+				case PRODUCT_TYPE_DOWNLOADABLE:
+					$query = 'UPDATE '.$table_prefix.'OrderItems SET OrderId = %s WHERE OrderId = %s AND ProductId IN (%s)';
+					$query = sprintf($query, $sub_order->GetId(), $ord_id, implode(',', $product_ids) );
+					break;
+
+				default:
+					$query = 'UPDATE '.$table_prefix.'OrderItems SET OrderId = %s WHERE OrderId = %s AND OrderItemId = %s';
+					$query = sprintf($query, $sub_order->GetId(), $ord_id, $named_grouping_data['OrderItemId']);
+					break;
+			}
+
+			$this->Conn->Query($query);
+
+			if ($order_has_gift) {
+				// gift certificate can be applied only after items are assigned to suborder
+				$sub_order->RecalculateGift($event);
+				$original_amount = $sub_order->GetDBField('SubTotal') + $sub_order->GetDBField('ShippingCost') + $sub_order->GetDBField('VAT') + $sub_order->GetDBField('ProcessingFee') + $sub_order->GetDBField('InsuranceFee') - $sub_order->GetDBField('GiftCertificateDiscount');
+				$sub_order->SetDBField('OriginalAmount', $original_amount);
+				$sub_order->Update();
+			}
+
+			$processed_sub_orders[] = $sub_order->GetID();
+
+			$next_sub_number++;
+			$group++;
+		}
+
+		foreach ($processed_sub_orders as $sub_id) {
+			// update DiscountTotal field
+			$sql = 'SELECT SUM(ROUND(FlatPrice-Price,2)*Quantity) FROM '.$table_prefix.'OrderItems WHERE OrderId = '.$sub_id;
+			$discount_total = $this->Conn->GetOne($sql);
+
+			$sql = 'UPDATE '.$sub_order->TableName.'
+					SET DiscountTotal = '.$this->Conn->qstr($discount_total).'
+					WHERE OrderId = '.$sub_id;
+			$this->Conn->Query($sql);
+		}
+	}
+
+	/**
+	 * Call products linked event when spefcfic action is made to product in order
+	 *
+	 * @param string $event_type type of event to get from product ProcessingData = {Approve,Deny,CompleteOrder}
+	 * @param int $product_id ID of product to gather processing data from
+	 * @param Array $order_item_fields OrderItems table record fields (with needed product & order in it)
+	 */
+	function raiseProductEvent($event_type, $product_id, $order_item_fields, $next_sub_number=null)
+	{
+		$sql = 'SELECT ProcessingData
+				FROM '.TABLE_PREFIX.'Products
+				WHERE ProductId = '.$product_id;
+		$processing_data = $this->Conn->GetOne($sql);
+		if ($processing_data) {
+			$processing_data = unserialize($processing_data);
+			$event_key = getArrayValue($processing_data, $event_type.'Event');
+			// if requested type of event is defined for product, only then process it
+			if ($event_key) {
+				$event = new kEvent($event_key);
+				$event->setEventParam('field_values', $order_item_fields);
+				$event->setEventParam('next_sub_number', $next_sub_number);
+				$this->Application->HandleEvent($event);
+			}
+		}
+	}
+
+	/**
+	 * Updates product info in shopping cart
+	 *
+	 * @param kEvent $event
+	 * @param unknown_type $prod_id
+	 * @param unknown_type $back_order
+	 * @param unknown_type $qty
+	 * @param unknown_type $price
+	 * @param unknown_type $discounted_price
+	 * @param unknown_type $discount_type
+	 * @param unknown_type $discount_id
+	 * @param unknown_type $order_item_id
+	 * @param unknown_type $options_salt
+	 * @param unknown_type $passed_item_data
+	 * @param unknown_type $cost
+	 * @return unknown
+	 */
+	function UpdateOrderItem(&$event, $prod_id, $back_order, $qty, $price, $discounted_price, $discount_type, $discount_id, $order_item_id = 0, $options_salt = 0, $passed_item_data=null, $cost=0)
+	{
+		$price = (float) $price;
+		$discounted_price = (float) $discounted_price;
+		$qty = (int) $qty;
+
+		$ord_id = $this->getPassedId($event);
+
+		$table_prefix = $this->TablePrefix($event);
+
+		if($order_item_id)
+		{
+			$query = '	SELECT OrderItemId, Quantity, FlatPrice, Price, BackOrderFlag, ItemData FROM '.$table_prefix.'OrderItems
+						WHERE OrderItemId = '.$order_item_id;
+		}
+		else
+		{
+			// try to load specified Product by its Id and BackOrderFlag in the order
+			$query = 'SELECT OrderItemId, Quantity, FlatPrice, Price, BackOrderFlag, ItemData FROM '.$table_prefix.'OrderItems
+								WHERE
+									OrderId = '.$ord_id.'
+									AND
+									ProductId = '.$prod_id.'
+									AND
+									BackOrderFlag '.($back_order ? ' >= 1' : ' = 0').'
+									AND
+									OptionsSalt = '.$options_salt;
+		}
+		$item_row = $this->Conn->GetRow($query);
+		$item_id = $item_row['OrderItemId'];
+
+		$object =& $this->Application->recallObject('orditems.-item', null, Array('skip_autoload' => true));
+		$item_data = $item_row['ItemData'];
+		if($item_data)
+		{
+			$item_data = unserialize($item_data);
+		}
+		$orig_discount_type = (int)getArrayValue($item_data, 'DiscountType');
+		$orig_discount_id = (int)getArrayValue($item_data, 'DiscountId');
+
+		if ($item_id) { // if Product already exists in the order
+			if ($qty > 0 &&
+				$item_row['Quantity'] == $qty &&
+				round($item_row['FlatPrice'], 3) == round($price, 3) &&
+				round($item_row['Price'], 3) == round($discounted_price, 3)	&&
+				$orig_discount_type == $discount_type &&
+				$orig_discount_id == $discount_id)
+			{
+				return false;
+			}
+			$object->Load($item_id);
+			if ($qty > 0) { // Update Price by _TOTAL_ qty
+				$object->SetDBField('Quantity', $qty);
+				$object->SetDBField('FlatPrice', $price );
+				$object->SetDBField('Price', $discounted_price );
+				$object->SetDBField('Cost', $cost);
+				if($item_data = $object->GetDBField('ItemData'))
+				{
+					$item_data = unserialize($item_data);
+				}
+				else
+				{
+					$item_data = Array();
+				}
+				$item_data['DiscountType'] = $discount_type;
+				$item_data['DiscountId'] = $discount_id;
+				$object->SetDBField('ItemData', serialize($item_data));
+				$object->Update();
+			}
+			else { // delete products with 0 qty
+				$object->Delete();
+			}
+		}
+		elseif ($qty > 0) { // if we are adding product
+			$product =& $this->Application->recallObject('p');
+			$product->Load($prod_id);
+			$object->SetDBField('ProductId', $prod_id);
+			$object->SetDBField('ProductName', $product->GetField('Name'));
+			$object->SetDBField('Quantity', $qty);
+			$object->SetDBField('FlatPrice', $price );
+			$object->SetDBField('Price', $discounted_price );
+			$object->SetDBField('Cost', $cost);
+			$object->SetDBField('OrderId', $ord_id);
+			$object->SetDBField('BackOrderFlag', $back_order);
+			if ($passed_item_data && !is_array($passed_item_data)) {
+				$passed_item_data = unserialize($passed_item_data);
+			}
+//			$item_data = Array('DiscountType' => $discount_type, 'DiscountId' => $discount_id);
+			$item_data = $passed_item_data;
+			$object->SetDBField('ItemData', serialize($item_data));
+			$object->Create();
+			if( $this->UseTempTables($event) ) $object->SetTempId();
+		}
+		else {
+			return false; // item requiring to set qty to 0, meaning already does not exist
+		}
+		return true;
+	}
+
+	function OptionsSalt($options, $comb_only=false)
+	{
+		$helper =& $this->Application->recallObject('kProductOptionsHelper');
+		return $helper->OptionsSalt($options, $comb_only);
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 * @param int $item_id
+	 */
+	function AddItemToOrder(&$event, $item_id, $qty = null, $package_num = null)
+	{
+		if (!isset($qty)) {
+			$qty = 1;
+		}
+
+		// Loading product to add
+		$product =& $this->Application->recallObject('p.toadd', null, Array('skip_autoload' => true));
+		$product->Load($item_id);
+
+
+		$object =& $this->Application->recallObject('orditems.-item', null, Array('skip_autoload' => true));
+
+		$order =& $this->Application->recallObject('ord');
+		$ord_id = $order->GetID();
+
+		if($item_data = $event->getEventParam('ItemData'))
+		{
+			$item_data = unserialize($item_data);
+		}
+		else
+		{
+			$item_data = Array();
+		}
+
+		$options = getArrayValue($item_data, 'Options');
+		if (!$this->CheckOptions($event, $options, $item_id, $qty, $product->GetDBField('OptionsSelectionMode'))) return;
+
+		// Checking if such product already exists in the cart
+		$keys['OrderId'] = $ord_id;
+		$keys['ProductId'] = $product->GetId();
+
+		if (isset($item_data['Options'])) {
+			$options_salt = $this->OptionsSalt($item_data['Options']);
+			$keys['OptionsSalt'] = $options_salt;
+		}
+		else {
+			$options_salt = null;
+		}
+
+		$exists = $object->Load($keys);
+
+		$object->SetDBField('ProductId', $product->GetId());
+		$object->SetDBField('ProductName', $product->GetField('l'.$this->Application->GetDefaultLanguageId().'_Name'));
+		$object->SetDBField('Weight', $product->GetDBField('Weight'));
+		if (isset($item_data['Options'])) {
+			$object->SetDBField('OptionsSalt', $options_salt);
+		}
+
+		if (isset($package_num)) {
+			$object->SetDBField('PackageNum', $package_num);
+		}
+
+		if($product->GetDBField('Type') == PRODUCT_TYPE_TANGIBLE || $product->GetDBField('Type') == 6)
+		{
+			$object->SetDBField('Quantity', $object->GetDBField('Quantity') + $qty);
+		}
+		else // Types: 2,3,4
+		{
+			$object->SetDBField('Quantity', $qty); // 1
+			$exists = false;
+		}
+
+		if (isset($item_data['ForcePrice'])) {
+			$price = $item_data['ForcePrice'];
+		}
+		else {
+			$price = $this->GetPlainProductPrice($product->GetId(), $object->GetDBField('Quantity'), $product->GetDBField('Type'), $order, $options_salt, $item_data);
+		}
+
+		$cost = $this->GetProductCost($product->GetId(), $object->GetDBField('Quantity'), $product->GetDBField('Type'), $options_salt, $item_data);
+		$object->SetDBField('FlatPrice', $price);
+		$couponed_price = $this->GetCouponDiscountedPrice($order->GetDBField('CouponId'), $product->GetId(), $price);
+		$discounted_price = $this->GetDiscountedProductPrice($product->GetId(), $price, $discount_id, $order);
+		if( $couponed_price < $discounted_price )
+		{
+			$discounted_price = $couponed_price;
+			$discount_type = 'coupon';
+			$discount_id = $order->GetDBField('CouponId');
+		}
+		else
+		{
+			$discount_type = 'discount';
+			$discount_id = $discount_id;
+		}
+
+		$item_data['DiscountType'] = $discount_type;
+		$item_data['DiscountId'] = $discount_id;
+		$item_data['IsRecurringBilling'] = $product->GetDBField('IsRecurringBilling');
+
+		// it item is processed in order using new style, then put such mark in orderitem record
+		$processing_data = $product->GetDBField('ProcessingData');
+		if ($processing_data) {
+			$processing_data = unserialize($processing_data);
+			if (getArrayValue($processing_data, 'HasNewProcessing')) {
+				$item_data['HasNewProcessing'] = 1;
+			}
+		}
+		$object->SetDBField('ItemData', serialize($item_data));
+
+		$object->SetDBField('Price', $discounted_price);	// will be retrieved later
+		$object->SetDBField('Cost', $cost);
+
+		$object->SetDBField('BackOrderFlag', 0); // it will be updated in OnRecalculateItems later if needed
+		$object->SetDBField('OrderId', $ord_id);
+
+		if ($exists) {
+			if ($qty > 0) {
+				$object->Update();
+			}
+			else {
+				$object->Delete();
+			}
+		}
+		else {
+			$object->Create();
+			if ($this->UseTempTables($event)) {
+				$object->setTempID();
+			}
+		}
+
+		$this->Application->HandleEvent($ord_event, 'ord:OnRecalculateItems');
+		/*if ($ord_event->getEventParam('RecalculateChangedCart') && !$this->Application->IsAdmin() ) {
+			$event->SetRedirectParam('checkout_error', $ord_event->redirect_params['checkout_error']);
+		}*/
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function UpdateShippingTotal(&$event)
+	{
+		if ($this->Application->GetVar('ebay_notification') == 1) {
+			// TODO: get rid of this "if"
+			return ;
+		}
+		$object =& $event->getObject();
+		$ord_id = $object->GetId();
+
+		$shipping_option = $object->GetDBField('ShippingOption');
+		$backorder_select = $shipping_option == 0 ? '0 As BackOrderFlag' : 'BackOrderFlag';
+
+		$table_prefix = $this->TablePrefix($event);
+
+		$shipping_info = $object->GetDBField('ShippingInfo') ? unserialize( $object->GetDBField('ShippingInfo') ) : false;
+		$shipping_total = 0;
+		$insurance_fee = 0;
+		if( is_array($shipping_info) )
+		{
+			foreach ($shipping_info as $a_shipping)
+			{
+	//				$id_elements = explode('_', $a_shipping['ShippingTypeId']);
+				$shipping_total += $a_shipping['TotalCost'];
+				$insurance_fee += $a_shipping['InsuranceFee'];
+			}
+		}
+		$object->SetDBField('ShippingCost', $shipping_total);
+		$object->SetDBField('InsuranceFee', $insurance_fee);
+		// no need to update, it will be called in calling method
+
+		$this->RecalculateTax($event);
+	}
+
+	/**
+	 * Recompile shopping cart, splitting or grouping orders and backorders depending on total quantityes.
+	 * First it counts total qty for each ProductId, and then creates order for available items
+	 * and backorder for others. It also updates the sub-total for the order
+	 *
+	 * @param kEvent $event
+	 * @return bool Returns true if items splitting/grouping were changed
+	 */
+	function OnRecalculateItems(&$event)
+	{
+		if($checkout_error = $this->Application->GetVar('set_checkout_error'))
+		{
+			$event->SetRedirectParam('checkout_error', $checkout_error);
+		}
+
+		$order =& $event->getObject();
+		/* @var $order OrdersItem */
+
+		if ( !$order->isLoaded() ) $this->LoadItem($event); // try to load
+		$ord_id = (int)$order->GetID();
+
+		if ( !$order->isLoaded() ) return; //order has not been created yet
+
+		if( $order->GetDBField('Status') != ORDER_STATUS_INCOMPLETE )
+		{
+			return;
+		}
+
+		$table_prefix = $this->TablePrefix($event);
+
+		// process only tangible products here
+		$poc_table = $this->Application->getUnitOption('poc', 'TableName');
+		$query = '	SELECT 	oi.ProductId, oi.OptionsSalt, oi.ItemData, SUM(oi.Quantity) AS Quantity,
+							IF(p.InventoryStatus = 2, poc.QtyInStock, p.QtyInStock) AS QtyInStock,
+							p.QtyInStockMin, p.BackOrder, p.InventoryStatus
+					FROM '.$table_prefix.'OrderItems AS oi
+					LEFT JOIN '.TABLE_PREFIX.'Products AS p ON oi.ProductId = p.ProductId
+					LEFT JOIN '.$poc_table.' poc ON (poc.CombinationCRC = oi.OptionsSalt) AND (oi.ProductId = poc.ProductId)
+							WHERE (oi.OrderId = '.$ord_id.') AND (p.Type = 1)
+							GROUP BY oi.ProductId, OptionsSalt';
+		$items = $this->Conn->Query($query);
+
+		$result = false;
+		$cost_total = 0;
+		$sub_total = 0;
+		$sub_total_flat = 0;
+		$coupon_discount = 0;
+		$pending_operations = Array();
+
+		$backordering = $this->Application->ConfigValue('Comm_Enable_Backordering');
+		$coupon_id = $order->GetDBField('CouponId');
+
+		foreach ($items as $row) {
+			$a_item_data = isset($row['ItemData']) ? unserialize($row['ItemData']) : Array();
+
+			$min_qty = $this->GetMinQty($row['ProductId']);
+			if ($row['Quantity'] > 0 && $row['Quantity'] < $min_qty) {
+				$row['Quantity'] = $min_qty;
+				$event->SetRedirectParam('checkout_error', 6);
+			}
+
+			$back_order = 0;
+			$to_order = 0;
+			if (!$row['InventoryStatus']) {
+				$available = $row['Quantity']*2; // always available;
+			}
+			else {
+				// if there are not enough qty AND backorder is auto or backorder is always
+				$available = $row['QtyInStock'] - $row['QtyInStockMin'];
+				$available = max(0, $available); // just in case
+			}
+			if (
+					$backordering && // backordering generally enabled
+					(
+						($row['Quantity'] > $available)
+						&&
+						($row['BackOrder'] == 2) //auto
+					)
+					||
+					$row['BackOrder'] == 1 // always
+				)
+			{ // split order into order & backorder
+				if ($row['BackOrder'] == 1) { //Always backorder
+					$available = 0;
+					$to_order = 0;
+					$back_order = $row['Quantity'];
+				}
+				else { //Auto
+					$to_order = $available;
+					$back_order = $row['Quantity'] - $available;
+				}
+
+				if (isset($a_item_data['ForcePrice'])) {
+					$price = $a_item_data['ForcePrice'];
+				}
+				else {
+					$price = $this->GetPlainProductPrice( $row['ProductId'], $to_order + $back_order, 1, $order, $row['OptionsSalt'], $row['ItemData'] );
+				}
+				$cost = $this->GetProductCost( $row['ProductId'], $to_order + $back_order, 1, $row['OptionsSalt'], $row['ItemData'] );
+				$discounted_price = $this->GetDiscountedProductPrice( $row['ProductId'], $price, $discount_id, $order );
+				$couponed_price = $this->GetCouponDiscountedPrice( $coupon_id, $row['ProductId'], $price );
+				if($couponed_price < $discounted_price)
+				{
+					$discounted_price =	$couponed_price;
+					$coupon_discount += ($price - $couponed_price) * ($to_order + $back_order);
+					$discount_type = 'coupon';
+					$discount_id = $coupon_id;
+				}
+				else
+				{
+					$discount_type = 'discount';
+				}
+				$pending_operations[] = Array( $row['ProductId'], 0, $to_order, $price, $discounted_price, $discount_type, $discount_id, 0, $row['OptionsSalt'], $row['ItemData'], $cost );
+				$pending_operations[] = Array( $row['ProductId'], 1, $back_order, $price, $discounted_price, $discount_type, $discount_id, 0, $row['OptionsSalt'], $row['ItemData'], $cost);
+			}
+			else { // store as normal order (and remove backorder)
+				// we could get here with backorder=never then we should order only what's available
+				$to_order = min($row['Quantity'], $available);
+				if (isset($a_item_data['ForcePrice'])) {
+					$price = $a_item_data['ForcePrice'];
+				}
+				else {
+					$price = $this->GetPlainProductPrice( $row['ProductId'], $to_order + $back_order, 1, $order, $row['OptionsSalt'], $row['ItemData'] );
+				}
+				$cost = $this->GetProductCost( $row['ProductId'], $to_order + $back_order, 1, $row['OptionsSalt'], $row['ItemData'] );
+				$discounted_price = $this->GetDiscountedProductPrice( $row['ProductId'], $price, $discount_id, $order );
+				$couponed_price = $this->GetCouponDiscountedPrice( $coupon_id, $row['ProductId'], $price );
+				if($couponed_price < $discounted_price)
+				{
+					$discounted_price =	$couponed_price;
+					$coupon_discount += ($price - $couponed_price) * ($to_order + $back_order);
+					$discount_type = 'coupon';
+					$discount_id = $coupon_id;
+				}
+				else
+				{
+					$discount_type = 'discount';
+				}
+				$pending_operations[] = Array( $row['ProductId'], 0, $to_order, $price, $discounted_price, $discount_type, $discount_id, 0, $row['OptionsSalt'], $row['ItemData'], $cost );
+				$pending_operations[] = Array( $row['ProductId'], 1, 0, $price, $discounted_price, $discount_type, $discount_id, 0, $row['OptionsSalt'], $row['ItemData'], $cost );	// this removes backorders
+				if ($to_order < $row['Quantity']) { // has changed
+					if ($to_order > 0) {
+						$event->SetRedirectParam('checkout_error', 2);
+					}
+					else {
+						$event->SetRedirectParam('checkout_error', 3);
+					}
+					$result = true;
+				}
+			}
+			$sub_total_flat += ($to_order + $back_order) * $price;
+			$sub_total += ($to_order + $back_order) * $discounted_price;
+			$cost_total += ($to_order + $back_order) * $cost;
+		}
+
+		// process subscriptions, services and downloadable: begin
+		$poc_table = $this->Application->getUnitOption('poc', 'TableName');
+		$query = '	SELECT oi.OrderItemId, oi.ProductId, oi.Quantity, oi.OptionsSalt, oi.ItemData,
+					IF(p.InventoryStatus = 2, poc.QtyInStock, p.QtyInStock) AS QtyInStock,
+					p.QtyInStockMin, p.BackOrder, p.InventoryStatus, p.Type
+					FROM '.$table_prefix.'OrderItems AS oi
+					LEFT JOIN '.TABLE_PREFIX.'Products AS p ON oi.ProductId = p.ProductId
+					LEFT JOIN '.$poc_table.' poc ON (poc.CombinationCRC = oi.OptionsSalt) AND (oi.ProductId = poc.ProductId)
+							WHERE (oi.OrderId = '.$ord_id.') AND (p.Type IN (2,3,4,5,6))';
+		$items = $this->Conn->Query($query);
+
+		foreach ($items as $row)
+		{
+			$a_item_data = isset($row['ItemData']) ? unserialize($row['ItemData']) : Array();
+			if (isset($a_item_data['ForcePrice'])) {
+				$price = $a_item_data['ForcePrice'];
+			}
+			else {
+				$price = $this->GetPlainProductPrice( $row['ProductId'], $row['Quantity'], $row['Type'], $order, $row['OptionsSalt'], $row['ItemData'] );
+			}
+			$cost = $this->GetProductCost( $row['ProductId'], $row['Quantity'], $row['Type'], $row['OptionsSalt'], $row['ItemData'] );
+			$discounted_price = $this->GetDiscountedProductPrice( $row['ProductId'], $price, $discount_id, $order );
+			$couponed_price = $this->GetCouponDiscountedPrice( $coupon_id, $row['ProductId'], $price );
+			if($couponed_price < $discounted_price)
+			{
+				$discounted_price =	$couponed_price;
+				$coupon_discount += ($price - $couponed_price);
+				$discount_type = 'coupon';
+				$discount_id = $coupon_id;
+			}
+			else
+			{
+				$discount_type = 'discount';
+			}
+			$pending_operations[] = Array( $row['ProductId'], 0, $row['Quantity'], $price, $discounted_price, $discount_type, $discount_id, $row['OrderItemId'], 0, $row['ItemData'], $cost );
+
+			$sub_total_flat += $price * $row['Quantity'];
+			$sub_total += $discounted_price * $row['Quantity'];
+			$cost_total += $cost * $row['Quantity'];
+		}
+		// process subscriptions, services and downloadable: end
+
+		$flat_discount = $this->GetWholeOrderPlainDiscount($global_discount_id, $order);
+		$flat_discount = ($flat_discount < $sub_total_flat) ? $flat_discount : $sub_total_flat;
+		$coupon_flat_discount = $this->GetWholeOrderCouponDiscount($coupon_id);
+		$coupon_flat_discount = ($coupon_flat_discount < $sub_total_flat) ? $coupon_flat_discount : $sub_total_flat;
+		if($coupon_flat_discount && $coupon_flat_discount > $flat_discount)
+		{
+			$flat_discount = $coupon_flat_discount;
+			$global_discount_type = 'coupon';
+			$global_discount_id = $coupon_id;
+		}
+		else
+		{
+			$global_discount_type = 'discount';
+		}
+		if($sub_total_flat - $sub_total < $flat_discount)
+		{
+			$coupon_discount = ($flat_discount == $coupon_flat_discount) ? $flat_discount : 0;
+			$sub_total = $sub_total_flat - $flat_discount;
+			foreach ($pending_operations as $operation_row)
+			{
+				list($product_id, $backorder, $qty, $price, $discounted_price, $dummy, $dummy, $order_item_id, $options_salt, $item_data, $cost) = $operation_row;
+				$new_price = ($price / $sub_total_flat) * $sub_total;
+				$result = $this->UpdateOrderItem($event, $product_id, $backorder, $qty, $price, $new_price, $global_discount_type, $global_discount_id, $order_item_id, $options_salt, $item_data, $cost) || $result;
+			}
+		}
+		else
+		{
+			foreach ($pending_operations as $operation_row)
+			{
+				list($product_id, $backorder, $qty, $price, $discounted_price, $discount_type, $discount_id, $order_item_id, $options_salt, $item_data, $cost) = $operation_row;
+				$result = $this->UpdateOrderItem($event, $product_id, $backorder, $qty, $price, $discounted_price, $discount_type, $discount_id, $order_item_id, $options_salt, $item_data, $cost) || $result;
+			}
+		}
+
+		$order->SetDBField('SubTotal', $sub_total);
+		$order->SetDBField('CostTotal', $cost_total);
+	//	$this->CalculateDiscount($event);
+		$order->SetDBField('DiscountTotal', $sub_total_flat - $sub_total);
+
+		if($coupon_id && $coupon_discount == 0)
+		{
+			$this->RemoveCoupon($order);
+			$event->SetRedirectParam('checkout_error', 8);
+		}
+		$order->SetDBField('CouponDiscount', $coupon_discount);
+
+		if ($result) $this->UpdateShippingOption($event);
+		$this->UpdateShippingTotal($event);
+
+		$this->RecalculateProcessingFee($event);
+		$this->RecalculateTax($event);
+		$this->RecalculateGift($event);
+
+		if ($event->Name != 'OnAfterItemUpdate') $order->Update();
+		$event->setEventParam('RecalculateChangedCart', $result);
+		if (is_object($event->MasterEvent)) {
+			$event->MasterEvent->setEventParam('RecalculateChangedCart', $result);
+		}
+
+		if ($result && !getArrayValue($event->redirect_params, 'checkout_error')) {
+			$event->SetRedirectParam('checkout_error', 1);
+		}
+
+		if ($result && is_object($event->MasterEvent) && $event->MasterEvent->Name == 'OnUserLogin')
+		{
+			if( ($shop_cart_template = $this->Application->GetVar('shop_cart_template'))
+				&& is_object($event->MasterEvent->MasterEvent) )
+			{
+				$event->MasterEvent->MasterEvent->SetRedirectParam('checkout_error', 9);
+				$event->MasterEvent->MasterEvent->redirect = $shop_cart_template;
+			}
+		}
+
+		return $result;
+	}
+
+/*	function GetShippingCost($user_country_id, $user_state_id, $user_zip, $weight, $items, $amount, $shipping_type)
+	{
+		$this->Application->recallObject('ShippingQuoteEngine');
+		$shipping_h =& $this->Application->recallObject('CustomShippingQuoteEngine');
+		$query = $shipping_h->QueryShippingCost($user_country_id, $user_state_id, $user_zip, $weight, $items, $amount, $shipping_type);
+		$cost = $this->Conn->GetRow($query);
+		return $cost['TotalCost'];
+	}*/
+
+	function GetMinQty($p_id)
+	{
+		$query = 'SELECT
+							MIN(pp.MinQty)
+							FROM '.TABLE_PREFIX.'ProductsPricing AS pp
+							WHERE pp.ProductId = '.$p_id;
+		$min_qty = $this->Conn->GetOne($query);
+		if (!$min_qty) return 1;
+		return $min_qty;
+	}
+
+	/**
+	 * Return product cost for given qty, taking no discounts into account
+	 *
+	 * @param int $p_id ProductId
+	 * @param int $qty Quantity
+	 * @return float
+	 */
+	function GetProductCost($p_id, $qty, $product_type, $options_salt=null, $item_data=null)
+	{
+		$user_groups = $this->Application->RecallVar('UserGroups');
+		if($product_type == 1)
+		{
+			// $where_clause = 'pp.ProductId = '.$p_id.' AND pp.MinQty <= '.$qty;
+			// $orderby_clause = 'ORDER BY ('.$qty.' - pp.MinQty) ASC';
+			$where_clause = 'GroupId IN ('.$user_groups.') AND pp.ProductId = '.$p_id.' AND pp.MinQty <= '.$qty.' AND ('.$qty.' < pp.MaxQty OR pp.MaxQty=-1)';
+			$orderby_clause = 'ORDER BY pp.Price ASC';
+		}
+		else
+		{
+			$price_id = $this->GetPricingId($p_id, $item_data);
+			$where_clause = 'pp.ProductId = '.$p_id.' AND pp.PriceId = '.$price_id;
+			$orderby_clause = '';
+		}
+
+		$sql = 'SELECT Cost
+				FROM '.TABLE_PREFIX.'ProductsPricing AS pp
+				LEFT JOIN '.TABLE_PREFIX.'Products AS p
+				ON p.ProductId = pp.ProductId
+				WHERE '.$where_clause.'
+				'.$orderby_clause;
+
+		// GROUP BY pp.ProductId - removed, this it qty pricing is caclucated incorrectly !!!
+
+		$cost = $this->Conn->GetOne($sql);
+		if (!$cost) $price = 0;
+
+		return $cost;
+	}
+
+	/**
+	 * Return product price for given qty, taking no discounts into account
+	 *
+	 * @param int $p_id ProductId
+	 * @param int $qty Quantity
+	 * @return float
+	 */
+	function GetPlainProductPrice($p_id, $qty, $product_type, &$order_object, $options_salt=null, $item_data=null)
+	{
+		$user_id = $order_object->GetDBField('PortalUserId');
+		$user_groups = $this->Application->getUserGroups($user_id);
+
+		if($product_type == 1)
+		{
+			// $where_clause = 'pp.ProductId = '.$p_id.' AND pp.MinQty <= '.$qty;
+			// $orderby_clause = 'ORDER BY ('.$qty.' - pp.MinQty) ASC';
+			$where_clause = 'GroupId IN ('.$user_groups.') AND pp.ProductId = '.$p_id.' AND pp.MinQty <= '.$qty.' AND ('.$qty.' < pp.MaxQty OR pp.MaxQty=-1)';
+
+			// if we have to stick ti primary group this order by clause force its pricing to go first,
+			// but if there is no pricing for primary group it will take next optimal
+			if ($this->Application->ConfigValue('Comm_PriceBracketCalculation') == 1){
+				if ($user_id <= 0) {
+					$primary_group = $this->Application->ConfigValue('User_LoggedInGroup'); // actually this is Everyone
+				}
+				else {
+					$primary_group = $this->Conn->GetOne('SELECT GroupId FROM '.TABLE_PREFIX.'UserGroup WHERE PortalUserId='.$user_id.' AND PrimaryGroup=1');
+				}
+				$orderby_clause = 'ORDER BY (IF(GroupId='.$primary_group.',1,2)) ASC, pp.Price ASC';
+			}
+			else {
+				$orderby_clause = 'ORDER BY pp.Price ASC';
+			}
+
+		}
+		else
+		{
+			$price_id = $this->GetPricingId($p_id, $item_data);
+			$where_clause = 'pp.ProductId = '.$p_id.' AND pp.PriceId = '.$price_id;
+			$orderby_clause = '';
+		}
+
+		$sql = 'SELECT Price
+				FROM '.TABLE_PREFIX.'ProductsPricing AS pp
+				LEFT JOIN '.TABLE_PREFIX.'Products AS p
+				ON p.ProductId = pp.ProductId
+				WHERE '.$where_clause.'
+				'.$orderby_clause;
+
+		// GROUP BY pp.ProductId - removed, this it qty pricing is caclucated incorrectly !!!
+
+		$price = $this->Conn->GetOne($sql);
+		if (!$price) $price = 0;
+
+		if (isset($item_data) && !is_array($item_data)) {
+			$item_data = unserialize($item_data);
+		}
+
+		if (isset($item_data['Options'])) {
+			$addtion = 0;
+			$opt_helper =& $this->Application->recallObject('kProductOptionsHelper');
+			foreach ($item_data['Options'] as $opt => $val) {
+				$data = $this->Conn->GetRow('SELECT * FROM '.TABLE_PREFIX.'ProductOptions WHERE ProductOptionId = '.$opt);
+
+				$parsed = $opt_helper->ExplodeOptionValues($data);
+				if (!$parsed) continue;
+				$conv_prices = $parsed['Prices'];
+				$conv_price_types = $parsed['PriceTypes'];
+
+				if (is_array($val)) {
+					foreach ($val as $a_val) {
+						if (isset($conv_prices[unhtmlentities($a_val)]) && $conv_prices[unhtmlentities($a_val)]) {
+							if ($conv_price_types[unhtmlentities($a_val)] == '$') {
+								$addtion += $conv_prices[unhtmlentities($a_val)];
+							}
+							elseif ($conv_price_types[unhtmlentities($a_val)] == '%') {
+								$addtion += $price * $conv_prices[unhtmlentities($a_val)] / 100;
+							}
+						}
+					}
+				}
+				else {
+					if (isset($conv_prices[unhtmlentities($val)]) && $conv_prices[unhtmlentities($val)]) {
+						if ($conv_price_types[unhtmlentities($val)] == '$') {
+							$addtion += $conv_prices[unhtmlentities($val)];
+						}
+						elseif ($conv_price_types[unhtmlentities($val)] == '%') {
+							$addtion += $price * $conv_prices[unhtmlentities($val)] / 100;
+						}
+					}
+				}
+			}
+			$price += $addtion;
+		}
+
+		$comb_salt = $this->OptionsSalt( getArrayValue($item_data, 'Options'), 1);
+		if ($comb_salt) {
+			$query = 'SELECT * FROM '.TABLE_PREFIX.'ProductOptionCombinations WHERE CombinationCRC = '.$comb_salt;
+			$comb = $this->Conn->GetRow($query);
+			if ($comb) {
+				switch ($comb['PriceType']) {
+					case 1: // = override
+						$price = $comb['Price'];
+						break;
+					case 2: // flat
+						$price = $price + $comb['Price'];
+						break;
+					case 3: // percent
+						$price = $price * (1 + $comb['Price'] / 100);
+						break;
+				}
+			}
+		}
+
+		return max($price, 0);
+	}
+
+	/**
+	 * Return product price for given qty, taking possible discounts into account
+	 *
+	 * @param int $p_id ProductId
+	 * @param int $qty Quantity
+	 * @return float
+	 */
+	function GetDiscountedProductPrice($p_id, $price, &$discount_id, &$order_object)
+	{
+		$discount_id = 0;
+		$user_id = $order_object->GetDBField('PortalUserId');
+		$user_groups = $this->Application->getUserGroups($user_id);
+		$sql = '
+				SELECT
+					IF(pd.Type = 1,
+				 		'.$price.' - pd.Amount,
+				 		IF(pd.Type = 2,
+				 			('.$price.' * (1-pd.Amount/100)),
+				 			'.$price.'
+						)
+					) AS DiscountedPrice,
+					pd.DiscountId
+				FROM '.TABLE_PREFIX.'Products AS p
+				LEFT JOIN '.TABLE_PREFIX.'ProductsDiscountItems AS pdi ON
+					pdi.ItemResourceId = p.ResourceId OR pdi.ItemType = 0
+				LEFT JOIN '.TABLE_PREFIX.'ProductsDiscounts AS pd ON
+					pd.DiscountId = pdi.DiscountId
+					AND
+					(pdi.ItemType = 1 OR (pdi.ItemType = 0 AND pd.Type = 2))
+					AND
+					pd.Status = 1
+					AND
+					(	pd.GroupId IN ('.$user_groups.') AND
+						( (pd.Start IS NULL OR pd.Start < UNIX_TIMESTAMP())
+								AND
+							(pd.End IS NULL OR pd.End > UNIX_TIMESTAMP())
+						)
+					)
+				WHERE p.ProductId = '.$p_id.' AND pd.DiscountId IS NOT NULL
+			';
+
+		$pricing = $this->Conn->GetCol($sql, 'DiscountId');
+		if (!$pricing) return $price;
+
+		$discounted_price = min($pricing);
+		$pricing = array_flip($pricing);
+		$discount_id = $pricing[$discounted_price];
+
+		$discounted_price = min($discounted_price, $price);
+		return max($discounted_price, 0);
+	}
+
+	function GetCouponDiscountedPrice($coupon_id, $p_id, $price)
+	{
+		if(!$coupon_id) return $price;
+
+		$sql = '
+				SELECT
+					'.$price.' AS Price,
+					MIN(IF(pc.Type = 1,
+				 		'.$price.' - pc.Amount,
+				 		IF(pc.Type = 2,
+				 			('.$price.' * (1-pc.Amount/100)),
+				 			'.$price.'
+						)
+					)) AS DiscountedPrice
+				FROM '.TABLE_PREFIX.'Products AS p
+				LEFT JOIN '.TABLE_PREFIX.'ProductsCouponItems AS pci ON
+					pci.ItemResourceId = p.ResourceId OR pci.ItemType = 0
+				LEFT JOIN '.TABLE_PREFIX.'ProductsCoupons AS pc ON
+					pc.CouponId = pci.CouponId
+					AND
+					(pci.ItemType = 1 OR (pci.ItemType = 0 AND pc.Type = 2))
+				WHERE p.ProductId = '.$p_id.' AND pci.CouponId = '.$coupon_id.'
+				GROUP BY p.ProductId
+			';
+
+		$pricing = $this->Conn->GetRow($sql);
+		if ($pricing === false) return $price;
+		$price = min($pricing['Price'], $pricing['DiscountedPrice']);
+		return max($price, 0);
+	}
+
+	function GetWholeOrderPlainDiscount(&$discount_id, &$order_object)
+	{
+		$user_id = $order_object->GetDBField('PortalUserId');
+		$user_groups = $this->Application->getUserGroups($user_id);
+		$sql = '
+				SELECT pd.Amount AS Discount, pd.DiscountId
+				FROM '.TABLE_PREFIX.'ProductsDiscountItems AS pdi
+				LEFT JOIN '.TABLE_PREFIX.'ProductsDiscounts AS pd
+				ON
+					pd.DiscountId = pdi.DiscountId
+					AND
+					pdi.ItemType = 0 AND pd.Type = 1
+					AND
+					pd.Status = 1
+					AND
+					(	pd.GroupId IN ('.$user_groups.') AND
+						( (pd.Start IS NULL OR pd.Start < '.$order_object->GetDBField('OrderDate').')
+								AND
+							(pd.End IS NULL OR pd.End > '.$order_object->GetDBField('OrderDate').')
+						)
+					)
+				WHERE pd.DiscountId IS NOT NULL
+			';
+		$pricing = $this->Conn->GetCol($sql, 'DiscountId');
+		if (!$pricing) return 0;
+
+		$discounted_price = max($pricing);
+		$pricing = array_flip($pricing);
+		$discount_id = $pricing[$discounted_price];
+
+		return max($discounted_price, 0);
+	}
+
+	function GetWholeOrderCouponDiscount($coupon_id)
+	{
+		if (!$coupon_id) return 0;
+
+		$sql = 'SELECT Amount
+				FROM '.TABLE_PREFIX.'ProductsCouponItems AS pci
+				LEFT JOIN '.TABLE_PREFIX.'ProductsCoupons AS pc
+				ON pc.CouponId = pci.CouponId
+				WHERE pci.CouponId = '.$coupon_id.' AND pci.ItemType = 0 AND pc.Type = 1';
+		return $this->Conn->GetOne($sql);
+	}
+
+	/**
+	 * Return product pricing id for given product, if not passed - return primary pricing ID
+	 *
+	 * @param int $product_id ProductId
+	 * @return float
+	 */
+	function GetPricingId($product_id, $item_data)	{
+
+		if (!is_array($item_data)) {
+			$item_data = unserialize($item_data);
+		}
+		$price_id = getArrayValue($item_data, 'PricingId');
+		if (!$price_id) {
+		$price_id = $this->Application->GetVar('pr_id');
+		}
+		if (!$price_id){
+			$price_id = $this->Conn->GetOne('SELECT PriceId FROM '.TABLE_PREFIX.'ProductsPricing WHERE ProductId='.$product_id.' AND IsPrimary=1');
+		}
+		return $price_id;
+	}
+
+	function UpdateShippingOption(&$event)
+	{
+		$object =& $event->getObject();
+		$shipping_option = $object->GetDBField('ShippingOption');
+
+		if($shipping_option == '') return;
+
+		$table_prefix = $this->TablePrefix($event);
+
+		if ($shipping_option == 1 || $shipping_option == 0) { // backorder separately
+			$query = 'UPDATE '.$table_prefix.'OrderItems SET BackOrderFlag = 1 WHERE OrderId = '.$object->GetId().' AND BackOrderFlag > 1';
+			$this->Conn->Query($query);
+		}
+		if ($shipping_option == 2) {
+			$query = 'SELECT * FROM '.$table_prefix.'OrderItems WHERE OrderId = '.$object->GetId().' AND BackOrderFlag >= 1 ORDER By ProductName asc';
+			$items = $this->Conn->Query($query);
+			$backorder_flag = 2;
+			foreach ($items as $an_item) {
+				$query = 'UPDATE '.$table_prefix.'OrderItems SET BackOrderFlag = '.$backorder_flag.' WHERE OrderItemId = '.$an_item['OrderItemId'];
+				$this->Conn->Query($query);
+				$backorder_flag++;
+			}
+		}
+	}
+
+	function UpdateShippingTypes(&$event)
+	{
+		$object =& $this->Application->recallObject($event->getPrefixSpecial());
+		$ord_id = $object->GetId();
+
+		$order_info = $this->Application->GetVar('ord');
+		$shipping_ids = getArrayValue($order_info, $ord_id, 'ShippingTypeId');
+
+		if (!$shipping_ids)
+		{
+			return;
+		}
+
+		$last_shippings = unserialize($this->Application->RecallVar('LastShippings'));
+		$shipping_types = Array();
+
+		$ret = true;
+		foreach($shipping_ids as $package => $id)
+		{
+			// try to validate
+			if ( $object->GetDBField('ShippingType') == 0 && ereg('USPS', $id) && in_array($this->Application->GetVar('t'), Array('in-commerce/checkout/shipping','in-commerce/orders/orders_edit_shipping'))) {
+				$current_usps_shipping_types = unserialize($this->Application->RecallVar('current_usps_shipping_types'));
+				$object->SetDBField('ShippingInfo', serialize(Array($package => $current_usps_shipping_types[$id])));
+				$usps_data = $this->MakeUSPSOrder($object, true);
+				if ( !isset($usps_data['error_number']) ) {
+					// update only international shipping
+					if ( $object->GetDBField('ShippingCountry') != 'USA') {
+						$last_shippings[$package][$id]['TotalCost'] = $usps_data['Postage'];
+					}
+				}
+				else {
+					$this->Application->SetVar('usps_errors', $usps_data['error_description']);
+					$ret = false;
+				}
+				$object->SetDBField('ShippingInfo', '');
+			}
+			$shipping_types[$package] = $last_shippings[$package][$id];
+		}
+		$object->SetDBField('ShippingInfo', serialize($shipping_types));
+
+		return $ret;
+	}
+
+
+	/*function shipOrder(&$order_items)
+	{
+		$product_object =& $this->Application->recallObject('p', null, Array('skip_autoload' => true));
+		$order_item =& $this->Application->recallObject('orditems.-item');
+
+		while( !$order_items->EOL() )
+		{
+			$rec = $order_items->getCurrentRecord();
+
+			$order_item->SetDBFieldsFromHash($rec);
+			$order_item->SetId($rec['OrderItemId']);
+			$order_item->SetDBField('QuantityReserved', 0);
+			$order_item->Update();
+
+			$order_items->GoNext();
+		}
+		return true;
+	}*/
+
+	function RecalculateTax(&$event)
+	{
+		$object =& $event->getObject();
+		if ($object->GetDBField('Status') > ORDER_STATUS_PENDING) return;
+		$object->RecalculateTax();
+	}
+
+	function RecalculateProcessingFee(&$event)
+	{
+		$object =& $event->getObject();
+
+		// Do not reset processing fee while orders are being split (see SplitOrder)
+		if (preg_match("/^-sub/", $object->Special)) return;
+		if ($object->GetDBField('Status') > ORDER_STATUS_PENDING) return; //no changes for orders other than incomple or pending
+
+		$pt = $object->GetDBField('PaymentType');
+		$processing_fee = $this->Conn->GetOne('SELECT ProcessingFee FROM '.$this->Application->getUnitOption('pt', 'TableName').' WHERE PaymentTypeId = '.$pt);
+		$object->SetDBField( 'ProcessingFee', $processing_fee );
+		$this->UpdateTotals($event);
+	}
+
+	function UpdateTotals(&$event)
+	{
+		$object =& $event->getObject();
+		$object->UpdateTotals();
+	}
+
+	function CalculateDiscount(&$event)
+	{
+		$object =& $event->getObject();
+
+		$coupon =& $this->Application->recallObject('coup', null, Array('skip_autoload' => true));
+		if(!$coupon->Load( $object->GetDBField('CouponId'), 'CouponId' ))
+		{
+			return false;
+		}
+
+		$sql = 'SELECT Price * Quantity AS Amount, ProductId FROM '.$this->Application->getUnitOption('orditems', 'TableName').'
+				WHERE OrderId = '.$object->GetDBField('OrderId');
+		$orditems = $this->Conn->GetCol($sql, 'ProductId');
+
+		$sql = 'SELECT coupi.ItemType, p.ProductId FROM '.$this->Application->getUnitOption('coupi', 'TableName').' coupi
+				LEFT JOIN '.$this->Application->getUnitOption('p', 'TableName').' p
+				ON coupi.ItemResourceId = p.ResourceId
+				WHERE CouponId = '.$object->GetDBField('CouponId');
+		$discounts = $this->Conn->GetCol($sql, 'ProductId');
+
+		$discount_amount = 0;
+
+		foreach($orditems as $product_id => $amount)
+		{
+			if(isset($discounts[$product_id]) || array_search('0', $discounts, true) !== false)
+			{
+				switch($coupon->GetDBField('Type'))
+				{
+					case 1:
+						$discount_amount += $coupon->GetDBField('Amount') < $amount ? $coupon->GetDBField('Amount') : $amount;
+					break;
+					case 2:
+						$discount_amount += $amount * $coupon->GetDBField('Amount') / 100;
+					break;
+					default:
+				}
+				break;
+			}
+		}
+
+		$object->SetDBField('CouponDiscount', $discount_amount);
+		return $discount_amount;
+	}
+
+	/**
+	 * Jumps to selected order in order's list from search tab
+	 *
+	 * @param kEvent $event
+	 */
+	function OnGoToOrder(&$event)
+	{
+		$id = array_shift( $this->StoreSelectedIDs($event) );
+
+		$idfield = $this->Application->getUnitOption($event->Prefix,'IDField');
+		$table = $this->Application->getUnitOption($event->Prefix,'TableName');
+
+		$sql = 'SELECT Status FROM %s WHERE %s = %s';
+
+		$order_status = $this->Conn->GetOne( sprintf($sql, $table, $idfield, $id) );
+
+		$prefix_special = $event->Prefix.'.'.$this->getSpecialByType($order_status);
+
+		$orders_list =& $this->Application->recallObject($prefix_special, $event->Prefix.'_List', Array('per_page'=>-1) );
+		$orders_list->Query();
+
+		foreach($orders_list->Records as $row_num => $record)
+		{
+			if( $record[$idfield] == $id ) break;
+		}
+
+		$per_page = $this->getPerPage( new kEvent($prefix_special.':OnDummy') );
+		$page = ceil( ($row_num+1) / $per_page );
+
+		$this->Application->StoreVar($prefix_special.'_Page', $page);
+		$event->redirect = 'in-commerce/orders/orders_'.$this->getSpecialByType($order_status).'_list';
+	}
+
+	/**
+	 * Reset's any selected order state to pending
+	 *
+	 * @param unknown_type $event
+	 */
+	function OnResetToPending(&$event)
+	{
+		$object =& $event->getObject( Array('skip_autoload' => true) );
+
+		$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
+		if($items_info)
+		{
+			foreach($items_info as $id => $field_values)
+			{
+				$object->Load($id);
+				$object->SetDBField('Status', ORDER_STATUS_PENDING);
+				if( $object->Update() )
+				{
+					$event->status=erSUCCESS;
+				}
+				else
+				{
+					$event->status=erFAIL;
+					$event->redirect=false;
+					break;
+				}
+			}
+		}
+	}
+
+	/**
+	 * Creates list from items selected in grid
+	 *
+	 * @param kEvent $event
+	 */
+	function OnLoadSelected(&$event)
+	{
+		$event->setPseudoClass('_List');
+		$object =& $event->getObject( Array('selected_only' => true) );
+		$event->redirect = false;
+	}
+
+	/**
+	 * Return orders list, that will expire in time specified
+	 *
+	 * @param int $pre_expiration timestamp
+	 * @return Array
+	 */
+	function getRecurringOrders($pre_expiration)
+	{
+		$ord_table = $this->Application->getUnitOption('ord', 'TableName');
+		$ord_idfield = $this->Application->getUnitOption('ord', 'IDField');
+
+		$processing_allowed = Array(ORDER_STATUS_PROCESSED, ORDER_STATUS_ARCHIVED);
+		$sql = 'SELECT '.$ord_idfield.', PortalUserId, GroupId, NextCharge
+				FROM '.$ord_table.'
+				WHERE (IsRecurringBilling = 1) AND (NextCharge < '.$pre_expiration.') AND Status IN ('.implode(',', $processing_allowed).')';
+		return $this->Conn->Query($sql, $ord_idfield);
+	}
+
+	/**
+	 * Regular event: checks what orders should expire and renew automatically (if such flag set)
+	 *
+	 * @param kEvent $event
+	 */
+	function OnCheckRecurringOrders(&$event)
+	{
+		$skip_clause = Array();
+		$ord_table = $this->Application->getUnitOption($event->Prefix, 'TableName');
+		$ord_idfield = $this->Application->getUnitOption($event->Prefix, 'IDField');
+
+		$pre_expiration = adodb_mktime() + $this->Application->ConfigValue('Comm_RecurringChargeInverval') * 3600 * 24;
+		$to_charge = $this->getRecurringOrders($pre_expiration);
+		if ($to_charge) {
+			$order_ids = Array();
+			foreach ($to_charge as $order_id => $record) {
+				// skip virtual users (e.g. root, guest, etc.) & invalid subscriptions (with no group specified, no next charge, but Recurring flag set)
+				if (!$record['PortalUserId'] || !$record['GroupId'] || !$record['NextCharge']) continue;
+
+				$order_ids[] = $order_id;
+				// prevent duplicate user+group pairs
+				$skip_clause[ 'PortalUserId = '.$record['PortalUserId'].' AND GroupId = '.$record['GroupId'] ] = $order_id;
+			}
+
+			// process only valid orders
+			$temp_handler =& $this->Application->recallObject($event->Prefix.'_TempHandler', 'kTempTablesHandler');
+			$cloned_order_ids = $temp_handler->CloneItems($event->Prefix, 'recurring', $order_ids);
+			$order =&  $this->Application->recallObject($event->Prefix.'.recurring', null, Array('skip_autoload' => true));
+			foreach ($cloned_order_ids as $order_id) {
+				$order->Load($order_id);
+				$this->Application->HandleEvent($complete_event, $event->Prefix.'.recurring:OnCompleteOrder' );
+
+				if ($complete_event->status == erSUCCESS) {
+					//send recurring ok email
+					$email_event_user 	=& $this->Application->EmailEventUser('ORDER.RECURRING.PROCESSED', $order->GetDBField('PortalUserId'), $this->OrderEmailParams($order));
+					$email_event_admin 	=& $this->Application->EmailEventAdmin('ORDER.RECURRING.PROCESSED');
+				}
+				else {
+					//send Recurring failed event
+					$order->SetDBField('Status', ORDER_STATUS_DENIED);
+					$order->Update();
+					$email_event_user 	=& $this->Application->EmailEventUser('ORDER.RECURRING.DENIED', $order->GetDBField('PortalUserId'), $this->OrderEmailParams($order));
+					$email_event_admin 	=& $this->Application->EmailEventAdmin('ORDER.RECURRING.DENIED');
+				}
+			}
+
+			// remove recurring flag from all orders found, not to select them next time script runs
+			$sql = 'UPDATE '.$ord_table.'
+					SET IsRecurringBilling = 0
+					WHERE '.$ord_idfield.' IN ('.implode(',', array_keys($to_charge)).')';
+			$this->Conn->Query($sql);
+		}
+
+		$pre_expiration = adodb_mktime() + $this->Application->ConfigValue('User_MembershipExpirationReminder') * 3600 * 24;
+		$to_charge = $this->getRecurringOrders($pre_expiration);
+
+		foreach ($to_charge as $order_id => $record) {
+			// skip virtual users (e.g. root, guest, etc.) & invalid subscriptions (with no group specified, no next charge, but Recurring flag set)
+			if (!$record['PortalUserId'] || !$record['GroupId'] || !$record['NextCharge']) continue;
+
+			// prevent duplicate user+group pairs
+			$skip_clause[ 'PortalUserId = '.$record['PortalUserId'].' AND GroupId = '.$record['GroupId'] ] = $order_id;
+		}
+		$skip_clause = array_flip($skip_clause);
+
+		$event->MasterEvent->setEventParam('skip_clause', $skip_clause);
+	}
+
+
+	function OnGeneratePDF(&$event)
+	{
+		$this->OnLoadSelected($event);
+
+		$this->Application->InitParser();
+		$o = $this->Application->ParseBlock(array('name'=>'in-commerce/orders/orders_pdf'));
+		$htmlFile = EXPORT_PATH . '/tmp.html';
+		$fh = fopen($htmlFile, 'w');
+		fwrite($fh, $o);
+		fclose($fh);
+//		return;
+
+
+//		require_once (FULL_PATH.'html2pdf/PDFEncryptor.php');
+
+		// Full path to the file to be converted
+//		$htmlFile = dirname(__FILE__) . '/test.html';
+
+		// The default domain for images that use a relative path
+		// (you'll need to change the paths in the test.html page
+		// to an image on your server)
+		$defaultDomain = DOMAIN;
+		// Full path to the PDF we are creating
+		$pdfFile = EXPORT_PATH . '/tmp.pdf';
+		// Remove old one, just to make sure we are making it afresh
+		@unlink($pdfFile);
+
+
+		$pdf_helper =& $this->Application->recallObject('kPDFHelper');
+		$pdf_helper->FileToFile($htmlFile, $pdfFile);
+		return ;
+
+		// DOM PDF VERSION
+		/*require_once(FULL_PATH.'/dompdf/dompdf_config.inc.php');
+		$dompdf = new DOMPDF();
+		$dompdf->load_html_file($htmlFile);
+		if ( isset($base_path) ) {
+		  $dompdf->set_base_path($base_path);
+		}
+		$dompdf->set_paper($paper, $orientation);
+		$dompdf->render();
+		file_put_contents($pdfFile, $dompdf->output());
+		return ;*/
+
+		// Instnatiate the class with our variables
+		require_once (FULL_PATH.'/html2pdf/HTML_ToPDF.php');
+		$pdf = new HTML_ToPDF($htmlFile, $defaultDomain, $pdfFile);
+		$pdf->setHtml2Ps('/usr/bin/html2ps');
+		$pdf->setPs2Pdf('/usr/bin/ps2pdf');
+		$pdf->setGetUrl('/usr/local/bin/curl -i');
+		// Set headers/footers
+		$pdf->setHeader('color', 'black');
+		$pdf->setFooter('left', '');
+		$pdf->setFooter('right', '$D');
+
+		$pdf->setDefaultPath(BASE_PATH.'/kernel/admin_templates/');
+
+		$result = $pdf->convert();
+
+		// Check if the result was an error
+		if (PEAR::isError($result)) {
+		    $this->Application->ApplicationDie($result->getMessage());
+		}
+		else {
+			$download_url = rtrim($this->Application->BaseURL(), '/') . EXPORT_BASE_PATH . '/tmp.pdf';
+		    echo "PDF file created successfully: $result";
+		    echo '<br />Click <a href="' . $download_url . '">here</a> to view the PDF file.';
+		}
+	}
+
+	function OnAfterConfigRead(&$event)
+	{
+		parent::OnAfterConfigRead($event);
+
+		if (defined('IS_INSTALL') && IS_INSTALL) {
+			return ;
+		}
+
+		$order_number = (int)$this->Application->ConfigValue('Comm_Order_Number_Format_P');
+		$order_sub_number = (int)$this->Application->ConfigValue('Comm_Order_Number_Format_S');
+
+		$calc_fields = $this->Application->getUnitOption($event->Prefix, 'CalculatedFields');
+		foreach ($calc_fields as $special => $fields) {
+			$calc_fields[$special]['OrderNumber'] = str_replace('6', $order_number, $calc_fields[$special]['OrderNumber']);
+			$calc_fields[$special]['OrderNumber'] = str_replace('3', $order_sub_number, $calc_fields[$special]['OrderNumber']);
+		}
+		$this->Application->setUnitOption($event->Prefix, 'CalculatedFields', $calc_fields);
+
+		$fields = $this->Application->getUnitOption($event->Prefix, 'Fields');
+		$fields['Number']['format'] = str_replace('%06d', '%0'.$order_number.'d', $fields['Number']['format']);
+		$fields['SubNumber']['format'] = str_replace('%03d', '%0'.$order_sub_number.'d', $fields['SubNumber']['format']);
+
+		if (!$this->Application->IsAdmin()) {
+			$user_groups = explode(',', $this->Application->RecallVar('UserGroups'));
+			$default_group = $this->Application->ConfigValue('User_LoggedInGroup');
+			if (!in_array($default_group, $user_groups)){
+				$user_groups[]=$default_group;
+			}
+			$fields['PaymentType']['options_sql'] .= ' AND ';
+			$fields['PaymentType']['options_sql'] .= ' (PortalGroups LIKE "%%,'.implode(',%%" OR PortalGroups LIKE "%%,', $user_groups).',%%")';
+
+		}
+
+		$this->Application->setUnitOption($event->Prefix, 'Fields', $fields);
+
+
+	}
+
+	/**
+	 * Allows configuring export options
+	 *
+	 * @param kEvent $event
+	 */
+	function OnBeforeExportBegin(&$event)
+	{
+		$options = $event->getEventParam('options') ;
+
+		$items_list =& $this->Application->recallObject($event->Prefix.'.'.$this->Application->RecallVar('export_oroginal_special'), $event->Prefix.'_List');
+		$items_list->SetPerPage(-1);
+		if ($options['export_ids'] != '') {
+			$items_list->AddFilter('export_ids', $items_list->TableName.'.'.$items_list->IDField.' IN ('.implode(',',$options['export_ids']).')');
+		}
+
+		$options['ForceCountSQL'] = $items_list->getCountSQL( $items_list->GetSelectSQL(true,false) );
+		$options['ForceSelectSQL'] = $items_list->GetSelectSQL();
+
+		$event->setEventParam('options',$options);
+
+		$object =& $this->Application->recallObject($event->Prefix.'.export');
+		/* @var $object kDBItem */
+
+		$object->SetField('Number', 999999);
+		$object->SetField('SubNumber', 999);
+	}
+
+	/**
+	 * Returns specific to each item type columns only
+	 *
+	 * @param kEvent $event
+	 * @return Array
+	 */
+	function getCustomExportColumns(&$event)
+	{
+		$columns = parent::getCustomExportColumns($event);
+		$new_columns = Array(
+			'__VIRTUAL__CustomerName' => 'CustomerName',
+			'__VIRTUAL__TotalAmount' => 'TotalAmount',
+			'__VIRTUAL__AmountWithoutVAT' =>	'AmountWithoutVAT',
+			'__VIRTUAL__SubtotalWithDiscount' =>	'SubtotalWithDiscount',
+			'__VIRTUAL__SubtotalWithoutDiscount' =>	'SubtotalWithoutDiscount',
+			'__VIRTUAL__OrderNumber' => 'OrderNumber',
+			);
+		return array_merge_recursive2($columns, $new_columns);
+	}
+
+	function OnSave(&$event)
+	{
+		$res = parent::OnSave($event);
+		if ($event->status == erSUCCESS) {
+			$copied_ids = unserialize($this->Application->RecallVar($event->Prefix.'_copied_ids'.$this->Application->GetVar('wid'), serialize(array())));
+			foreach ($copied_ids as $id) {
+				$an_event = new kEvent($this->Prefix.':Dummy');
+				$this->Application->SetVar($this->Prefix.'_id', $id);
+				$this->Application->SetVar($this->Prefix.'_mode', ''); // this is to fool ReserveItems to use live table
+				$this->ReserveItems($an_event);
+			}
+		}
+		return $res;
+	}
+
+	/**
+	 * Occures before an item is copied to live table (after all foreign keys have been updated)
+	 * Id of item being copied is passed as event' 'id' param
+	 *
+	 * @param kEvent $event
+	 */
+	function OnBeforeCopyToLive(&$event)
+	{
+		$id = $event->getEventParam('id');
+		$copied_ids = unserialize($this->Application->RecallVar($event->Prefix.'_copied_ids'.$this->Application->GetVar('wid'), serialize(array())));
+		array_push($copied_ids, $id);
+
+		$this->Application->StoreVar($event->Prefix.'_copied_ids'.$this->Application->GetVar('wid'), serialize($copied_ids)	);
+	}
+
+	/**
+	 * Checks, that currently loaded item is allowed for viewing (non permission-based)
+	 *
+	 * @param kEvent $event
+	 * @return bool
+	 */
+	function checkItemStatus(&$event)
+	{
+		if ($this->Application->IsAdmin()) {
+			return true;
+		}
+
+		$object =& $event->getObject();
+		if (!$object->isLoaded()) {
+			return true;
+		}
+
+		return $object->GetDBField('PortalUserId') == $this->Application->RecallVar('user_id');
+	}
+
+	// ===== Gift Certificates Related =====
+	function OnRemoveGiftCertificate(&$event)
+	{
+		$object =& $event->getObject();
+		$this->RemoveGiftCertificate($object);
+		$event->CallSubEvent('OnRecalculateItems');
+		$event->SetRedirectParam('checkout_error', 107);
+	}
+
+	function RemoveGiftCertificate(&$object)
+	{
+		$object->RemoveGiftCertificate();
+	}
+
+	function RecalculateGift(&$event)
+	{
+		$object =& $event->getObject();
+		/* @var $object OrdersItem */
+
+		if ($object->GetDBField('Status') > ORDER_STATUS_PENDING) {
+			return ;
+		}
+		$object->RecalculateGift($event);
+	}
+
+	function GetWholeOrderGiftCertificateDiscount($gift_certificate_id)
+	{
+		if (!$gift_certificate_id) {
+			return 0;
+		}
+
+		$sql = 'SELECT Debit
+				FROM '.TABLE_PREFIX.'GiftCertificates
+				WHERE GiftCertificateId = '.$gift_certificate_id;
+		return $this->Conn->GetOne($sql);
+	}
+
+	/**
+	 * Creates new USPS order
+	 *
+	 * @param OrdersItem $object
+	 * @param bool $fake_mode
+	 * @return Array
+	 */
+	function MakeUSPSOrder(&$object, $fake_mode = false)
+	{
+		$this->Application->recallObject('ShippingQuoteEngine');
+
+		$aUSPS = $this->Application->recallObject('USPS', 'USPS');
+		/* @var $aUSPS USPS */
+
+		$ShippingInfo = unserialize($object->GetDBField('ShippingInfo'));
+		$ShippingCode = $USPSMethod = '';
+		$ShippingCountry = $aUSPS->GetUSPSCountry($object->GetDBField('ShippingCountry'));
+
+		$UserName = explode(" ", $object->GetDBField('ShippingTo'));
+
+		$item_table = TABLE_PREFIX.'OrderItems';
+		if ( $this->Application->IsAdmin() ) {
+			// this strange contraption actually uses temp table from object (when in temp mode)
+			$order_table = $object->TableName;
+			$item_table = str_replace('Orders', 'OrderItems', $order_table);
+		}
+
+		$sOrder = Array (
+			'FirstName' => $UserName[0],
+			'LastName' => $UserName[1],
+			'ShippingCompany' => $object->GetDBField('ShippingCompany'),
+			'ShippingAddress1' => $object->GetDBField('ShippingAddress1'),
+			'ShippingAddress2' => $object->GetDBField('ShippingAddress2'),
+			'ShippingCity' => $object->GetDBField('ShippingCity'),
+			'ShippingZip' => $object->GetDBField('ShippingZip'),
+			'ShippingCountry' => $ShippingCountry,
+			'ShippingPhone' => $aUSPS->PhoneClean($object->GetDBField('ShippingPhone')),
+			'ShippingFax' =>  $aUSPS->PhoneClean($object->GetDBField('ShippingFax')),
+			'ShippingNumBoxes' => '1',
+		);
+
+		$sql = 'SELECT SUM(`Quantity` * `Weight`)
+				FROM ' . $item_table . '
+				WHERE ' . $object->IDField . ' = ' . $object->GetID();
+		$weight = $this->Application->Conn->GetOne($sql);
+
+		$f_weight = Kg2Pounds($weight);
+		$sOrder['ShippingWeight'] = $f_weight[0].'.'.$f_weight[1];
+
+		foreach ($ShippingInfo as $k => $ShippingRow) {
+			$ShippingCode = $ShippingRow['Code'];
+		}
+
+		if ( $object->GetDBField('ShippingCountry') == 'USA' ) {
+			$sOrder['ShippingState'] = $object->GetDBField('ShippingState');
+			$USPSMethod = $ShippingCode;
+			unset($sOrder['ShippingZip']);
+
+			$sOrder['ShippingZip5'] = substr(trim($object->GetDBField('ShippingZip')), 0, 5);
+			$sOrder['ShippingZip4'] = '';
+			$sOrder['SubTotal'] = $object->GetDBField('SubTotal');
+		}
+		else {
+			$USPSMethod = array_search($ShippingCode, $aUSPS->intl_types);
+			$sOrder['ShippingProvince'] = '';
+
+			if ( $ShippingCountry == 'CA' ) {
+				$sOrder['ShippingProvince'] = $object->GetField('ShippingState');
+			}
+
+			// add items
+			$sql = 'SELECT `Quantity`, `Weight`, `Price`
+					FROM ' . $item_table . '
+					WHERE ' . $object->IDField . ' = ' . $object->GetID();
+			$order_items = $this->Application->Conn->Query($sql);
+
+			$i = 1;
+			$Items = Array();
+
+			foreach ($order_items as $k => $order_item) {
+				$p_weight = Array();
+				$p_weight = Kg2Pounds($order_item['Weight']);
+				$Items[$i] = Array('Qty' => $order_item['Quantity'], 'Price' => $order_item['Price'], 'NetPounds' => $p_weight[0], 'NetOunces' => $p_weight[1]);
+				$i++;
+			}
+
+			$sOrder['Items'] = $Items;
+			$sOrder['InvoiceNumber'] = $object->GetDBField('OrderNumber');
+		}
+
+		$sOrder['ShippingService'] = $USPSMethod;
+
+		// make USPS order
+		$aUSPS->order = $sOrder;
+		$usps_data = $aUSPS->PostOrder();
+
+		// if errors
+		if ( array_key_exists('error_number', $usps_data) ) {
+			return $usps_data;
+		}
+
+		if ( array_key_exists('Postage', $usps_data) ) {
+			$ShippingPrice = '';
+			$ShippingPrice = $usps_data['Postage'];
+		}
+
+		$ShippingTracking = '';
+
+		if ( isset($usps_data['TrackingNumber']) && $usps_data['TrackingNumber'] != '' ) {
+			$ShippingTracking = $usps_data['TrackingNumber'];
+		}
+
+		if ( isset($usps_data['PostnetBarCode']) && $usps_data['PostnetBarCode'] != '' && $ShippingTracking == '' ) {
+			$ShippingTracking = $usps_data['PostnetBarCode'];
+		}
+
+		if ($fake_mode == false) {
+			$object->SetDBField('ShippingTracking', $ShippingTracking);
+			$object->Update();
+		}
+		else {
+			$full_path = USPS_LABEL_FOLDER . $ShippingTracking . ".pdf";
+
+			if (file_exists($full_path)) {
+				unlink($full_path);
+			}
+		}
+
+		return $usps_data;
+	}
+
+	/**
+	 * Downloads shipping tracking bar code, that was already generated by USPS service
+	 *
+	 * @param kEvent $event
+	 */
+	function OnDownloadLabel(&$event)
+	{
+		$event->status = erSTOP;
+		ini_set('memory_limit', '300M');
+		ini_set('max_execution_time', '0');
+
+		$object =& $event->getObject();
+		$file = $object->GetDBField('ShippingTracking').'.pdf';
+		$full_path = USPS_LABEL_FOLDER.$file;
+
+		if (!file_exists($full_path) || !is_file($full_path)) {
+			return ;
+		}
+
+		$mime = function_exists('mime_content_type') ? mime_content_type($full_path) : 'application/download';
+		header('Content-type: '.$mime);
+		header('Content-Disposition: attachment; filename="'.$file.'"');
+		readfile($full_path);
+	}
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/orders/orders_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.150.2.20
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/orders/orders_item.php
===================================================================
--- branches/5.1.x/in-commerce/units/orders/orders_item.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/orders/orders_item.php	(revision 12131)
@@ -0,0 +1,530 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+
+	class OrdersItem extends kDBItem
+	{
+
+		function OrdersItem()
+		{
+			parent::kDBItem();
+			$this->ErrorMsgs['credit_card_validation_error'] = $this->Application->Phrase('lu_cc_validation_error');
+			$this->ErrorMsgs['credit_card_expired'] = $this->Application->Phrase('lu_cc_expired');
+		}
+
+		function Load($id, $id_field_name=null)
+		{
+			if( $this->Special == 'sitem' && $id == null || (!$this->IsTempTable() && $id == 0))
+			{
+				$this->setID(0);
+
+				$this->SetDBField('Number',-1);
+				$this->SetDBField('SubNumber',-1);
+				// load previously used search params from session
+				$search_params = $this->Application->RecallVar('ord.search_search_filter');
+				if($search_params)
+				{
+					$search_params = unserialize($search_params);
+					foreach($search_params as $search_field => $search_params)
+					{
+						$this->SetField($search_field, $search_params['search_value']);
+					}
+					$this->UpdateFormattersSubFields(); // used for updating separate virtual date/time fields from DB timestamp (for example)
+				}
+				return true;
+			}
+			else
+			{
+				return parent::Load($id,$id_field_name);
+			}
+		}
+
+		/**
+		 * Return error message for field
+		 *
+		 * @param string $field
+		 * @return string
+		 * @access public
+		 */
+		function GetErrorMsg($field)
+		{
+			if( $field != 'OrderNumber' ) return parent::GetErrorMsg($field);
+
+			$number['error'] = parent::GetErrorMsg('Number');
+			$number['pseudo'] = getArrayValue($this->FieldErrors['Number'], 'pseudo');
+
+			$subnumber['error'] = parent::GetErrorMsg('SubNumber');
+			$subnumber['pseudo'] = getArrayValue($this->FieldErrors['SubNumber'], 'pseudo');
+
+			// if pseudo match & not empty -> return 1st
+			// if one of pseudos not empty -> return it
+			// if we got one pseudo "bad_type" and other pseudo "required", then return "bad_type" error message
+
+
+			if( $number['pseudo'] && ($number['pseudo'] == $subnumber['pseudo']) )
+			{
+				return $number['error'];
+			}
+
+			if( $number['pseudo'] && !$subnumber['pseudo'] )
+			{
+				return $number['error'];
+			}
+
+			if( !$number['pseudo'] && $subnumber['pseudo'] )
+			{
+				return $subnumber['error'];
+			}
+
+			if( $number['pseudo'] == 'bad_type' )
+			{
+				return $number['error'];
+			}
+
+			if( $subnumber['pseudo'] == 'bad_type' )
+			{
+				return $subnumber['error'];
+			}
+
+//			$msg = '['.$number_error.'('.$number_pseudo.')] ['.$subnumber_error.'] ('.$subnumber_pseudo.')';
+//
+//			return $msg;
+		}
+
+		function SetFieldsFromHash($hash, $set_fields=null)
+		{
+			parent::SetFieldsFromHash($hash, $set_fields);
+
+			$options = $this->GetFieldOptions('PaymentCCExpDate');
+			if( $this->GetDirtyField($options['month_field']) || $this->GetDirtyField($options['year_field']) )
+			{
+				$this->SetDirtyField('PaymentCCExpDate', 0);
+				$this->SetField('PaymentCCExpDate', 0);
+			}
+		}
+
+		/**
+		 * Returns gateway data based on payment type used in order
+		 *
+		 * @return Array
+		 */
+		function getGatewayData($pt_id=null)
+		{
+			// get Gateway fields
+			if (!isset($pt_id) || !$pt_id) {
+				$pt_id = $this->GetDBField('PaymentType');
+			}
+			$pt_table = $this->Application->getUnitOption('pt','TableName');
+			$sql = 'SELECT GatewayId FROM %s WHERE PaymentTypeId = %s';
+			$gw_id = $this->Conn->GetOne( sprintf($sql, $pt_table, $pt_id) );
+
+			$sql = 'SELECT * FROM %s WHERE GatewayId = %s';
+			$ret = $this->Conn->GetRow( sprintf($sql, TABLE_PREFIX.'Gateways', $gw_id) );
+
+			// get Gateway parameters based on payment type
+			$gwf_table = $this->Application->getUnitOption('gwf','TableName');
+			$gwfv_table = $this->Application->getUnitOption('gwfv','TableName');
+			$sql = 'SELECT gwfv.Value, gwf.SystemFieldName
+					FROM %s gwf
+					LEFT JOIN %s gwfv ON gwf.GWConfigFieldId = gwfv.GWConfigFieldId
+					WHERE gwfv.PaymentTypeId = %s AND gwf.GatewayId = %s';
+			$ret['gw_params'] = $this->Conn->GetCol( sprintf($sql, $gwf_table, $gwfv_table, $pt_id, $gw_id), 'SystemFieldName' );
+			$ret['gw_params']['gateway_id'] = $gw_id;
+
+			if ($this->GetDBField('IsRecurringBilling') && $this->Application->ConfigValue('Comm_AutoProcessRecurringOrders')) {
+				if (isset($ret['gw_params']['shipping_control'])) {
+					$ret['gw_params']['shipping_control'] = SHIPPING_CONTROL_DIRECT;
+				}
+			}
+
+			return $ret;
+		}
+
+		/**
+		 * Checks if tangible items are present in order
+		 *
+		 * @return bool
+		 */
+		function HasTangibleItems()
+		{
+			$sql = 'SELECT COUNT(*)
+					FROM '.TABLE_PREFIX.'OrderItems orditems
+					LEFT JOIN '.TABLE_PREFIX.'Products p ON p.ProductId = orditems.ProductId
+					WHERE (orditems.OrderId = '.$this->GetID().') AND (p.Type = '.PRODUCT_TYPE_TANGIBLE.')';
+			return $this->Conn->GetOne($sql) ? true : false;
+		}
+
+		/**
+		 * Calculates tax value of order items based on billing & shipping country specified
+		 *
+		 * @return double
+		 */
+		function getTaxPercent()
+		{
+			$sql = 'SELECT DestId FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType = %s AND DestAbbr = %s';
+
+			$shipping_country_id = (int) $this->Conn->GetOne( sprintf($sql, 1, $this->Conn->qstr($this->GetDBField('ShippingCountry') ) ) );
+			$shipping_state_id = (int) $this->Conn->GetOne( sprintf($sql, 2,  $this->Conn->qstr($this->GetDBField('ShippingState') ) ) );
+			$shipping_zip = (string) $this->GetDBField('ShippingZip');
+
+			$billing_country_id = (int) $this->Conn->GetOne( sprintf($sql, 1, $this->Conn->qstr($this->GetDBField('BillingCountry') ) ) );
+			$billing_state_id = (int) $this->Conn->GetOne( sprintf($sql, 2, $this->Conn->qstr($this->GetDBField('BillingState') ) ) );
+			$billing_zip = (string) $this->GetDBField('BillingZip');
+
+			/*
+			$dest_ids = array_diff( array_unique( Array( $shipping_country_id, $shipping_state_id, $billing_country_id, $billing_state_id ) ), Array(0) );
+			$dest_values = array_diff( array_unique( Array( $this->Conn->qstr($shipping_zip), $this->Conn->qstr($billing_zip) ) ), Array('\'\'') );
+			*/
+
+			$tax = false;
+			$sql = 'SELECT tx.*
+				FROM '.$this->Application->getUnitOption('tax', 'TableName').' tx
+				LEFT JOIN '.$this->Application->getUnitOption('taxdst', 'TableName').' txd ON tx.TaxZoneId = txd.TaxZoneId
+				WHERE
+					(	txd.StdDestId IN ('.$shipping_country_id.','.$shipping_state_id.')
+						AND
+						( (txd.DestValue = "" OR txd.DestValue IS NULL)
+							OR
+							txd.DestValue = '.$this->Conn->qstr($shipping_zip).'
+						)
+					)
+					OR
+					(	txd.StdDestId IN ('.$billing_country_id.','.$billing_state_id.')
+						AND
+						( (txd.DestValue = "" OR txd.DestValue IS NULL)
+							OR
+							txd.DestValue = '.$this->Conn->qstr($billing_zip).'
+						)
+					)
+
+				ORDER BY tx.TaxValue DESC';
+
+			$tax = $this->Conn->GetRow($sql);
+			if ($tax == false) {
+				$tax['TaxValue'] = 0;
+				$tax['ApplyToShipping'] = 0;
+				$tax['ApplyToProcessing'] = 0;
+			}
+
+			return $tax;
+		}
+
+		function RecalculateTax()
+		{
+			$tax = $this->getTaxPercent();
+			$this->SetDBField( 'VATPercent', $tax['TaxValue'] );
+			$this->SetDBField( 'ShippingTaxable', $tax['ApplyToShipping']);
+			$this->SetDBField( 'ProcessingTaxable', $tax['ApplyToProcessing']);
+			$this->UpdateTotals();
+
+			$subtotal = $this->GetDBField('AmountWithoutVAT');
+
+			$query = 'SELECT SUM(Quantity * Price) FROM '.TABLE_PREFIX.'OrderItems AS oi
+								LEFT JOIN '.TABLE_PREFIX.'Products AS p
+								ON p.ProductId = oi.ProductId
+								WHERE p.Type = 6 AND oi.OrderId = '.$this->GetDBField('OrderId');
+			$tax_exempt = $this->Conn->GetOne($query);
+			if ($tax_exempt) $subtotal -= $tax_exempt;
+
+			$this->SetDBField( 'VAT', round($subtotal * $tax['TaxValue'] / 100, 2) );
+			$this->UpdateTotals();
+		}
+
+		function UpdateTotals()
+		{
+			$total = 0;
+			$total += $this->GetDBField('SubTotal');
+			if ($this->GetDBField('ShippingTaxable')) $total += $this->GetDBField('ShippingCost');
+			if ($this->GetDBField('ProcessingTaxable')) $total += $this->GetDBField('ProcessingFee');
+			$this->SetDBField('AmountWithoutVAT', $total);
+
+			$total += $this->GetDBField('VAT');
+
+			if (!$this->GetDBField('ShippingTaxable')) $total += $this->GetDBField('ShippingCost');
+			if (!$this->GetDBField('ProcessingTaxable')) $total += $this->GetDBField('ProcessingFee');
+			
+			$total += $this->GetDBField('InsuranceFee');
+			
+			$this->SetDBField('TotalAmount', $total);
+		}
+
+		function getTotalAmount()
+		{
+			return 	$this->GetDBField('SubTotal') +
+					$this->GetDBField('ShippingCost') +
+					$this->GetDBField('VAT') +
+					$this->GetDBField('ProcessingFee') + 
+					$this->GetDBField('InsuranceFee') -
+					$this->GetDBField('GiftCertificateDiscount');
+		}
+
+
+		/**
+		 * Check field value by user-defined alghoritm
+		 *
+		 * @param string $field field name
+		 * @param Array $params field options from config
+		 * @return bool
+		 */
+		function CustomValidation($field, $params)
+		{
+			$res = true;
+
+			$res = $res && $this->ValidateCCNumber($field, $params);
+			$res = $res && $this->ValidateCCExpiration($field, $params);
+			return $res;
+		}
+
+		function requireCreditCard()
+		{
+			$pt_table = $this->Application->getUnitOption('pt', 'TableName');
+			$sql = 'SELECT RequireCCFields
+					FROM '.$pt_table.' pt
+					LEFT JOIN '.TABLE_PREFIX.'Gateways gw ON gw.GatewayId = pt.GatewayId
+					WHERE pt.PaymentTypeId = '.$this->GetDBField('PaymentType');
+			return $this->Conn->GetOne($sql);
+		}
+
+		/**
+		 * Check if field value is valid credit card number against credit card type specified
+		 *
+		 * @param string $field field name
+		 * @param Array $params field options from config
+		 * @return bool
+		 * @access private
+		 */
+		function ValidateCCNumber($field, $params)
+		{
+			$cardtype_field = getArrayValue($params, 'cardtype_field');
+			$value = $this->GetDBField($field);
+
+			if( !$cardtype_field || !$value || !$this->requireCreditCard() ) return true;
+
+			if ($this->Application->ConfigValue('Comm_MaskProcessedCreditCards')) {
+				$mask_found = strpos($value, str_repeat('X', 4)) !== false;
+				if ($this->Application->IsAdmin() && $mask_found) {
+					// masked card numbers always appear valid in admin
+					return true;
+				}
+			}
+
+			if (defined('DEBUG_MODE') && constOn('DBG_PAYMENT_GW')) {
+				$gw_data = $this->getGatewayData();
+				$this->Application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
+				$gateway_object =& $this->Application->recallObject( $gw_data['ClassName'] );
+				$test_numbers = $gateway_object->GetTestCCNumbers();
+				if (in_array($value, $test_numbers)) return true;
+			}
+
+			$error_field = isset($params['error_field']) ? $params['error_field'] : $field;
+			// '1' => 'Visa','2' => 'Mastercard', '3' => 'Amex', '4' => 'Discover', 5 => 'Diners Club', 6 => 'JBC'
+
+			// Innocent until proven guilty
+			$cc_valid = true;
+
+			//  Get rid of any non-digits
+			$value = ereg_replace("[^[:digit:]]", '', $value);
+
+			//  Perform card-specific checks, if applicable
+			switch( $this->GetDBField($cardtype_field) )
+			{
+				case 2: // MasterCard
+					$cc_valid = ereg("^5[1-5].{14}$", $value);
+					break;
+
+				case 1: // Visa
+					$cc_valid = ereg("^4.{15}$|^4.{12}$", $value);
+					break;
+
+				case 3: // American Express
+					$cc_valid = ereg("^3[47].{13}$", $value);
+					break;
+
+				case 4: // Discover
+					$cc_valid = ereg("^6011.{12}$", $value);
+					break;
+
+				case 5: // Diners Club
+					$cc_valid = ereg("^30[0-5].{11}$|^3[68].{12}$", $value);
+					break;
+
+				case 6: // JBC
+					$cc_valid = ereg("^3.{15}$|^2131|1800.{11}$", $value);
+					break;
+
+				default:
+					$this->FieldErrors[$error_field]['pseudo'] = 'credit_card_validation_error';
+					return false;
+					break;
+			}
+
+			//  The Luhn formula works right to left, so reverse the number.
+			$value = strrev($value);
+
+			$total = 0;
+
+			for($x = 0; $x < strlen($value); $x++)
+			{
+				$digit = substr($value, $x, 1);
+
+				// If it's an odd digit, double it
+				if( $x / 2 != floor($x/2) )
+				{
+					$digit *= 2;
+
+					// If the result is two digits, add them
+					if( strlen($digit) == 2 )
+					{
+						$digit = substr($digit, 0, 1) + substr($digit, 1, 1);
+					}
+				}
+
+				// Add the current digit, doubled and added if applicable, to the Total
+				$total += $digit;
+			}
+
+			//  If it passed (or bypassed) the card-specific check and the Total is
+			//  evenly divisible by 10, it's cool!
+			if ($cc_valid && $total % 10 == 0)
+			{
+				return true;
+			}
+			else
+			{
+				$this->FieldErrors[$error_field]['pseudo'] = 'credit_card_validation_error';
+				return false;
+			}
+		}
+
+		/**
+		 * Check if field value is non-expired credit card expiration date
+		 *
+		 * @param string $field field name
+		 * @param Array $params field options from config
+		 * @return bool
+		 * @access private
+		 */
+		function ValidateCCExpiration($field, $params)
+		{
+			$formatter = getArrayValue($params, 'formatter');
+			if( ($formatter != 'kCCDateFormatter') || !$this->requireCreditCard() ) return true;
+
+			if( !$this->Application->IsAdmin() )
+			{
+				// validate expiration date only for front
+				if( preg_match('/([\d]{2})\/([\d]{2})/', $this->GetDBField($field), $rets) )
+				{
+					$month = $rets[1];
+					$year = $rets[2];
+					$now_date = adodb_mktime(0, 0, 0, adodb_date('m'), adodb_date('d'), adodb_date('Y') );
+					$day_count = adodb_date('t', adodb_mktime(0, 0, 0, $month, 1, $year) );
+					$cc_date = adodb_mktime(23, 59, 59, $month, $day_count, $year);
+					if($cc_date < $now_date)
+					{
+						$error_field = isset($params['error_field']) ? $params['error_field'] : $field;
+						$this->FieldErrors[$error_field]['pseudo'] = 'credit_card_expired';
+						return false;
+					}
+				}
+			}
+			return true;
+		}
+
+		function getNextSubNumber()
+		{
+			$table = $this->Application->GetLiveName($this->TableName);
+			$sql = 'SELECT MAX(SubNumber) FROM '.$table.' WHERE Number = '.$this->GetDBField('Number');
+			return $this->Conn->GetOne($sql) + 1;
+		}
+
+		function ResetAddress($prefix)
+		{
+			$fields = Array('To','Company','Phone','Fax','Email','Address1','Address2','City','State','Zip','Country');
+			foreach($fields as $field)
+			{
+				$this->SetDBField($prefix.$field, $this->Fields[$prefix.$field]['default']);
+			}
+		}
+
+		function IsProfileAddress($address_type)
+		{
+			return $this->Application->GetVar($this->Prefix.'_IsProfileAddress');
+		}
+
+		// ===== Gift Certificates Related =====
+		function RecalculateGift(&$event)
+		{
+			$gc_id = $this->GetDBField('GiftCertificateId');
+			if ($gc_id < 1) {
+				return;
+			}
+
+			$gc =& $this->Application->recallObject('gc', null, Array('skip_autoload' => true));
+			/* @var $gc kDBItem */
+
+			$gc->Load($gc_id);
+
+			if ($gc->GetDBField('Status') == gcDISABLED) {
+				// disabled GC
+				$this->SetDBField('GiftCertificateId', 0);
+				$this->SetDBField('GiftCertificateDiscount', 0);
+				// disabled
+				return;
+			}
+
+			$debit = $gc->GetDBField('Debit') + $this->GetDBField('GiftCertificateDiscount');
+
+			$this->UpdateTotals();
+
+			$total = $this->GetDBField('TotalAmount');
+			$gift_certificate_discount = $debit >= $total ? $total : $debit;
+
+			$this->SetDBField('TotalAmount', $total - $gift_certificate_discount);
+			$this->GetDBField('GiftCertificateDiscount', $gift_certificate_discount);
+
+			$debit -= $gift_certificate_discount;
+			$gc->SetDBField('Debit', $debit);
+
+			$gc->SetDBField('Status', $debit > 0 ? gcENABLED : gcUSED);
+			$gc->Update();
+
+			if ($gift_certificate_discount == 0) {
+				$this->RemoveGiftCertificate($object);
+				$event->SetRedirectParam('checkout_error', 108);
+			}
+			$this->SetDBField('GiftCertificateDiscount', $gift_certificate_discount);
+		}
+
+		function RemoveGiftCertificate()
+		{
+			$gc_id = $this->GetDBField('GiftCertificateId');
+
+			$gc =& $this->Application->recallObject('gc', null, Array('skip_autoload' => true));
+			/* @var $gc kDBItem */
+
+			$gc->Load($gc_id);
+
+			$debit = $gc->GetDBField('Debit') + $this->GetDBField('GiftCertificateDiscount');
+
+			if ($gc->isLoaded() && ($debit > 0)) {
+				$gc->SetDBField('Debit', $debit);
+				$gc->SetDBField('Status', gcENABLED);
+				$gc->Update();
+			}
+
+			$this->SetDBField('GiftCertificateId', 0);
+			$this->SetDBField('GiftCertificateDiscount', 0);
+		}
+	}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/orders/orders_item.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.27.2.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/orders/orders_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/orders/orders_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/orders/orders_config.php	(revision 12131)
@@ -0,0 +1,489 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+$config	=	Array(
+					'Prefix'			=>	'ord',
+					'ItemClass'			=>	Array('class'=>'OrdersItem','file'=>'orders_item.php','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'OrdersEventHandler','file'=>'orders_event_handler.php','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'OrdersTagProcessor','file'=>'orders_tag_processor.php','build_event'=>'OnBuild'),
+					'AutoLoad'			=>	true,
+
+					'Hooks'				=>	Array(
+												Array(
+													'Mode' => hAFTER,
+													'Conditional' => false,
+													'HookToPrefix' => 'ord',
+													'HookToSpecial' => '',
+													'HookToEvent' => Array( 'OnPreSave' ),
+													'DoPrefix' => '',
+													'DoSpecial' => '',
+													'DoEvent' => 'OnRecalculateItems',
+												),
+
+												/* OnApplyCoupon is called as hook for OnUpdateCart/OnCheckout, which calls OnRecalcualate themself
+												Array(
+													'Mode' => hAFTER,
+													'Conditional' => false,
+													'HookToPrefix' => 'coup',
+													'HookToSpecial' => '',
+													'HookToEvent' => Array( 'OnApplyCoupon' ),
+													'DoPrefix' => '',
+													'DoSpecial' => '',
+													'DoEvent' => 'OnRecalculateItems',
+												),*/
+
+												Array(
+													'Mode' => hAFTER,
+													'Conditional' => false,
+													'HookToPrefix' => 'u',
+													'HookToSpecial' => '',
+													'HookToEvent' => Array( 'OnCreate' ),
+													'DoPrefix' => '',
+													'DoSpecial' => '',
+													'DoEvent' => 'OnUserCreate',
+												),
+
+												Array(
+													'Mode' => hBEFORE,
+													'Conditional' => false,
+													'HookToPrefix' => 'u',
+													'HookToSpecial' => '',
+													'HookToEvent' => Array('OnCheckExpiredMembership'),
+													'DoPrefix' => '',
+													'DoSpecial' => '',
+													'DoEvent' => 'OnCheckRecurringOrders',
+												),
+
+												Array(
+													'Mode' => hAFTER,
+													'Conditional' => false,
+													'HookToPrefix' => 'u',
+													'HookToSpecial' => '',
+													'HookToEvent' => Array( 'OnLogin' ),
+													'DoPrefix' => '',
+													'DoSpecial' => '',
+													'DoEvent' => 'OnUserLogin',
+												),
+
+												Array(
+													'Mode' => hBEFORE, // before because OnInpLogin is called after real in-portal login and uses data from hooks
+													'Conditional' => false,
+													'HookToPrefix' => 'u',
+													'HookToSpecial' => '',
+													'HookToEvent' => Array( 'OnInpLogin' ),
+													'DoPrefix' => '',
+													'DoSpecial' => '',
+													'DoEvent' => 'OnUserLogin',
+												),
+											),
+					'AggregateTags' => Array(
+															Array(
+																'AggregateTo' => 'orditems',
+																'AggregatedTagName' => 'LinkRemoveFromCart',
+																'LocalTagName' => 'Orditems_LinkRemoveFromCart',
+															),
+															Array(
+																'AggregateTo' => 'orditems',
+																'AggregatedTagName' => 'ProductLink',
+																'LocalTagName' => 'Orderitems_ProductLink',
+															),
+															Array(
+																'AggregateTo' => 'orditems',
+																'AggregatedTagName' => 'ProductExists',
+																'LocalTagName' => 'Orderitems_ProductExists',
+															),
+													),
+
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'Page',
+												3	=>	'event',
+												4 	=>	'mode',
+											),
+					'IDField'			=>	'OrderId',
+					'StatusField'		=>	Array('Status'),	// field, that is affected by Approve/Decline events
+
+					'ViewMenuPhrase'	=>	'la_title_Orders',
+					'CatalogTabIcon' => 'in-commerce:icon16_orders.gif',
+
+					'TitleField' => 'OrderNumber',
+					'TitlePresets'		=>	Array(
+												'default'	=>	Array(	'new_status_labels'		=> Array('ord'=>'!la_title_Adding_Order!'),
+																		'edit_status_labels'	=> Array('ord'=>'!la_title_Editing_Order!'),
+																		'new_titlefield'		=> Array('ord'=>'!la_title_New_Order!'),
+																),
+
+												'orders_incomplete'	=>	Array(	'prefixes'				=>	Array('ord.incomplete_List'),
+																				'format'				=>	"!la_title_IncompleteOrders!",
+																),
+
+												'orders_pending'	=>	Array(	'prefixes'				=>	Array('ord.pending_List'),
+																				'format'				=>	"!la_title_PendingOrders!",
+																),
+
+												'orders_backorders'	=>	Array(	'prefixes'				=>	Array('ord.backorders_List'),
+																				'format'				=>	"!la_title_BackOrders!",
+																),
+
+												'orders_toship'		=>	Array(	'prefixes'				=>	Array('ord.toship_List'),
+																				'format'				=>	"!la_title_OrdersToShip!",
+																),
+
+												'orders_processed'	=>	Array(	'prefixes'				=>	Array('ord.processed_List'),
+																				'format'				=>	"!la_title_OrdersProcessed!",
+																),
+
+												'orders_returns'	=>	Array(	'prefixes'				=>	Array('ord.returns_List'),
+																				'format'				=>	"!la_title_OrdersReturns!",
+																),
+
+												'orders_denied'		=>	Array(	'prefixes'				=>	Array('ord.denied_List'),
+																				'format'				=>	"!la_title_OrdersDenied!",
+																),
+												'orders_archived'	=>	Array(	'prefixes'				=>	Array('ord.archived_List'),
+																				'format'				=>	"!la_title_OrdersArchived!",
+																),
+
+												'orders_search'		=>	Array(	'prefixes'				=>	Array('ord.search_List'),
+																				'format'				=>	"!la_title_OrdersSearch!",
+																),
+
+												'orders_edit_general'	=>	Array('prefixes' => Array('ord'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_General!"),
+												'orders_edit_billing'	=>	Array('prefixes' => Array('ord'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_OrderBilling!"),
+												'orders_edit_shipping'	=>	Array('prefixes' => Array('ord'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_OrderShipping!"),
+												'orders_edit_items'		=>	Array('prefixes' => Array('ord', 'orditems_List'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_OrderItems!"),
+												'orders_edit_preview'	=>	Array('prefixes' => Array('ord'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_OrderPreview!"),
+
+												'orders_gw_result' => Array('prefixes' => Array('ord'), 'format' => "!la_title_OrderGWResult!"),
+
+												'order_items_edit'	=>	Array(	'prefixes'				=>	Array('ord', 'orditems'),
+																				'new_status_labels'		=>	Array('orditems'=>'!la_title_Adding_Order_Item!'),
+																				'edit_status_labels'	=>	Array('orditems'=>'!la_title_Editing_Order_Item!'),
+																				'new_titlefield'		=>	Array('orditems'=>'!la_title_New_Order_Item!'),
+																				'format'				=>	"#ord_status# '#ord_titlefield#' - #orditems_status# '#orditems_titlefield#'",
+																		),
+
+												'orders_export' =>  Array('format' => '!la_title_OrdersExport!'),
+
+												'orders_product_edit'	=>	Array('format' => '!la_title_Editing_Order_Item!'),
+
+											),
+
+					'EditTabPresets' => Array (
+						'Default' => Array (
+							'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/orders/orders_edit', 'priority' => 1),
+							'items' => Array ('title' => 'la_tab_Items', 't' => 'in-commerce/orders/orders_edit_items', 'priority' => 2),
+							'shipping' => Array ('title' => 'la_tab_Shipping', 't' => 'in-commerce/orders/orders_edit_shipping', 'priority' => 3),
+							'billing' => Array ('title' => 'la_tab_Billing', 't' => 'in-commerce/orders/orders_edit_billing', 'priority' => 4),
+							'preview' => Array ('title' => 'la_tab_Preview', 't' => 'in-commerce/orders/orders_edit_preview', 'priority' => 5),
+						),
+					),
+
+					'PermSection'		=>	Array('main' => 'in-commerce:orders'),
+
+
+					'Sections'			=>	Array(
+						'in-commerce:orders'	=>	Array(
+								'parent'		=>	'in-commerce',
+								'icon'			=>	'in-commerce:orders',
+								'label'			=>	'la_tab_Orders',
+								'url'			=>	Array('t' => 'in-commerce/orders/orders_pending_list', 'pass' => 'm'),
+								'permissions'	=>	Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:deny', 'advanced:archive', 'advanced:place', 'advanced:process', 'advanced:ship', 'advanced:reset_to_pending'),
+								'priority'		=>	1,
+								'type'			=>	stTREE,
+						),
+					),
+
+					'SectionAdjustments' => Array (
+						'in-portal:visits' => Array (
+							'url' => Array ('t' => 'in-commerce/visits/visits_list_incommerce', 'pass' => 'm'),
+						),
+					),
+
+					'StatisticsInfo'	=>	Array(
+													'pending'	=>	Array(
+																			'icon'		=>	'icon16_orders.gif',
+																			'label'		=>	'la_title_Orders',
+																			'js_url' 	=>	"#url#",
+																			'url'		=>	Array('t' => 'in-commerce/orders/orders_pending_list', 'pass' => 'm'),
+																			'status'	=>	ORDER_STATUS_PENDING,
+																	),
+											),
+
+					'TableName'			=>	TABLE_PREFIX.'Orders',
+
+					'FilterMenu'		=>	Array(
+												'Groups' => Array(
+													Array('mode' => 'AND', 'filters' => Array(0,1,2,3,4,5,6), 'type' => WHERE_FILTER),
+												),
+
+												'Filters' => Array(
+													0	=>	Array('label' => 'la_Incomplete', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ),
+													1	=>	Array('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1'  ),
+													2	=>	Array('label' => 'la_BackOrders', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2'  ),
+													3	=>	Array('label' => 'la_ToShip', 'on_sql' => '', 'off_sql' => '%1$s.Status != 3' ),
+													4	=>	Array('label' => 'la_Processed', 'on_sql' => '', 'off_sql' => '%1$s.Status != 4'  ),
+													5	=>	Array('label' => 'la_Denied', 'on_sql' => '', 'off_sql' => '%1$s.Status != 5'  ),
+													6	=>	Array('label' => 'la_Archived', 'on_sql' => '', 'off_sql' => '%1$s.Status != 6'  ),
+												)
+											),
+
+					'CalculatedFields' => Array(
+						'' => Array (
+							'CustomerName'			=>	'IF( ISNULL(u.Login), IF (%1$s.PortalUserId = -1, \'root\', IF (%1$s.PortalUserId = -2, \'Guest\', \'n/a\')), CONCAT(u.FirstName,\' \',u.LastName) )',
+							'Username'				=>	'IF( ISNULL(u.Login),\'root\',u.Login)',
+							'OrderNumber'			=>	'CONCAT(LPAD(Number,6,"0"),\'-\',LPAD(SubNumber,3,"0") )',
+							'SubtotalWithoutDiscount'	=>	'(SubTotal + DiscountTotal)',
+							'SubtotalWithDiscount'	=>	'(SubTotal)',
+							'AmountWithoutVAT'		=>	'(SubTotal+IF(ShippingTaxable=1, ShippingCost, 0)+IF(ProcessingTaxable=1, ProcessingFee, 0))',
+							'TotalAmount'			=>	'ROUND(SubTotal+ShippingCost+VAT+ProcessingFee+InsuranceFee-GiftCertificateDiscount,2)',
+							'CouponCode'			=>	'pc.Code',
+							'CouponName'			=>	'pc.Name',
+							'AffiliateUser'			=>	'IF( LENGTH(au.Login),au.Login,\'!la_None!\')',
+							'AffiliatePortalUserId'	=>	'af.PortalUserId',
+							'GiftCertificateCode'	=>	'gc.Code',
+							'GiftCertificateRecipient' => 'gc.Recipient',
+						),
+
+						'myorders' => Array (
+							'OrderNumber'			=>	'CONCAT(LPAD(Number,6,"0"),\'-\',LPAD(SubNumber,3,"0") )',
+							'SubtotalWithoutDiscount'	=>	'(SubTotal + DiscountTotal)',
+							'SubtotalWithDiscount'	=>	'(SubTotal)',
+							'AmountWithoutVAT'		=>	'(SubTotal+IF(ShippingTaxable=1, ShippingCost, 0)+IF(ProcessingTaxable=1, ProcessingFee, 0))',
+							'TotalAmount'			=>	'ROUND(SubTotal+ShippingCost+VAT+ProcessingFee+InsuranceFee-GiftCertificateDiscount,2)',
+							/*'ItemsCount'			=>	'COUNT(%1$s.OrderId)',*/
+						),
+					),
+					// %1$s - table name of object
+					// %2$s - calculated fields
+					'ListSQLs' => Array (
+						'' => '	SELECT %1$s.* %2$s
+								FROM %1$s
+								LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.PortalUserId = u.PortalUserId
+								LEFT JOIN '.TABLE_PREFIX.'ProductsCoupons pc ON %1$s.CouponId = pc.CouponId
+								LEFT JOIN '.TABLE_PREFIX.'GiftCertificates gc ON %1$s.GiftCertificateId = gc.GiftCertificateId
+								LEFT JOIN '.TABLE_PREFIX.'Affiliates af ON %1$s.AffiliateId = af.AffiliateId
+								LEFT JOIN '.TABLE_PREFIX.'PortalUser au ON af.PortalUserId = au.PortalUserId',
+
+						'myorders' => '	SELECT %1$s.* %2$s
+										FROM %1$s
+										LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.PortalUserId = u.PortalUserId',
+//										LEFT JOIN '.TABLE_PREFIX.'OrderItems ON %1$s.OrderId = '.TABLE_PREFIX.'OrderItems.OrderId',
+					),
+
+					'ItemSQLs' => Array (
+						'' => '	SELECT %1$s.* %2$s FROM %1$s
+								LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.PortalUserId = u.PortalUserId
+								LEFT JOIN '.TABLE_PREFIX.'ProductsCoupons pc ON %1$s.CouponId = pc.CouponId
+								LEFT JOIN '.TABLE_PREFIX.'GiftCertificates gc ON %1$s.GiftCertificateId = gc.GiftCertificateId
+								LEFT JOIN '.TABLE_PREFIX.'Affiliates af ON %1$s.AffiliateId = af.AffiliateId
+								LEFT JOIN '.TABLE_PREFIX.'PortalUser au ON af.PortalUserId = au.PortalUserId',
+					),
+
+					'SubItems'	=> Array('orditems'),
+					'ListSortings'	=> 	Array(
+																'' => Array(
+																	'Sorting' => Array('OrderDate' => 'desc'),
+																)
+															),
+					'Fields' => Array(
+							            'OrderId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, 'filter_type' => 'equals'),
+							            'Number' => Array('type' => 'int','required'=>1,'formatter'=>'kFormatter', 'unique'=>Array('SubNumber'),'format'=>'%06d', 'max_value_inc'>999999, 'not_null' => '1','default' => 0),
+							            'SubNumber' => Array('type' => 'int','required'=>1,'formatter'=>'kFormatter','unique'=>Array('Number'), 'format'=>'%03d', 'max_value_inc'>999, 'not_null' => '1','default' => 0),
+							            'Status' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter','options'=>Array(0=>'la_Incomplete',1=>'la_Pending',2=>'la_BackOrders',3=>'la_ToShip',4=>'la_Processed',5=>'la_Denied',6=>'la_Archived'), 'use_phrases'=>1, 'not_null' => '1','default' => 0, 'filter_type' => 'equals'),
+										'OnHold' => Array (
+											'type' => 'int',
+											'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
+											'not_null' => 1, 'default' => 0
+										),
+							            'OrderDate' => Array('type' => 'int', 'formatter'=>'kDateFormatter', 'required' => 1, 'not_null' => '1', 'default' => '#NOW#'),
+							            'PortalUserId'=>Array('type'=>'int','formatter'=>'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options'=>Array(-1=>'root',-2=>'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'','left_key_field'=>'PortalUserId','left_title_field'=>'Login','required'=>1,'not_null'=>1,'default'=>-1),
+							            'OrderIP' => Array('type' => 'string','not_null' => '1','default' => '', 'filter_type' => 'like'),
+							            'UserComment' => Array('type' => 'string', 'formatter' => 'kFormatter', 'not_null' => 1, 'using_fck' => 1, 'default' => ''),
+							            'AdminComment' => Array('type' => 'string', 'formatter' => 'kFormatter', 'not_null' => 1, 'using_fck' => 1, 'default' => ''),
+							            'BillingTo' => Array('type' => 'string','not_null' => '1','default' => ''),
+							            'BillingCompany' => Array('type' => 'string','not_null' => '1','default' => ''),
+							            'BillingPhone' => Array('type' => 'string','not_null' => '1','default' => ''),
+							            'BillingFax' => Array('type' => 'string','not_null' => '1','default' => ''),
+							            'BillingEmail' => Array('type' => 'string','formatter'=>'kFormatter', 'regexp'=>'/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i','not_null' => '1','default' => ''),
+							            'BillingAddress1' => Array('type' => 'string','not_null' => '1','default' => ''),
+							            'BillingAddress2' => Array('type' => 'string','not_null' => '1','default' => ''),
+							            'BillingCity' => Array('type' => 'string','not_null' => '1','default' => ''),
+							            'BillingState' => Array('type' => 'string', 'formatter'=>'kOptionsFormatter',
+							            							'options' => Array(),
+												            		'option_key_field'=>'DestAbbr','option_title_field'=>'Translation',
+												            		'not_null' => '1','default' => ''),
+							            'BillingZip' => Array('type' => 'string','not_null' => '1','default' => ''),
+							            'BillingCountry' => Array('type' => 'string', 'formatter'=>'kOptionsFormatter',
+							            				'options_sql'=>'SELECT %1$s
+																				FROM '.TABLE_PREFIX.'StdDestinations
+																				LEFT JOIN '.TABLE_PREFIX.'Phrase
+																					ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
+																				WHERE
+																					DestType=1
+																					AND
+																					LanguageId = %2$s
+																				ORDER BY Translation',
+												            		'option_key_field'=>'DestAbbr','option_title_field'=>'Translation',
+												            		'not_null' => '1','default' => 'USA'),
+							            'VAT' => Array('type' => 'float','formatter'=>'kFormatter','not_null'=>1,'default' => '0','format'=>'%01.2f'),
+							            'VATPercent' => Array('type' => 'float','formatter'=>'kFormatter','not_null'=>1,'default' => '0','format'=>'%01.3f'),
+							            'PaymentType' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter','options_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PaymentTypes WHERE Status = 1', 'option_key_field'=>'PaymentTypeId','option_title_field'=>'Description', 'not_null' => 1, 'default' => 0),
+							            'PaymentAccount' => Array('type' => 'string','not_null' => '1', 'cardtype_field' => 'PaymentCardType', 'default' => '', 'filter_type' => 'like'),
+							            'PaymentNameOnCard' => Array('type' => 'string','not_null' => '1','default' => ''),
+							            'PaymentCCExpDate' => Array('type' => 'string', 'formatter'=>'kCCDateFormatter', 'month_field' => 'PaymentCCExpMonth', 'year_field'=>'PaymentCCExpYear', 'not_null' => '1','default' => ''),
+							            'PaymentCardType' => Array('type' => 'string', 'not_null' => 1, 'formatter'=>'kOptionsFormatter', 'options' => Array('' => '','1' => 'Visa','2' => 'Mastercard', '3' => 'Amex', '4' => 'Discover', '5' => 'Diners Club', '6' => 'JBC'), 'default' => ''),
+							            'PaymentExpires' => Array('type' => 'int', 'formatter'=>'kDateFormatter','not_null' => '1','default' => '#NOW#'),
+							            'ShippingTo' => Array('type' => 'string','not_null' => '1','default' => ''),
+							            'ShippingCompany' => Array('type' => 'string','not_null' => '1','default' => ''),
+							            'ShippingPhone' => Array('type' => 'string','not_null' => '1','default' => ''),
+							            'ShippingFax' => Array('type' => 'string','not_null' => '1','default' => ''),
+							            'ShippingEmail' => Array('type' => 'string','formatter'=>'kFormatter', 'regexp'=>'/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i','not_null' => '1','default' => ''),
+							            'ShippingAddress1' => Array('type' => 'string','not_null' => '1','default' => ''),
+							            'ShippingAddress2' => Array('type' => 'string','not_null' => '1','default' => ''),
+							            'ShippingCity' => Array('type' => 'string','not_null' => '1','default' => ''),
+							            'ShippingState' => Array('type' => 'string', 'formatter'=>'kOptionsFormatter',
+							            							'options' => Array(),
+												            		'option_key_field'=>'DestAbbr','option_title_field'=>'Translation',
+												            		'not_null' => '1','default' => ''),
+							            'ShippingZip' => Array('type' => 'string','not_null' => '1','default' => ''),
+							            'ShippingCountry' => Array('type' => 'string', 'formatter'=>'kOptionsFormatter',
+							            				'options_sql'=>'SELECT %1$s
+																				FROM '.TABLE_PREFIX.'StdDestinations
+																				LEFT JOIN '.TABLE_PREFIX.'Phrase
+																					ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
+																				WHERE
+																					DestType=1
+																					AND
+																					LanguageId = %2$s
+																				ORDER BY Translation',
+												            		'option_key_field'=>'DestAbbr','option_title_field'=>'Translation',
+												           'not_null' => '1','default' => 'USA'),
+							            'ShippingType' => Array('type' => 'int','formatter'=>'kOptionsFormatter','options_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'ShippingType WHERE Status = 1','option_key_field'=>'ShippingID','option_title_field'=>'Name', 'not_null' => 1, 'default' => 0),
+							            'ShippingCost' => Array('type' => 'double','formatter'=>'kFormatter','format'=>'%01.2f', 'not_null' => '1','default' => '0.00'),
+							            'ShippingCustomerAccount' => Array('type' => 'string','not_null' => '1','default' => ''),
+							            'ShippingTracking' => Array('type' => 'string','not_null' => '1','default' => ''),
+							            'ShippingDate' => Array('type' => 'int', 'formatter'=>'kDateFormatter','default' => null),
+							            'SubTotal' => Array('type' => 'float', 'formatter'=>'kFormatter', 'format'=>'%01.2f', 'not_null' => '1','default' => '0.00'),
+							            'ReturnTotal' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'),
+							            'CostTotal' => Array('type' => 'float', 'formatter'=>'kFormatter', 'format'=>'%01.2f', 'not_null' => '1','default' => '0.00'),
+							            'OriginalAmount'	=>	Array('type' => 'float', 'formatter'=>'kFormatter', 'format'=>'%01.2f', 'not_null' => '1','default' => '0.00'),
+							            'ShippingOption' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(0 => 'la_ship_all_together', 1 => 'la_ship_backorder_separately', 2 => 'la_ship_backorders_upon_avail'), 'default'=>0),
+							            'ShippingGroupOption' => Array('type' => 'int', 'not_null' => 1, 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(0 => 'la_auto_group_shipments', 1 => 'la_manual_group_shipments'), 'default'=>0),
+							            'GiftCertificateId' => Array('type' => 'int','default' => null),
+							            'GiftCertificateDiscount' => Array('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00',),
+							            'ShippingInfo' => Array('type' => 'string', 'default' => NULL),
+							            'CouponId' => Array('type' => 'int','default' => null),
+							            'CouponDiscount' => Array('type' => 'float','not_null' => '1','default' => '0.00','formatter'=>'kFormatter','format'=>'%01.2f'),
+							            'DiscountTotal' => Array('type' => 'float','not_null' => '1','default' => '0.00','formatter'=>'kFormatter','format'=>'%01.2f'),
+							            'TransactionStatus' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options' => Array(0=>'la_Invalid', 1 => 'la_Verified', 2 => 'la_Penging'), 'use_phrases'=>1, 'not_null' => '1','default' => 2),
+										'GWResult1' => Array('type' => 'string', 'formatter'=>'kSerializedFormatter', 'not_null' => '1','default' => ''),
+							            'GWResult2' => Array('type' => 'string', 'formatter'=>'kSerializedFormatter', 'not_null' => '1','default' => ''),
+							            'AffiliateId' => Array('type'=>'int','formatter'=>'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'),  'options' => Array(0 => 'lu_None'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'Affiliates af LEFT JOIN '.TABLE_PREFIX.'PortalUser pu ON pu.PortalUserId = af.PortalUserId WHERE `%s` = \'%s\'','left_key_field'=>'AffiliateId','left_title_field'=>'Login','not_null'=>1,'default'=>0),
+							            'VisitId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+            							'AffiliateCommission' => Array('type' => 'double', 'formatter'=>'kFormatter','format'=>'%.02f', 'not_null' => '1','default' => '0.0000'),
+            							'ProcessingFee' => Array('type' => 'double', 'formatter'=>'kFormatter','format'=>'%.02f', 'not_null' => '0','default' => '0.0000'),
+            							'InsuranceFee' => Array ('type' => 'float', 'formatter'=>'kFormatter', 'format'=>'%01.2f', 'not_null' => '1','default' => '0.00'),
+            							'ShippingTaxable'		=>	Array('type' => 'int', 'not_null' => 0, 'default' => 0),
+            							'ProcessingTaxable'		=>	Array('type' => 'int', 'not_null' => 0, 'default' => 0),
+            							'IsRecurringBilling'	=>	Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
+            							'ChargeOnNextApprove'	=>	Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
+            							'NextCharge'			=>	Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null),
+            							'GroupId'			=>	Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+										'GoogleOrderNumber' => Array ('type' => 'string', 'default' => NULL), // MySQL BIGINT UNSIGNED = 8 Bytes, PHP int = 4 Bytes -> threat as string
+							        ),
+
+					'VirtualFields'	=> 	Array(
+												'CustomerName'			=>	Array('type'=>'string','default'=>'','filter_type'=>'like'),
+												'TotalAmount'			=>	Array('type' => 'float', 'formatter'=>'kFormatter', 'format'=>'%01.2f', 'not_null' => '1','default' => '0.00'),
+												'AmountWithoutVAT'		=>	Array('type' => 'float', 'formatter'=>'kFormatter', 'format'=>'%01.2f', 'not_null' => '1','default' => '0.00'),
+												'SubtotalWithDiscount'	=>	Array('type' => 'float', 'formatter'=>'kFormatter', 'format'=>'%01.2f', 'not_null' => '1','default' => '0.00'),
+												'SubtotalWithoutDiscount'	=>	Array('type' => 'float', 'formatter'=>'kFormatter', 'format'=>'%01.2f', 'not_null' => '1','default' => '0.00'),
+												'OrderNumber'			=>	Array('type'=>'string','default'=>'', 'filter_type' => 'like'),
+
+												// for ResetToUser
+												'UserTo'		=>	Array('type'=>'string','default'=>''),
+												'UserCompany'	=>	Array('type'=>'string','default'=>''),
+												'UserPhone'		=>	Array('type'=>'string','default'=>''),
+												'UserFax'		=>	Array('type'=>'string','default'=>''),
+												'UserEmail'		=>	Array('type'=>'string','default'=>''),
+												'UserAddress1'	=>	Array('type'=>'string','default'=>''),
+												'UserAddress2'	=>	Array('type'=>'string','default'=>''),
+												'UserCity'		=>	Array('type'=>'string','default'=>''),
+												'UserState'		=>	Array('type'=>'string','default'=>''),
+												'UserZip'		=>	Array('type'=>'string','default'=>''),
+												'UserCountry'	=>	Array('type'=>'string','default'=>''),
+
+												// for Search
+												'Username'		=>	Array('type'=>'string','filter_type'=>'like'),
+												'OrderSearchId' =>	Array('type'=>'int','filter_type'=>'equals','filter_field'=>'OrderId'),
+												'FromDateTime'	=>	Array('formatter'=>'kDateFormatter','default'=>'','filter_type'=>'range_from','filter_field'=>'OrderDate' ),
+												'ToDateTime'	=>	Array('formatter'=>'kDateFormatter','default'=>'','filter_type'=>'range_to','filter_field'=>'OrderDate', 'empty_time' => adodb_mktime(23,59,59) ),
+												'FromAmount'	=>	Array('type'=>'double', 'formatter'=>'kFormatter', 'format'=>'%01.2f','filter_type'=>'range_from','filter_field'=>'TotalAmount'),
+												'ToAmount'	=>	Array('type'=>'double', 'formatter'=>'kFormatter', 'format'=>'%01.2f','filter_type'=>'range_to','filter_field'=>'TotalAmount'),
+												'HasBackOrders' => Array('default'=>false),
+												'PaymentCVV2'	=>	Array('type'=>'string', 'default'=>false),
+												'AffiliateUser' =>	Array('type'=>'string', 'filter_type' => 'like'),
+												'AffiliatePortalUserId' => Array('type'=>'int'),
+
+												// export related fields: begin
+												'ExportFormat'			=>	Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'CSV', /*2 => 'XML'*/), 'default' => 1),
+												'ExportFilename'		=>	Array('type' => 'string', 'default' => ''),
+												'FieldsSeparatedBy'		=>	Array('type' => 'string', 'default' => ','),
+												'FieldsEnclosedBy'		=>	Array('type' => 'string', 'default' => '"'),
+												'LineEndings'			=>	Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'Windows', 2 => 'UNIX'), 'default' => 1),
+												'LineEndingsInside'		=>	Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'CRLF', 2 => 'LF'), 'default' => 2),
+												'IncludeFieldTitles'	=>	Array('type' => 'int', 'default' => 1),
+												'ExportColumns'			=>	Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array()),
+												'AvailableColumns'		=>	Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array()),
+												'ExportPresets' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array()),
+												'ExportSavePreset' =>	Array('type'=>'int'),
+												'ExportPresetName' =>	Array('type'=>'string'),
+												// export related fields: end
+											),
+					'Grids'	=> Array(
+								'Default'		=>	Array(
+															'Icons' => Array('default'=>'icon16_orders.gif', 0 => 'icon16_orders.gif', 1 => 'icon16_orders_pending.gif', 5 => 'icon16_orders_disabled.gif'),
+															'Fields' => Array(
+																			'OrderId'		=>	Array('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+																			'OrderDate' => Array( 'title'=>'la_col_OrderDate', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_date_range_filter'),
+																			'OrderNumber'	=> Array( 'title' => 'la_col_OrderNumber', 'data_block' => 'grid_ordernumber_td', 'filter_block' => 'grid_like_filter'),
+																			'CustomerName'	=> Array( 'title' => 'la_col_CustomerName', 'data_block' => 'grid_userlink_td', 'user_field' => 'PortalUserId', 'filter_block' => 'grid_like_filter'),
+																			'PaymentType'	=> Array( 'title' => 'la_col_PaymentType', 'data_block' => 'grid_billinglink_td', 'filter_block' => 'grid_options_filter'),
+																			'TotalAmount'	=> Array( 'title' => 'la_col_TotalAmount', 'data_block' => 'grid_previewlink_td', 'filter_block' => 'grid_range_filter'),
+																			'AffiliateUser'	=> Array( 'title' => 'la_col_AffiliateUser', 'data_block' => 'grid_userlink_td', 'user_field' => 'AffiliatePortalUserId', 'filter_block' => 'grid_like_filter'),
+																			'OnHold' => Array ('title' => 'la_col_OnHold', 'filter_block' => 'grid_options_filter'),
+
+																		),
+													),
+								'Search'		=>	Array(
+															'Icons' => Array('default'=>'icon16_orders.gif', 0 => 'icon16_orders.gif', 1 => 'icon16_orders_pending.gif', 5 => 'icon16_orders_disabled.gif'),
+															'Fields' => Array(
+																			'OrderId'		=>	Array('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+																			'OrderNumber'	=>	Array('title' => 'la_col_OrderNumber', 'data_block' => 'grid_ordernumber_td', 'filter_block' => 'grid_like_filter'),
+																			'Status'		=>	Array('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'filter_block' => 'grid_options_filter'),
+																			'OrderDate'	=>	Array('title' => 'la_col_OrderDate', 'filter_block' => 'grid_date_range_filter'),
+																			'CustomerName'		=>	Array('title' => 'la_col_CustomerName', 'data_block' => 'grid_userlink_td', 'user_field' => 'PortalUserId', 'filter_block' => 'grid_like_filter'),
+																			'PaymentType'	=> 	Array('title' => 'la_col_PaymentType', 'data_block' => 'grid_billinglink_td', 'filter_block' => 'grid_options_filter'),
+																			'TotalAmount'	=>	Array('title' => 'la_col_TotalAmount', 'data_block' => 'grid_previewlink_td', 'filter_block' => 'grid_float_range_filter'),
+																			'AffiliateUser'	=>	Array( 'title' => 'la_col_AffiliateUser', 'data_block' => 'grid_userlink_td', 'user_field' => 'AffiliatePortalUserId', 'filter_block' => 'grid_user_like_filter'),
+																			'OrderIP'		=>	Array('title' => 'la_col_OrderIP', 'filter_block' => 'grid_like_filter'),
+																			'Username'		=>	Array('title' => 'la_col_Username', 'filter_block' => 'grid_user_like_filter'),
+																			'PaymentAccount'	=>	Array('title' => 'la_col_CreditCardNumber', 'filter_block' => 'grid_like_filter'),
+																		),
+													),
+								),
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/orders/orders_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.59.2.15
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/orders/orders_tag_processor.php
===================================================================
--- branches/5.1.x/in-commerce/units/orders/orders_tag_processor.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/orders/orders_tag_processor.php	(revision 12131)
@@ -0,0 +1,1466 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	class OrdersTagProcessor extends kDBTagProcessor
+	{
+
+		/**
+		 * Print location using only filled in fields
+		 *
+		 * @param Array $params
+		 * @access public
+		 */
+		function PrintLocation($params)
+		{
+			$object =& $this->getObject($params);
+
+			$type = getArrayValue($params,'type');
+			if($type == 'Company')
+			{
+				return $this->PrintCompanyLocation($params);
+			}
+			$fields = Array('City','State','Zip','Country');
+
+			$ret = '';
+			foreach($fields as $field)
+			{
+				$value = $object->GetField($type.$field);
+				if ($field == 'Country' && $value) $ret .= '<br/>';
+				if($value) $ret .= $value.', ';
+			}
+			return rtrim($ret,', ');
+		}
+
+		function PrintCompanyLocation($params)
+		{
+			$fields = Array('City','State','ZIP','Country');
+			$ret = '';
+			foreach($fields as $field)
+			{
+				$value = $this->Application->ConfigValue('Comm_'.$field);
+				if($field == 'Country')
+				{
+					$sql = 'SELECT DestName
+							FROM '.TABLE_PREFIX.'StdDestinations
+							WHERE DestAbbr = '.$this->Conn->qstr($value);
+					$value = $this->Application->Phrase( $this->Conn->GetOne($sql) );
+				}
+				if ($field == 'Country' && $value) $ret .= '<br/>';
+				if($value) $ret .= $value.', ';
+			}
+			return rtrim($ret,', ');
+		}
+
+		function Orditems_LinkRemoveFromCart($params)
+		{
+			return $this->Application->HREF($this->Application->GetVar('t'), '', Array('pass' => 'm,orditems,ord', 'ord_event' => 'OnRemoveFromCart', 'm_cat_id'=>0));
+		}
+
+		function Orderitems_ProductLink($params)
+		{
+			$object =& $this->Application->recallObject('orditems');
+
+			$url_params = Array (
+				'p_id' =>  $object->GetDBField('ProductId'),
+				'pass' => 'm,p',
+			);
+
+			return $this->Application->HREF($params['template'], '', $url_params);
+		}
+
+		function Orderitems_ProductExists($params)
+		{
+			$object =& $this->Application->recallObject('orditems');
+			return $object->GetDBField('ProductId') > 0;
+		}
+
+		function PrintCart($params)
+		{
+			$o = '';
+
+			$params['render_as'] = $params['item_render_as'];
+
+			$o_items = $this->Application->ProcessParsedTag(rtrim('orditems.'.$this->Special, '.'), 'PrintList', 	array_merge($params, Array(
+					'per_page' => -1
+			)) );
+			if ($o_items){
+
+				$cart_params = array('name' => $params['header_render_as']);
+				$o  = $this->Application->ParseBlock($cart_params);
+				$o .= $o_items;
+				$cart_params = array('name' => $params['footer_render_as']);
+				$o .= $this->Application->ParseBlock($cart_params);
+			}else {
+				$cart_params = array('name' => $params['empty_cart_render_as']);
+				$o = $this->Application->ParseBlock($cart_params);
+			}
+
+			return $o;
+		}
+
+		function ShopCartForm($params)
+		{
+			return $this->Application->ProcessParsedTag('m', 'ParseBlock', 	array_merge($params, Array(
+					'name' => 'kernel_form', 'PrefixSpecial'=>'ord'
+			)) );
+		}
+
+		function BackOrderFlag($params)
+		{
+			$object =& $this->Application->recallObject('orditems');
+			return $object->GetDBField('BackOrderFlag');
+		}
+
+		function OrderIcon($params){
+			$object =& $this->Application->recallObject('orditems');
+			if ($object->GetDBField('BackOrderFlag')==0){
+				return $params['ordericon'];
+			}else{
+				return $params['backordericon'];
+			}
+		}
+
+		function Status($params)
+		{
+			$status_map = Array(
+				'incomplete' => ORDER_STATUS_INCOMPLETE,
+				'pending' => ORDER_STATUS_PENDING,
+				'backorder' => ORDER_STATUS_BACKORDERS,
+				'toship' => ORDER_STATUS_TOSHIP,
+				'processed' => ORDER_STATUS_PROCESSED,
+				'denied' => ORDER_STATUS_DENIED,
+				'archived' => ORDER_STATUS_ARCHIVED,
+			);
+
+			$object =& $this->getObject($params);
+			$status = $object->GetDBField('Status');
+
+			$result = true;
+			if (isset($params['is'])) {
+				$result = $result && ($status == $status_map[$params['is']]);
+			}
+			if (isset($params['is_not'])) {
+				$result = $result && ($status != $status_map[$params['is_not']]);
+			}
+			return $result;
+		}
+
+		function ItemsInCart($params)
+		{
+			$object =& $this->getObject($params);
+			if ($object->GetDBField('Status') != ORDER_STATUS_INCOMPLETE) {
+				return 0;
+			}
+
+			$object =& $this->Application->recallObject('orditems', 'orditems_List');
+			/* @var $object kDBList */
+
+			return $object->RecordsCount;
+		}
+
+		function CartNotEmpty($params)
+		{
+			$object =& $this->getObject($params);
+
+			if ($object->GetDBField('Status') != ORDER_STATUS_INCOMPLETE) {
+				return 0;
+			}
+
+			$order_id = $this->Application->RecallVar('ord_id');
+			if ($order_id) {
+				$sql = 'SELECT COUNT(*)
+						FROM '.TABLE_PREFIX.'OrderItems
+						WHERE OrderId = '.$order_id;
+				return $this->Conn->GetOne($sql);
+			}
+
+			return 0;
+		}
+
+		function CartIsEmpty($params)
+		{
+			return $this->CartNotEmpty($params) ? false : true;
+		}
+
+		function CartHasBackorders($params)
+		{
+			$object =& $this->getObject($params);
+			$different_types = $this->Conn->GetCol('SELECT COUNT(*) FROM '.TABLE_PREFIX.'OrderItems WHERE OrderId = '.$object->GetID().' GROUP BY BackOrderFlag');
+			return count($different_types) > 1;
+		}
+
+		function PrintShippings($params)
+		{
+			$o = '';
+			$object =& $this->getObject($params);
+			$ord_id = $object->GetId();
+
+			$shipping_option = $object->GetDBField('ShippingOption');
+			$backorder_select = $shipping_option == 0 ? '0 As BackOrderFlag' : 'BackOrderFlag';
+
+			$order_items =& $this->Application->recallObject('orditems', 'orditems_List', Array('skip_autoload' => true) );
+			$oi_table = $order_items->TableName;
+
+			list($split_shipments, $limit_types) = $this->GetShippingLimitations($ord_id);
+			foreach ($split_shipments as $group => $data)
+			{
+				$query = 'UPDATE '.$oi_table.' SET SplitShippingGroup = '.$group.'
+									WHERE ProductId IN ('.implode(',', $data['Products']).')';
+				$this->Conn->Query($query);
+				$limitations_cache[$group] = $data['Types'];
+			}
+
+			$shipping_group_option = $object->GetDBField('ShippingGroupOption');
+			$shipping_group_select = $shipping_group_option == 0 ? '0 AS SplitShippingGroup' : 'SplitShippingGroup';
+			if (count($split_shipments) > 1) {
+				$this->Application->SetVar('shipping_limitations_apply', 1);
+				// different shipping limitations apply
+				if ($limit_types == 'NONE') {
+					// order can't be shipped with single shipping type
+					$this->Application->SetVar('shipping_limitations_apply', 2);
+					$shipping_group_select = 'SplitShippingGroup';
+					$shipping_group_option = 1;
+				}
+			}
+			else {
+				$this->Application->SetVar('shipping_limitations_apply', 0);
+			}
+
+			$weight_sql = 'IF(oi.Weight IS NULL, 0, oi.Weight * oi.Quantity)';
+
+			$query = 'SELECT
+									'.$backorder_select.',
+									oi.ProductName,
+									oi.ShippingTypeId,
+									SUM(oi.Quantity) AS TotalItems,
+									SUM('.$weight_sql.') AS TotalWeight,
+									SUM(oi.Price * oi.Quantity) AS TotalAmount,'.
+									 //	calculate free Totals => SUM(ALL) - SUM(PROMO) 								'
+									'SUM(oi.Quantity) - SUM(IF(p.MinQtyFreePromoShipping > 0 AND p.MinQtyFreePromoShipping <= oi.Quantity, oi.Quantity, 0)) AS TotalItemsPromo,
+									SUM('.$weight_sql.') - SUM(IF(p.MinQtyFreePromoShipping > 0 AND p.MinQtyFreePromoShipping <= oi.Quantity, '.$weight_sql.', 0)) AS TotalWeightPromo,
+									SUM(oi.Price * oi.Quantity) - SUM(IF(p.MinQtyFreePromoShipping > 0 AND p.MinQtyFreePromoShipping <= oi.Quantity, oi.Price * oi.Quantity, 0)) AS TotalAmountPromo,
+									'.$shipping_group_select.'
+								FROM '.$oi_table.' oi
+								LEFT JOIN '.$this->Application->getUnitOption('p', 'TableName').' p
+								ON oi.ProductId = p.ProductId
+								WHERE oi.OrderId = '.$ord_id.' AND p.Type = 1
+								GROUP BY BackOrderFlag, SplitShippingGroup
+								ORDER BY BackOrderFlag ASC, SplitShippingGroup ASC';
+			$shipments = $this->Conn->Query($query);
+
+			$block_params = Array();
+			$block_params['name'] = $this->SelectParam($params, 'render_as,block');
+			$block_params['user_country_id'] = $object->GetDBField('ShippingCountry');
+			$block_params['user_state_id'] = $object->GetDBField('ShippingState');
+			$block_params['user_zip'] = $object->GetDBField('ShippingZip');
+			$block_params['user_city'] = $object->GetDBField('ShippingCity');
+			$block_params['user_addr1'] = $object->GetDBField('ShippingAddress1');
+			$block_params['user_addr2'] = $object->GetDBField('ShippingAddress2');
+			$block_params['user_name'] = $object->GetDBField('ShippingTo');
+
+			if(	($block_params['user_addr1'] == '' || $block_params['user_city'] == '' ||
+				$block_params['user_zip'] == '' || $block_params['user_country_id'] == '') &&
+				getArrayValue($params, 'invalid_address_render_as'))
+			{
+				$block_params['name'] = $params['invalid_address_render_as'];
+				return $this->Application->ParseBlock($block_params);
+			}
+
+			$group = 1;
+			foreach ($shipments as $shipment) {
+				$where = array('OrderId = '.$ord_id);
+				if ($shipping_group_option != 0) {
+					$where[] = 'SplitShippingGroup = '.$shipment['SplitShippingGroup'];
+				}
+				if ($shipping_option > 0) { // not all together
+					$where[] = 'BackOrderFlag = '.$shipment['BackOrderFlag'];
+				}
+
+				$query = 'UPDATE '.$oi_table.' SET PackageNum = '.$group.'
+									'.($where ? 'WHERE '.implode(' AND ', $where) : '');
+				$this->Conn->Query($query);
+				$group++;
+			}
+
+			$this->Application->RemoveVar('LastShippings');
+			$group = 1;
+			$this->Application->SetVar('ShipmentsExists', 1);
+			foreach ($shipments as $shipment) {
+
+
+				$block_params['package_num'] =  $group;
+
+				$block_params['limit_types'] = strpos($shipping_group_select, '0 AS') !== false ? $limit_types : $limitations_cache[$shipment['SplitShippingGroup']];
+
+				$this->Application->SetVar('ItemShipmentsExists', 1);
+
+				switch ($shipment['BackOrderFlag']) {
+					case 0:
+						if ( $this->CartHasBackOrders(Array()) && $shipping_option == 0 ) {
+							$block_params['shipment'] = $this->Application->Phrase('lu_all_available_backordered');
+						}
+						else {
+							$block_params['shipment'] = $this->Application->Phrase('lu_ship_all_available');;
+						}
+						break;
+					case 1:
+						$block_params['shipment'] = $this->Application->Phrase('lu_ship_all_backordered');;
+						break;
+					default:
+						$block_params['shipment'] = $this->Application->Phrase('lu_ship_backordered');
+						break;
+				}
+
+				$block_params['promo_weight_metric'] = $shipment['TotalWeightPromo'];
+				$block_params['promo_amount'] = $shipment['TotalAmountPromo'];
+				$block_params['promo_items'] = $shipment['TotalItemsPromo'];
+
+				$block_params['weight_metric'] = $shipment['TotalWeight'];
+				$block_params['weight'] = $shipment['TotalWeight'];
+
+				$regional =& $this->Application->recallObject('lang.current');
+				if ($block_params['weight_metric'] == '')
+				{
+					$block_params['weight'] = $this->Application->Phrase('lu_NotAvailable');
+				}
+				elseif ($regional->GetDBField('UnitSystem') == 1)
+				{
+					$block_params['weight'] .= ' '.$this->Application->Phrase('lu_kg');
+				}
+				elseif ($regional->GetDBField('UnitSystem') == 2)
+				{
+					list($pounds, $ounces) = Kg2Pounds($block_params['weight']);
+					$block_params['weight'] = 	$pounds.' '.$this->Application->Phrase('lu_pounds').' '.
+												$ounces.' '.$this->Application->Phrase('lu_ounces');
+				}
+
+				$block_params['items'] = $shipment['TotalItems'];
+
+				$iso = $this->GetISO($params['currency']);
+				$amount = $this->ConvertCurrency($shipment['TotalAmount'], $iso);
+				$amount = sprintf("%.2f", $amount);
+
+//				$block_params['amount'] = $this->AddCurrencySymbol($amount, $iso);
+				$block_params['amount'] = $shipment['TotalAmount'];
+				$block_params['field_name'] = $this->InputName(Array('field' => 'ShippingTypeId')).'['.($group).']';
+
+				$parsed_block = $this->Application->ParseBlock($block_params);
+
+				if($this->Application->GetVar('ItemShipmentsExists'))
+				{
+					$o .= $parsed_block;
+				}
+				else
+				{
+					$this->Application->SetVar('ShipmentsExists', 0);
+					if(getArrayValue($params, 'no_shipments_render_as'))
+					{
+						$block_params['name'] = $params['no_shipments_render_as'];
+						return $this->Application->ParseBlock($block_params);
+					}
+				}
+				$group++;
+			}
+
+			if(getArrayValue($params, 'table_header_render_as'))
+			{
+				$o = $this->Application->ParseBlock( Array('name' => $params['table_header_render_as']) ).$o;
+			}
+			if(getArrayValue($params, 'table_footer_render_as'))
+			{
+				$o .= $this->Application->ParseBlock( Array('name' => $params['table_footer_render_as']) );
+			}
+
+			return $o;
+		}
+
+		function GetShippingLimitations($ord_id)
+		{
+			/*$query = 'SELECT
+										c.CachedShippingLimitation
+									FROM '.TABLE_PREFIX.'OrderItems AS oi
+									LEFT JOIN '.TABLE_PREFIX.'Products AS p
+									ON p.ProductId = oi.ProductId
+									LEFT JOIN '.TABLE_PREFIX.'CategoryItems AS ci
+									ON ci.ItemResourceId = p.ResourceId
+									LEFT JOIN '.TABLE_PREFIX.'Category AS c
+									ON c.CategoryId = ci.CategoryId
+									WHERE
+										oi.OrderId = '.$ord_id.'
+										AND
+										ci.PrimaryCat = 1
+										AND
+										c.CachedShippingMode = 1;';
+			$cat_limitations = $this->Conn->GetCol($query);*/
+			$cat_limitations = array();
+
+			$query = 'SELECT ShippingLimitation, ShippingMode, oi.ProductId as ProductId
+									FROM '.TABLE_PREFIX.'Products AS p
+									LEFT JOIN '.TABLE_PREFIX.'OrderItems AS oi ON
+									oi.ProductId = p.ProductId
+									WHERE oi.OrderId = '.$ord_id.' AND p.Type = 1'; // .' AND p.ShippingMode = 1';
+			$limitations = $this->Conn->Query($query, 'ProductId');
+
+			$split_shipments = array();
+
+			$limit = false;
+
+			$types_index = array();
+
+			// group products by shipping type range and caculate intersection of all types available for ALL products
+			// the intersaction caclulation is needed to determine if the order can be shipped with single type or not
+			if ($limitations) {
+				$limit_types = null;
+				foreach ($limitations as $product_id => $row)
+				{
+					// if shipping types are limited - get the types
+					$types = $row['ShippingLimitation'] != '' ? explode('|', substr($row['ShippingLimitation'], 1, -1)) : array('ANY');
+					// if shipping is NOT limited to selected types (default - so products with no limitations at all also counts)
+					if ($row['ShippingMode'] == 0) {
+						array_push($types, 'ANY'); // can be shipped with ANY (literally) type
+						$types = array_unique($types);
+					}
+					//adding product id to split_shipments group by types range
+					$i = array_search(serialize($types), $types_index);
+					if ($i === false) {
+						$types_index[] = serialize($types);
+						$i = count($types_index)-1;
+					}
+					$split_shipments[$i]['Products'][] = $product_id;
+					$split_shipments[$i]['Types'] = serialize($types);
+					if ($limit_types == null) { //it is null only when we process first item with limitations
+						$limit_types = $types; //initial scope
+					}
+
+					// this is to avoid ANY intersect CUST_1 = (), but allows ANY intersect CUST_1,ANY = (ANY)
+					if (in_array('ANY', $limit_types) && !in_array('ANY', $types)) {
+						array_splice($limit_types, array_search('ANY', $limit_types), 1, $types);
+					}
+					// this is to avoid CUST_1 intersect ANY = (), but allows CUST_1 intersect CUST_1,ANY = (ANY)
+					if (!in_array('ANY', $limit_types) && in_array('ANY', $types)) {
+						array_splice($types, array_search('ANY', $types), 1, $limit_types);
+					}
+					$limit_types = array_intersect($limit_types, $types);
+				}
+				$limit_types = count($limit_types) > 0 ? serialize(array_unique($limit_types)) : 'NONE';
+			}
+			return array($split_shipments, $limit_types);
+		}
+
+		function PaymentTypeForm($params)
+		{
+			$object =& $this->getObject($params);
+
+			$payment_type_id = $object->GetDBField('PaymentType');
+			if($payment_type_id)
+			{
+				$this->Application->SetVar('pt_id', $payment_type_id);
+				$block_params['name'] = $this->SelectParam($params, $this->UsingCreditCard($params) ? 'cc_render_as,block_cc' : 'default_render_as,block_default' );
+				return $this->Application->ParseBlock($block_params);
+			}
+			return '';
+		}
+
+		/**
+		 * Returns true in case if credit card was used as payment type for order
+		 *
+		 * @param Array $params
+		 * @return bool
+		 */
+		function UsingCreditCard($params)
+		{
+			$object =& $this->getObject($params);
+
+			$pt = $object->GetDBField('PaymentType');
+
+			if (!$pt) {
+				$pt = $this->Conn->GetOne('SELECT PaymentTypeId FROM '.TABLE_PREFIX.'PaymentTypes WHERE IsPrimary = 1');
+				$object->SetDBField('PaymentType', $pt);
+			}
+
+			$pt_table = $this->Application->getUnitOption('pt','TableName');
+			$sql = 'SELECT GatewayId FROM %s WHERE PaymentTypeId = %s';
+			$gw_id = $this->Conn->GetOne( sprintf( $sql, $pt_table, $pt ) );
+
+			$sql = 'SELECT RequireCCFields FROM %s WHERE GatewayId = %s';
+
+			return $this->Conn->GetOne( sprintf($sql, TABLE_PREFIX.'Gateways', $gw_id) );
+		}
+
+		function PaymentTypeDescription($params)
+		{
+			return $this->Application->ProcessParsedTag('pt', 'Field', 	array_merge($params, Array(
+					'field' => 'Description'
+			)) );
+		}
+
+		function PaymentTypeInstructions($params)
+		{
+			return $this->Application->ProcessParsedTag('pt', 'Field', 	array_merge($params, Array(
+					'field' => 'Instructions'
+			)) );
+		}
+
+		function PrintMonthOptions($params)
+		{
+			$object =& $this->getObject($params);
+
+			$date = explode('/', $object->GetDBField($params['date_field_name']));
+			if (!$date || sizeof($date) != 2) {
+				$date=array("", "");
+			}
+			$o = '';
+			$params['name'] = $params['block'];
+			for ($i = 1; $i <= 12; $i++) {
+				$month_str = str_pad($i, 2, "0", STR_PAD_LEFT);
+				if ($date[0] == $month_str) {
+					$params['selected'] = ' selected';
+				}else {
+					$params['selected'] = '';
+				}
+
+				$params['mm'] = $month_str;
+				$o .= $this->Application->ParseBlock($params);
+			}
+			return $o;
+		}
+
+		function PrintYearOptions($params)
+		{
+			$object =& $this->getObject($params);
+			$value = $object->GetDBField( $params['field'] );
+
+			$block_params = $this->prepareTagParams($params);
+			$block_params['name'] = $this->SelectParam($params, 'render_as,block');
+
+			$o = '';
+			$this_year = adodb_date('y');
+
+			for($i = $this_year; $i <= $this_year + 10; $i++)
+			{
+				$year_str = str_pad($i, 2, '0', STR_PAD_LEFT);
+				$block_params['selected'] = ($value == $year_str) ? $params['selected'] : '';
+				$block_params['key'] = $year_str;
+				$block_params['option'] = $year_str;
+				$o .= $this->Application->ParseBlock($block_params);
+			}
+			return $o;
+		}
+
+		function PrintMyOrders($params)
+		{
+
+		}
+
+		/**
+		 * Checks, that order data can be editied based on it's status
+		 *
+		 * @param Array $params
+		 * @return bool
+		 */
+		function OrderEditable($params)
+		{
+			$id_field = $this->Application->getUnitOption($this->Prefix, 'IDField');
+			$table_name = $this->Application->getUnitOption($this->Prefix, 'TableName');
+
+			if ($this->Application->IsTempMode($this->Prefix, $this->Special)) {
+				$table_name = $this->Application->GetTempName($table_name, 'prefix:' . $this->Prefix);
+			}
+
+			// use direct select here (not $this->getObject) because this tag is used even before "combined_header" block is used
+			$sql = 'SELECT Status, PaymentType
+					FROM ' . $table_name . '
+					WHERE ' . $id_field . ' = ' . $this->Application->GetVar( $this->getPrefixSpecial() . '_id' );
+			$order_data = $this->Conn->GetRow($sql);
+
+			if (!$order_data) {
+				// when order data not found -> really impossible, because this tag is used only on order editing templates
+				return false;
+			}
+
+			switch ( $order_data['Status'] ) {
+				case ORDER_STATUS_INCOMPLETE:
+					$ret = true;
+					break;
+
+				case ORDER_STATUS_PENDING:
+				case ORDER_STATUS_BACKORDERS:
+					$sql = 'SELECT PlacedOrdersEdit
+							FROM ' . $this->Application->getUnitOption('pt', 'TableName') . '
+							WHERE ' . $this->Application->getUnitOption('pt', 'IDField') . ' = ' . $order_data['PaymentType'];
+					$ret = $this->Conn->GetOne($sql);
+					break;
+
+				default:
+					$ret = false;
+					break;
+			}
+
+			return $ret;
+		}
+
+		function CheckoutSteps($params)
+		{
+			$steps = explode(',', $params['steps']);
+			foreach ($steps as $key => $item)
+			{
+				$templates[$key] = trim($item);
+			}
+
+			$templates = explode(',', $params['templates']);
+			foreach ($templates as $key => $item)
+			{
+				$templates[$key] = trim($item);
+			}
+			$total_steps = count($templates);
+			$t = $this->Application->GetVar('t');
+
+			$o = '';
+			$block_params = array();
+			$i = 0;
+			$passed_current = preg_match("/".preg_quote($templates[count($templates)-1], '/')."/", $t);
+			foreach ($steps as $step => $name)
+			{
+				if (preg_match("/".preg_quote($templates[$step], '/')."/", $t)) {
+					$block_params['name'] = $this->SelectParam($params, 'current_step_render_as,block_current_step');
+					$passed_current = true;
+				}
+				else {
+					$block_params['name'] = $passed_current ? $this->SelectParam($params, 'render_as,block') : $this->SelectParam($params, 'passed_step_render_as,block_passed_step');
+				}
+				$block_params['title'] = $this->Application->Phrase($name);
+				$block_params['template'] = $templates[$i];
+				$block_params['template_link'] = $this->Application->HREF($templates[$step], '', Array('pass'=>'m'));
+				$block_params['next_step_template'] = isset($templates[$i + 1]) ? $templates[$i + 1] : '';
+				$block_params['number'] = $i + 1;
+				$i++;
+				$o.= $this->Application->ParseBlock($block_params, 1);
+			}
+			return $o;
+		}
+
+		function ShowOrder($params){
+
+			$order_params = $this->prepareTagParams($params);
+//			$order_params['Special'] = 'myorders';
+//			$order_params['PrefixSpecial'] = 'ord.myorders';
+			$order_params['name'] = $this->SelectParam($order_params, 'render_as,block');
+//			$this->Application->SetVar('ord.myorders_id', $this->Application->GetVar('ord_id'));
+
+			$object =& $this->getObject($params);
+			if (!$object->GetDBField('OrderId')) {
+				return;
+			}
+			return $this->Application->ParseBlock($order_params);
+		}
+
+		function BuildListSpecial($params)
+		{
+			if ($this->Special != '') {
+				return $this->Special;
+			}
+
+			$list_unique_key = $this->getUniqueListKey($params);
+			if ($list_unique_key == '') {
+				return parent::BuildListSpecial($params);
+			}
+
+			return crc32($list_unique_key);
+		}
+
+		function ListOrders($params){
+
+			$o = '';
+
+			$params['render_as'] = $params['item_render_as'];
+
+			$o_orders = $this->PrintList2($params);
+
+			if ($o_orders){
+
+				$orders_params = array('name' => $params['header_render_as']);
+				$o  = $this->Application->ParseBlock($orders_params);
+				$o .= $o_orders;
+
+			}else {
+				$orders_params = array('name' => $params['empty_myorders_render_as']);
+				$o = $this->Application->ParseBlock($orders_params);
+			}
+
+			return $o;
+
+		}
+
+		function HasRecentOrders($params)
+		{
+			$per_page = $this->SelectParam($params, 'per_page,max_items');
+			if ($per_page !== false) {
+				$params['per_page'] = $per_page;
+			}
+
+			return (int)$this->TotalRecords($params) > 0 ? 1 : 0;
+		}
+
+		function ListOrderItems($params)
+		{
+			$prefix_special = rtrim('orditems.'.$this->Special, '.');
+			return $this->Application->ProcessParsedTag($prefix_special, 'PrintList', 	array_merge($params, Array(
+					'per_page' => -1
+			)) );
+		}
+
+
+		function OrdersLink(){
+			$params['pass']='m,ord';
+			$main_processor =& $this->Application->RecallObject('m_TagProcessor');
+			return $main_processor->Link($params);
+		}
+
+
+
+		function PrintAddresses($params)
+		{
+			$object =& $this->getObject($params);
+
+			$address_list =& $this->Application->recallObject('addr','addr_List', Array('per_page'=>-1, 'skip_counting'=>true) );
+			$address_list->Query();
+
+			$address_id = $this->Application->GetVar($params['type'].'_address_id');
+			if (!$address_id) {
+				$sql = 'SELECT '.$address_list->IDField.'
+						FROM '.$address_list->TableName.'
+						WHERE PortalUserId = '.$object->GetDBField('PortalUserId').' AND LastUsedAs'.ucfirst($params['type']).' = 1';
+				$address_id = (int)$this->Conn->GetOne($sql);
+			}
+
+			$ret = '';
+			$block_params = $this->prepareTagParams($params);
+			$block_params['name'] = $this->SelectParam($params, 'render_as,block');
+
+			$address_list->GoFirst();
+			while (!$address_list->EOL()) {
+
+				$selected = ($address_list->GetID() == $address_id);
+				if ($selected && $address_list->GetDBField('IsProfileAddress')) {
+					$this->Application->SetVar($this->Prefix.'_IsProfileAddress', true);
+				}
+
+				$block_params['key'] = $address_list->GetID();
+				$block_params['value'] = $address_list->GetDBField('ShortAddress');
+				$block_params['selected'] = $selected ? ' selected="selected"' : '';
+
+				$ret .= $this->Application->ParseBlock($block_params, 1);
+				$address_list->GoNext();
+			}
+
+			return $ret;
+		}
+
+		function PrefillRegistrationFields($params)
+		{
+			if( $this->Application->GetVar('fields_prefilled') ) return false;
+
+			$order_prefix = $params['type'] == 'billing' ? 'Billing' : 'Shipping';
+			$order_fields = Array('To','Company','Phone','Fax','Email','Address1','Address2','City','State','Zip','Country');
+			$user =& $this->Application->recallObject('u.current');
+
+			$order_id = $this->Application->RecallVar('front_order_id');
+			if($order_id) $this->Application->SetVar( $this->getPrefixSpecial().'_id', $order_id );
+			$order =& $this->getObject($params);
+
+			$names = explode(' ', $order->GetDBField($order_prefix.'To'), 2);
+			if(!$user->GetDBField('FirstName')) $user->SetDBField('FirstName', getArrayValue($names, 0) );
+			if(!$user->GetDBField('LastName')) $user->SetDBField('LastName', getArrayValue($names, 1) );
+			if(!$user->GetDBField('Company')) $user->SetDBField('Company', $order->GetDBField($order_prefix.'Company') );
+			if(!$user->GetDBField('Phone')) $user->SetDBField('Phone', $order->GetDBField($order_prefix.'Phone') );
+			if(!$user->GetDBField('Fax')) $user->SetDBField('Fax', $order->GetDBField($order_prefix.'Fax') );
+			if(!$user->GetDBField('Email')) $user->SetDBField('Email', $order->GetDBField($order_prefix.'Email') );
+			if(!$user->GetDBField('Street')) $user->SetDBField('Street', $order->GetDBField($order_prefix.'Address1') );
+			if(!$user->GetDBField('Street2')) $user->SetDBField('Street2', $order->GetDBField($order_prefix.'Address2') );
+			if(!$user->GetDBField('City')) $user->SetDBField('City', $order->GetDBField($order_prefix.'City') );
+			if(!$user->GetDBField('State')) $user->SetDBField('State', $order->GetDBField($order_prefix.'State') );
+			if(!$user->GetDBField('Zip')) $user->SetDBField('Zip', $order->GetDBField($order_prefix.'Zip') );
+			if(!$user->GetDBField('Country')) $user->SetDBField('Country', $order->GetDBField($order_prefix.'Country') );
+
+			$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+			$cs_helper->PopulateStates( new kEvent('u:OnBuild') , 'State', 'Country');
+		}
+
+		function UserLink($params)
+		{
+			$object =& $this->getObject($params);
+			$user_id = $object->GetDBField( $params['user_field'] );
+
+			if ($user_id) {
+				$url_params =  Array (
+					'm_opener' => 'd',
+					'u_mode' => 't',
+					'u_event' => 'OnEdit',
+					'u_id' => $user_id,
+					'pass' => 'all,u',
+					'no_pass_through' => 1,
+				);
+
+				return $this->Application->HREF($params['edit_template'], '', $url_params);
+			}
+		}
+
+		function UserFound($params)
+		{
+			$virtual_users = Array(-1,-2, 0);
+			$object =& $this->getObject($params);
+			return !in_array( $object->GetDBField( $params['user_field'] ) , $virtual_users );
+		}
+
+		/**
+		 * Returns a link for editing order
+		 *
+		 * @param Array $params
+		 * @return string
+		 */
+		function OrderLink($params)
+		{
+			$object =& $this->getObject($params);
+
+			$url_params = Array (
+				'm_opener' => 'd',
+				$this->Prefix.'_mode' => 't',
+				$this->Prefix.'_event' => 'OnEdit',
+				$this->Prefix.'_id' => $object->GetID(),
+				'pass' => 'all,'.$this->Prefix,
+				'no_pass_through' => 1,
+			);
+
+			return $this->Application->HREF($params['edit_template'], '', $url_params);
+		}
+
+		function HasOriginalAmount($params)
+		{
+			$object =& $this->getObject($params);
+			$original_amount = $object->GetDBField('OriginalAmount');
+			return $original_amount && ($original_amount != $object->GetDBField('TotalAmount') );
+		}
+
+		/**
+		 * Returns true, when order has tangible items
+		 *
+		 * @param Array $params
+		 * @return bool
+		 *
+		 * @todo This is copy from OrdersItem::HasTangibleItems. Copy to helper (and create it) and use here.
+		 */
+		function OrderHasTangibleItems($params)
+		{
+			$object =& $this->getObject($params);
+
+			$sql = 'SELECT COUNT(*)
+					FROM '.TABLE_PREFIX.'OrderItems orditems
+					LEFT JOIN '.TABLE_PREFIX.'Products p ON p.ProductId = orditems.ProductId
+					WHERE (orditems.OrderId = '.$object->GetID().') AND (p.Type = '.PRODUCT_TYPE_TANGIBLE.')';
+			return $this->Conn->GetOne($sql) ? true : false;
+		}
+
+		function ShipmentsExists($params)
+		{
+			return $this->Application->GetVar('ShipmentsExists') ? 1 : 0;
+		}
+
+		function Field($params)
+		{
+			$value = parent::Field($params);
+			$field = $this->SelectParam($params,'name,field');
+			if( ($field == 'PaymentAccount') && getArrayValue($params,'masked') )
+			{
+				$value = str_repeat('X',12).substr($value,-4);
+			}
+			return $value;
+		}
+
+		function CartHasError($params)
+		{
+			return $this->Application->GetVar('checkout_error') > 0;
+		}
+
+		function CheckoutError($params)
+		{
+			$error_codes = Array (
+				1 => 'state_changed',
+				2 => 'qty_unavailable',
+				3 => 'outofstock',
+				4 => 'invalid_code',
+				5 => 'code_expired',
+				6 => 'min_qty',
+				7 => 'code_removed',
+				8 => 'code_removed_automatically',
+				9 => 'changed_after_login',
+				10 => 'coupon_applied',
+				104 => 'invalid_gc_code',
+				105 => 'gc_code_expired',
+				107 => 'gc_code_removed',
+				108 => 'gc_code_removed_automatically',
+				110 => 'gift_certificate_applied',
+			);
+
+			$error_param = $error_codes[ $this->Application->GetVar('checkout_error') ];
+			return $this->Application->Phrase($params[$error_param]);
+		}
+
+		function GetFormAction($params)
+		{
+			$object =& $this->getObject($params);
+			/* @var $object OrdersItem */
+
+			$gw_data = $object->getGatewayData($params['payment_type_id']);
+
+			$this->Application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
+			$gateway_object =& $this->Application->recallObject( $gw_data['ClassName'] );
+			/* @var $gateway_object kGWBase */
+
+			return $gateway_object->getFormAction($gw_data['gw_params']);
+		}
+
+		function GetFormHiddenFields($params)
+		{
+			$object =& $this->getObject($params);
+			/* @var $object OrdersItem */
+
+			$gw_data = $object->getGatewayData(array_key_exists('payment_type_id', $params) ? $params['payment_type_id'] : null);
+
+			$this->Application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
+			$gateway_object =& $this->Application->recallObject( $gw_data['ClassName'] );
+
+			$tpl = '<input type="hidden" name="%s" value="%s" />'."\n";
+			$hidden_fields = $gateway_object->getHiddenFields($object->FieldValues, $params, $gw_data['gw_params']);
+
+			$ret = '';
+			if (!is_array($hidden_fields)) {
+				return $hidden_fields;
+			}
+			foreach($hidden_fields as $hidden_name => $hidden_value)
+			{
+				$ret .= sprintf($tpl, $hidden_name, $hidden_value);
+			}
+			return $ret;
+		}
+
+		function NeedsPlaceButton($params)
+		{
+			$object =& $this->getObject($params);
+			$gw_data = $object->getGatewayData();
+
+			$this->Application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
+			$gateway_object =& $this->Application->recallObject( $gw_data['ClassName'] );
+
+			return $gateway_object->NeedPlaceButton($object->FieldValues, $params, $gw_data['gw_params']);
+		}
+
+		function HasGatewayError($params)
+		{
+			return $this->Application->RecallVar('gw_error');
+		}
+
+		function ShowGatewayError($params)
+		{
+			$ret = $this->Application->RecallVar('gw_error');
+			$this->Application->RemoveVar('gw_error');
+			return $ret;
+		}
+
+		function ShippingType($params)
+		{
+			$object =& $this->getObject($params);
+			$shipping_info = unserialize( $object->GetDBField('ShippingInfo') );
+			if (count($shipping_info) > 1) {
+				return $this->Application->Phrase('lu_MultipleShippingTypes');
+			}
+			$shipping_info = array_shift($shipping_info);
+			return $shipping_info['ShippingName'];
+		}
+
+		function DiscountHelpLink($params)
+		{
+			$params['pass'] = 'all,orditems';
+			$params['m_cat_id'] = 0;
+			$m_tag_processor =& $this->Application->recallObject('m_TagProcessor');
+			return $m_tag_processor->Link($params);
+		}
+
+		function DiscountField($params)
+		{
+			$orditems =& $this->Application->recallObject( 'orditems' );
+			$item_data = $orditems->GetDBField('ItemData');
+			if(!$item_data) return '';
+			$item_data = unserialize($item_data);
+			$discount_prefix = ($item_data['DiscountType'] == 'coupon') ? 'coup' : 'd';
+
+			$discount =& $this->Application->recallObject($discount_prefix, null, Array('skip_autoload' => true));
+			if(!$discount->isLoaded())
+			{
+				$discount->Load($item_data['DiscountId']);
+			}
+			return $discount->GetField( $this->SelectParam($params, 'field,name') );
+		}
+
+		function HasDiscount($params)
+		{
+			$object =& $this->getObject($params);
+			return (float)$object->GetDBField('DiscountTotal') ? 1 : 0;
+		}
+
+		/**
+		 * Allows to check if required product types are present in order
+		 *
+		 * @param Array $params
+		 */
+		function HasProductType($params)
+		{
+			$product_types = Array('tangible' => 1, 'subscription' => 2, 'service' => 3, 'downloadable' => 4, 'package' => 5, 'gift' => 6);
+			$object =& $this->getObject($params);
+
+			$sql = 'SELECT COUNT(*)
+					FROM '.TABLE_PREFIX.'OrderItems oi
+					LEFT JOIN '.TABLE_PREFIX.'Products p ON p.ProductId = oi.ProductId
+					WHERE (oi.OrderId = '.$object->GetID().') AND (p.Type = '.$product_types[ $params['type'] ].')';
+			return $this->Conn->GetOne($sql);
+		}
+
+		function PrintSerializedFields($params)
+		{
+			$object =& $this->getObject($params);
+			$field = $this->SelectParam($params, 'field');
+			if (!$field) $field = $this->Application->GetVar('field');
+			$data = unserialize($object->GetDBField($field));
+
+			$o = '';
+			$block_params['name'] = $params['render_as'];
+			foreach ($data as $field => $value) {
+				$block_params['field'] = $field;
+				$block_params['value'] = $value;
+				$o .= $this->Application->ParseBlock($block_params);
+			}
+			return $o;
+		}
+
+		function OrderProductEmail($params)
+		{
+			$order =& $this->Application->recallObject('ord');
+			$orditems =& $this->Application->recallObject('orditems');
+
+			$sql = 'SELECT ResourceId
+					FROM '.TABLE_PREFIX.'Products
+					WHERE ProductId = '.$orditems->GetDBField('ProductId');
+			$resource_id = $this->Conn->GetOne($sql);
+
+			$ml_formatter =& $this->Application->recallObject('kMultiLanguage');
+			$custom_fields = $this->Application->getUnitOption('p', 'CustomFields');
+			$custom_name = $ml_formatter->LangFieldName('cust_'.array_search($params['msg_custom_field'], $custom_fields));
+
+			$sql = 'SELECT '.$custom_name.'
+					FROM '.$this->Application->getUnitOption('p-cdata', 'TableName').'
+					WHERE ResourceId = '.$resource_id;
+			$message_template = $this->Conn->GetOne($sql);
+
+			if (!$message_template || trim($message_template) == '') {
+				// message template missing
+				return ;
+			}
+
+			$from_name = strip_tags($this->Application->ConfigValue('Site_Name'));
+			$from_email = $this->Application->ConfigValue('Smtp_AdminMailFrom');
+
+			$to_name = $order->GetDBField('BillingTo');
+			$to_email = $order->GetDBField('BillingEmail');
+			if (!$to_email) {
+				// billing email is empty, then use user's email
+				$sql = 'SELECT Email
+						FROM '.$this->Application->getUnitOption('u', 'TableName').'
+						WHERE PortalUserId = '.$order->GetDBField('PortalUserId');
+				$to_email = $this->Conn->GetOne($sql);
+			}
+
+			$esender =& $application->recallObject('EmailSender.-product');
+			/* @var $esender kEmailSendingHelper */
+
+			$esender->SetFrom($from_email, $from_name);
+			$esender->AddTo($to_email, $to_name);
+
+			$email_events_eh =& $this->Application->recallObject('emailevents_EventHandler');
+			/* @var $email_events_eh EmailEventsEventsHandler */
+
+			list ($message_headers, $message_body) = $email_events_eh->ParseMessageBody($message_template, Array());
+			if (!trim($message_body)) {
+				// message body missing
+				return false;
+			}
+
+			foreach ($message_headers as $header_name => $header_value) {
+				$esender->SetEncodedHeader($header_name, $header_value);
+			}
+
+			$esender->SetHTML($message_body);
+			$esender->Deliver();
+		}
+
+		function PrintTotals($params)
+		{
+			$order =& $this->getObject($params);
+
+			$totals = array();
+			if (ABS($order->GetDBField('SubTotal') - $order->GetDBField('AmountWithoutVAT')) > 0.01) {
+				$totals[] = 'products';
+			}
+
+			$has_tangible = $this->OrderHasTangibleItems($params);
+
+			if ($has_tangible && $order->GetDBField('ShippingTaxable')) {
+				$totals[] = 'shipping';
+			}
+
+			if ($order->GetDBField('ProcessingFee') > 0 && $order->GetDBField('ProcessingTaxable')) {
+				$totals[] = 'processing';
+			}
+
+			if ($order->GetDBField('ReturnTotal') > 0 && $order->GetDBField('ReturnTotal')) {
+				$totals[] = 'return';
+			}
+
+			$totals[] = 'sub_total';
+
+			if ($order->GetDBField('VAT') > 0) {
+				$totals[] = 'vat';
+			}
+
+			if ($has_tangible && !$order->GetDBField('ShippingTaxable')) {
+				$totals[] = 'shipping';
+			}
+
+			if ($order->GetDBField('ProcessingFee') > 0 && !$order->GetDBField('ProcessingTaxable')) {
+				$totals[] = 'processing';
+			}
+
+
+			$o = '';
+			foreach ($totals as $type)
+			{
+				if ($element = getArrayValue($params, $type.'_render_as')) {
+					$o .= $this->Application->ParseBlock( array('name' => $element), 1 );
+				}
+			}
+			return $o;
+		}
+
+		function ShowDefaultAddress($params)
+		{
+			$address_type = ucfirst($params['type']);
+			if ($this->Application->GetVar('check_'.strtolower($address_type).'_address')) {
+				// form type doesn't match check type, e.g. shipping check on billing form
+				return '';
+			}
+
+			// for required field highlighting on form when no submit made
+			$this->Application->SetVar('check_'.strtolower($address_type).'_address', 'true');
+			/*if ((strtolower($address_type) == 'billing') && $this->UsingCreditCard($params)) {
+				$this->Application->SetVar('check_credit_card', 'true');
+			}*/
+
+			$this->Application->HandleEvent(new kEvent('ord:SetStepRequiredFields'));
+
+			$user_id = $this->Application->RecallVar('user_id');
+			$sql = 'SELECT AddressId
+					FROM '.TABLE_PREFIX.'Addresses
+					WHERE PortalUserId = '.$user_id.' AND LastUsedAs'.$address_type.' = 1';
+			$address_id = $this->Conn->GetOne($sql);
+			if (!$address_id) {
+				return '';
+			}
+
+			$addr_list =& $this->Application->recallObject('addr', 'addr_List', Array('per_page'=>-1, 'skip_counting'=>true) );
+			$addr_list->Query();
+
+			$object =& $this->getObject();
+			if (!$addr_list->CheckAddress($object->FieldValues, $address_type)) {
+				$addr_list->CopyAddress($address_id, $address_type);
+			}
+		}
+
+		function IsProfileAddress($params)
+		{
+			$object =& $this->getObject($params);
+			$address_type = ucfirst($params['type']);
+			return $object->IsProfileAddress($address_type);
+		}
+
+		function HasPayPalSubscription($params)
+		{
+			$object =& $this->getObject($params);
+
+			$sql = 'SELECT COUNT(*)
+					FROM '.TABLE_PREFIX.'OrderItems oi
+					LEFT JOIN '.TABLE_PREFIX.'Products p ON p.ProductId = oi.ProductId
+					WHERE (oi.OrderId = '.$object->GetID().') AND (p.PayPalRecurring = 1)';
+			return $this->Conn->GetOne($sql);
+
+		}
+
+		function GetPayPalSubscriptionForm($params)
+		{
+			$object =& $this->getObject($params);
+			$gw_data = $object->getGatewayData($params['payment_type_id']);
+
+			$this->Application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
+			$gateway_object =& $this->Application->recallObject( $gw_data['ClassName'] );
+
+
+			$sql = 'SELECT oi.*
+					FROM '.TABLE_PREFIX.'OrderItems oi
+					LEFT JOIN '.TABLE_PREFIX.'Products p ON p.ProductId = oi.ProductId
+					WHERE (oi.OrderId = '.$object->GetID().') AND (p.PayPalRecurring = 1)';
+			$order_item = $this->Conn->GetRow($sql);
+			$order_item_data =  unserialize($order_item['ItemData']);
+
+			$cycle = ceil($order_item_data['Duration'] / 86400);
+			$cycle_units = 'D';
+
+			$item_data = $object->FieldValues;
+			$item_data['item_name'] = $order_item['ProductName'];
+			$item_data['item_number'] = $order_item['OrderItemId'];
+			$item_data['custom'] = $order_item['OrderId'];
+			$item_data['a1'] = '';
+			$item_data['p1'] = '';
+			$item_data['t1'] = '';
+			$item_data['a2'] = '';
+			$item_data['p2'] = '';
+			$item_data['t2'] = '';
+			$item_data['a3'] = $order_item['Price']; //rate
+			$item_data['p3'] = $cycle; //cycle
+			$item_data['t3'] = $cycle_units; //cycle units D (days), W (weeks), M (months), Y (years)
+			$item_data['src'] = '1'; // Recurring payments. If set to 1, the payment will recur unless your customer cancels the subscription before the end of the billing cycle.
+			$item_data['sra'] = '1'; // Reattempt on failure. If set to 1, and the payment fails, the payment will be reattempted two more times. After the third failure, the subscription will be cancelled.
+			$item_data['srt'] = ''; // Recurring Times. This is the number of payments which will occur at the regular rate.
+
+			$hidden_fields = $gateway_object->getSubscriptionFields($item_data, $params, $gw_data['gw_params']);
+
+			$ret = '';
+			if (!is_array($hidden_fields)) {
+				return $hidden_fields;
+			}
+			$tpl = '<input type="hidden" name="%s" value="%s" />'."\n";
+			foreach($hidden_fields as $hidden_name => $hidden_value)
+			{
+				$ret .= sprintf($tpl, $hidden_name, $hidden_value);
+			}
+			return $ret;
+		}
+
+		function UserHasPendingOrders($params)
+		{
+			$sql = 'SELECT OrderId FROM '.$this->Application->getUnitOption($this->Prefix, 'TableName').'
+							WHERE PortalUserId = '.$this->Application->RecallVar('user_id').'
+							AND Status = '.ORDER_STATUS_PENDING;
+			return $this->Conn->GetOne($sql) ? 1 : 0;
+		}
+
+		function AllowAddAddress($params)
+		{
+			$user =& $this->Application->recallObject('u.current');
+
+			if ($user->GetDBField('cust_shipping_addr_block')) return false;
+
+			$address_list =& $this->Application->recallObject('addr','addr_List', Array('per_page'=>-1, 'skip_counting'=>true) );
+			$address_list->Query();
+
+			$max = $this->Application->ConfigValue('MaxAddresses');
+
+			return $max <= 0 ? true : $address_list->RecordsCount < $max;
+		}
+
+		function FreePromoShippingAvailable($params)
+		{
+			$object =& $this->Application->recallObject('orditems');
+			$free_ship = $object->GetDBField('MinQtyFreePromoShipping');
+			$tangible = ($object->GetDBField('Type') == 1)? 1 : 0;
+			return ($tangible && ($free_ship > 0 && $free_ship <= $object->GetDBField('Quantity')))? 1 : 0;
+		}
+
+		/**
+		 * Creates link for removing coupon or gift certificate
+		 *
+		 * @param Array $params
+		 * @return string
+		 */
+		function RemoveCouponLink($params)
+		{
+			$type = strtolower($params['type']);
+			$url_params = Array (
+				'pass' => 'm,ord',
+				'ord_event' => ($type == 'coupon') ? 'OnRemoveCoupon' : 'OnRemoveGiftCertificate',
+				'm_cat_id' => 0,
+			);
+
+			return $this->Application->HREF('', '', $url_params);
+		}
+
+		/**
+		 * Calculates total weight of items in shopping cart
+		 *
+		 * @param Array $params
+		 * @return float
+		 */
+		function TotalOrderWeight($params)
+		{
+			$object =& $this->getObject();
+			/* @var $object kDBItem */
+
+			$sql = 'SELECT SUM( IF(oi.Weight IS NULL, 0, oi.Weight * oi.Quantity) )
+					FROM '.TABLE_PREFIX.'OrderItems oi
+					WHERE oi.OrderId = '.$object->GetID();
+			$total_weight = $this->Conn->GetOne($sql);
+
+			if ($total_weight == '') {
+				// zero weight -> return text about it
+				return $this->Application->Phrase('lu_NotAvailable');
+			}
+
+			$regional =& $this->Application->recallObject('lang.current');
+
+			switch ($regional->GetDBField('UnitSystem')) {
+				case 1:
+					// metric system -> add kg sign
+					$total_weight .= ' '.$this->Application->Phrase('lu_kg');
+					break;
+
+				case 2:
+					// uk system -> convert to pounds
+					list($pounds, $ounces) = Kg2Pounds($total_weight);
+					$total_weight = $pounds.' '.$this->Application->Phrase('lu_pounds').' '.$ounces.' '.$this->Application->Phrase('lu_ounces');
+					break;
+			}
+
+			return $total_weight;
+		}
+
+		function InitCatalogTab($params)
+		{
+			$tab_params['mode'] = $this->Application->GetVar('tm'); // single/multi selection possible
+			$tab_params['special'] = $this->Application->GetVar('ts'); // use special for this tab
+			$tab_params['dependant'] = $this->Application->GetVar('td'); // is grid dependant on categories grid
+
+			// set default params (same as in catalog)
+			if ($tab_params['mode'] === false) $tab_params['mode'] = 'multi';
+			if ($tab_params['special'] === false) $tab_params['special'] = '';
+			if ($tab_params['dependant'] === false) $tab_params['dependant'] = 'yes';
+
+			// pass params to block with tab content
+			$params['name'] = $params['render_as'];
+			$params['prefix'] = trim($this->Prefix.'.'.($tab_params['special'] ? $tab_params['special'] : $this->Special), '.');
+			$params['cat_prefix'] = trim('c.'.($tab_params['special'] ? $tab_params['special'] : $this->Special), '.');
+			$params['tab_mode'] = $tab_params['mode'];
+			$params['grid_name'] = ($tab_params['mode'] == 'multi') ? $params['default_grid'] : $params['radio_grid'];
+			$params['tab_dependant'] = $tab_params['dependant'];
+			$params['show_category'] = $tab_params['special'] == 'showall' ? 1 : 0; // this is advanced view -> show category name
+
+			return $this->Application->ParseBlock($params, 1);
+		}
+
+		/**
+		 * Checks if required payment method is available
+		 *
+		 * @param Array $params
+		 * @return bool
+		 */
+		function HasPaymentGateway($params)
+		{
+			static $payment_types = Array ();
+
+			$gw_name = $params['name'];
+			if (!array_key_exists($gw_name, $payment_types)) {
+				$sql = 'SELECT pt.PaymentTypeId, pt.PortalGroups
+						FROM '.TABLE_PREFIX.'PaymentTypes pt
+						LEFT JOIN '.TABLE_PREFIX.'Gateways g ON pt.GatewayId = g.GatewayId
+						WHERE (g.Name = '.$this->Conn->qstr($params['name']).') AND (pt.Status = '.STATUS_ACTIVE.')';
+				$payment_types[$gw_name] = $this->Conn->GetRow($sql);
+			}
+
+			if (!$payment_types[$gw_name]) {
+				return false;
+			}
+
+			$pt_groups = explode(',', substr($payment_types[$gw_name]['PortalGroups'], 1, -1));
+			$user_groups = explode(',', $this->Application->RecallVar('UserGroups'));
+
+			return array_intersect($user_groups, $pt_groups) ? $payment_types[$gw_name]['PaymentTypeId'] : false;
+		}
+
+		function DisplayPaymentGateway($params)
+		{
+			$payment_type_id = $this->HasPaymentGateway($params);
+			if (!$payment_type_id) {
+				return '';
+			}
+
+			$object =& $this->getObject($params);
+			/* @var $object OrdersItem */
+
+			$gw_data = $object->getGatewayData($payment_type_id);
+
+			$block_params = $gw_data['gw_params'];
+			$block_params['name'] = $params['render_as'];
+			$block_params['payment_type_id'] = $payment_type_id;
+
+			return $this->Application->ParseBlock($block_params);
+		}
+
+		/**
+		 * Checks, that USPS returned valid label
+		 *
+		 * @param Array $params
+		 * @return bool
+		 */
+		function USPSLabelFound($params)
+		{
+			$object =& $this->getObject($params);
+			/* @var $object kDBItem */
+
+			$full_path = USPS_LABEL_FOLDER . $object->GetDBField( $params['field'] ) . '.pdf';
+
+			return file_exists($full_path) && is_file($full_path);
+		}
+
+		/**
+		 * Prints USPS errors from session
+		 *
+		 * @param Array $params
+		 * @return string
+		 */
+		function PrintUSPSErrors($params)
+		{
+			$o = '';
+			$ses_usps_erros = Array();
+			$ses_usps_erros = unserialize($this->Application->RecallVar('usps_errors'));
+			if ( count($ses_usps_erros) > 0 && is_array($ses_usps_erros)) {
+				foreach ( $ses_usps_erros as $order_number => $error_description ) {
+					$block_params = Array();
+					$block_params['name'] = $params['render_as'];
+					$block_params['order_number'] = $order_number;
+					$block_params['error_description'] = $error_description;
+					$o.=$this->Application->ParseBlock($block_params, 1);
+				}
+				$this->Application->RemoveVar('usps_errors');
+			}
+
+			return $o;
+		}
+
+	}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/orders/orders_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.53.2.21
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_tag_processor.php
===================================================================
--- branches/5.1.x/in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_tag_processor.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_tag_processor.php	(revision 12131)
@@ -0,0 +1,104 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class AffiliatePlansBracketsTagProcessor extends kDBTagProcessor {
+	
+	
+	/*function Product_ListPriceBrackets($params)
+	{
+		return $this->PrintList2($params);
+	}*/
+	
+	function Field($params)
+	{
+		$value = parent::Field($params);
+		if ( ($params['field'] == 'FromAmount' || $params['name'] == 'ToAmount') && $value == -1)
+			$value = '&infin;';
+		return $value;
+	}
+	
+	function ShowPricingForm($params)
+	{
+		$br_object =& $this->Application->recallObject( $this->getPrefixSpecial() );
+		
+		$br_data = $this->Application->GetVar( $this->getPrefixSpecial(true) );
+		$linked_info = $br_object->getLinkedInfo($this->Special);
+		
+		if(!$br_data)
+		{
+			$sql = 	'SELECT * FROM '.$br_object->TableName.' WHERE '.$linked_info['ParentTableKey'].' = '.$linked_info['ParentId'];
+			$brackets = $this->Conn->Query($sql, $br_object->IDField);
+			
+			usort($brackets, 'ap_bracket_comp');
+		
+			$br_data = $brackets;
+			$this->Application->SetVar($this->getPrefixSpecial(true), $brackets);
+		}
+		else 
+		{
+			usort($br_data , 'ap_bracket_comp');
+		}
+		
+		$ret = '';
+		if( is_array($br_data) )
+		{
+
+			$block_params = $this->prepareTagParams($params);
+			$block_params['IdField'] = $br_object->IDField;
+			$block_params['name'] = $params['block'];
+			$first = true;
+			
+			$main_object =& $this->Application->recallObject($linked_info['ParentPrefix'].'.'.$this->Special);
+			$plan_type = $main_object->GetDBField('PlanType');
+			$limits_format = ($plan_type == 2) ? '%d' : $br_object->Fields['FromAmount']['format'];
+			
+			// this is needed to find next id
+			$br_data_copy = $br_data;
+			foreach($br_data as $id => $values)
+			{
+				
+				foreach($values as $value_key => $value_val)
+				{
+					$block_params[$value_key] = $value_val;
+				}
+				reset($values);
+				
+				next($br_data_copy);
+				$next_bracket = current($br_data_copy);
+				
+				$values['FromAmount'] = sprintf($limits_format, $values['FromAmount']);
+				$values['ToAmount'] = sprintf($limits_format, $values['ToAmount']);
+
+				$block_params['id']	= $values[$br_object->IDField];
+				$block_params['min'] = ($id == -1) ? ($values['FromAmount'] ? $values['FromAmount'] : 0) : $values['FromAmount'];
+				$block_params['max'] = ($values['ToAmount'] == -1) ? '&infin;' : $values['ToAmount'];
+				$block_params['next_min_id'] = $next_bracket[$br_object->IDField];
+
+				if($first)
+				{
+					$block_params['first'] = 1;
+					$first = false;
+				}
+				else 
+				{
+					$block_params['first'] = 0;
+				}
+				$ret .= $this->Application->ParseBlock($block_params, 1);
+			}
+		}
+		return $ret;
+	}
+	
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_event_handler.php	(revision 12131)
@@ -0,0 +1,103 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class AffiliatePlansBracketsEventHandler extends kDBEventHandler {
+
+	/**
+	 * Allows to override standart permission mapping
+	 *
+	 */
+	function mapPermissions()
+	{
+		parent::mapPermissions();
+		$permissions = Array(
+								'OnMoreBrackets'	=>	Array('subitem' => 'add|edit'),
+								'OnInfinity'		=>	Array('subitem' => 'add|edit'),
+								'OnArrange'			=>	Array('subitem' => 'add|edit'),
+						);
+		$this->permMapping = array_merge($this->permMapping, $permissions);
+	}
+
+	/**
+	 * Adds additional 5 empty brackets
+	 *
+	 * @param kEvent $event
+	 */
+	function OnMoreBrackets(&$event)
+	{
+		$event->redirect = false;
+
+		$brackets_helper =& $this->Application->recallObject('BracketsHelper');
+		$brackets_helper->InitHelper('FromAmount', 'ToAmount', Array('Percent' => '') );
+		$brackets_helper->OnMoreBrackets($event);
+	}
+
+	/**
+	 * Arrange brackets
+	 *
+	 * @param kEvent $event
+	 */
+	function OnArrange(&$event)
+	{
+		$event->redirect = false;
+		$brackets_helper =& $this->Application->recallObject('BracketsHelper');
+		$brackets_helper->InitHelper('FromAmount', 'ToAmount', Array('Percent' => '') );
+
+		$brackets_helper->arrangeBrackets($event);
+		$event->CallSubEvent('OnPreSaveBrackets');
+	}
+
+	/**
+	 * Arrange infinity brackets
+	 *
+	 * @param kEvent $event
+	 */
+	function OnInfinity(&$event)
+	{
+		$event->redirect = false;
+		$brackets_helper =& $this->Application->recallObject('BracketsHelper');
+		$brackets_helper->InitHelper('FromAmount', 'ToAmount', Array('Percent' => '') );
+		$brackets_helper->arrangeBrackets($event);
+
+		$event->CallSubEvent('OnPreSaveBrackets');
+
+		$brackets_helper->OnInfinity($event);
+
+		$event->CallSubEvent('OnPreSaveBrackets');
+	}
+
+	function OnBeforeItemUpdate(&$event)
+	{
+		$object =& $event->getObject();
+		$linked_info = $object->getLinkedInfo();
+		$object->SetDBField($linked_info['ParentTableKey'], $linked_info['ParentId']);
+
+		$brackets_helper =& $this->Application->recallObject('BracketsHelper');
+		$brackets_helper->InitHelper('FromAmount', 'ToAmount', Array('Percent' => '') );
+		$brackets_helper->replaceInfinity($event);
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnPreSaveBrackets(&$event)
+	{
+		$brackets_helper =& $this->Application->recallObject('BracketsHelper');
+		$brackets_helper->InitHelper('FromAmount', 'ToAmount', Array('Percent' => '') );
+		$brackets_helper->OnPreSaveBrackets($event);
+	}
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_config.php	(revision 12131)
@@ -0,0 +1,64 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+$config	=	Array(
+					'Prefix'			=>	'apbrackets',
+					'ItemClass'			=>	Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'AffiliatePlansBracketsEventHandler','file'=>'affiliate_plans_brackets_event_handler.php','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'AffiliatePlansBracketsTagProcessor','file'=>'affiliate_plans_brackets_tag_processor.php','build_event'=>'OnBuild'),
+					'AutoLoad'			=>	true,
+					
+					'Hooks'				=>	Array( 
+												Array(
+													'Mode' => hBEFORE,
+													'Conditional' => true,
+													'HookToPrefix' => '#PARENT#',
+													'HookToSpecial' => '',
+													'HookToEvent' => Array('OnPreSave'),
+													'DoPrefix' => '',
+													'DoSpecial' => '',
+													'DoEvent' => 'OnArrange',
+												),
+											),
+											
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'Page',
+												3	=>	'event',
+											),
+					'IDField'			=>	'AffiliateBracketId',
+					
+					'TableName'			=>	TABLE_PREFIX.'AffiliatePlansBrackets',
+					
+					'ListSQLs'			=>	Array(	''=>'SELECT * FROM %s'),
+																		 
+					'ItemSQLs'			=>	Array(	''=>'SELECT * FROM %s'),
+					
+					'ForeignKey'		=>	'AffiliatePlanId',
+					'ParentTableKey'	=>	'AffiliatePlanId',
+					'ParentPrefix' 		=>	'ap',
+					'AutoDelete'		=>	true,
+					'AutoClone'			=>	true,
+										
+					'Fields' => Array(
+							            'AffiliateBracketId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
+							            'AffiliatePlanId' => Array('type' => 'int','not_null' => 1, 'default' => 0),
+							            'FromAmount' => Array('type' => 'double', 'formatter'=>'kFormatter', 'format'=>'%.02f', 'not_null' => '1','default' => '0'),
+							            'ToAmount' => Array('type' => 'double', 'formatter'=>'kFormatter', 'format'=>'%.02f', 'not_null' => '1','default' => '0'),
+							            'Percent' => Array('type' => 'double','not_null' => '1','default' => '0.00'),
+								),
+
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/affiliate_plans_brackets/affiliate_plans_brackets_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.7
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/currencies/currencies_tag_processor.php
===================================================================
--- branches/5.1.x/in-commerce/units/currencies/currencies_tag_processor.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/currencies/currencies_tag_processor.php	(revision 12131)
@@ -0,0 +1,79 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class CurrenciesTagProcessor extends kDBTagProcessor {
+
+	function DisableUnusedWarning($params)
+	{
+		$saved_ids = $this->Application->RecallVar('saved_curr_ids');			// when saving currency(-ies)
+		$check_all = $this->Application->RecallVar('check_unused_currencies');	// when saving payment type
+		$ret = '';
+		if($saved_ids || $check_all)
+		{
+			$sql = 'SELECT DISTINCT CurrencyId FROM '.$this->Application->getUnitOption('ptc', 'TableName');
+			$used_ids = $this->Conn->GetCol($sql);
+			if($check_all)
+			{
+				$sql = 'SELECT DISTINCT CurrencyId FROM '.$this->Application->getUnitOption('curr', 'TableName');
+				$all_ids = $this->Conn->GetCol($sql);
+				$unused_ids = implode(',', array_diff($all_ids, $used_ids) );
+				$this->Application->RemoveVar('check_unused_currencies');
+			}
+			else
+			{
+				$saved_ids = explode(',', $saved_ids);
+				$unused_ids = implode(',', array_diff($saved_ids, $used_ids) );
+				$this->Application->RemoveVar('saved_curr_ids');
+			}
+
+			if($unused_ids)
+			{
+				$this->Application->SetVar('unused_ids', $unused_ids);
+				$sql = 'SELECT ISO FROM '.$this->Application->getUnitOption($this->Prefix, 'TableName').' WHERE CurrencyId IN('.$unused_ids.') AND Status = 1';
+				if($params['unused_iso'] = implode(', ', $this->Conn->GetCol($sql)))
+				{
+					$params['unused_ids'] = $unused_ids;
+					$params['name'] = $params['block'];
+					$ret = $this->Application->ParseBlock($params);
+				}
+			}
+		}
+		return $ret;
+	}
+
+	function ListCurrencies($params)
+	{
+		return $this->PrintList2($params);
+	}
+
+	function SelectedCurrency($params)
+	{
+		$object =& $this->Application->recallObject($this->getPrefixSpecial());
+
+		return $object->GetDBField('ISO') == $this->Application->RecallVar('curr_iso');
+	}
+
+	function PrimaryCurrencyISO($params)
+	{
+		$sql = 'SELECT ISO FROM '.$this->Application->getUnitOption($this->Prefix, 'TableName').' WHERE IsPrimary = 1';
+		return $this->Conn->GetOne($sql);
+	}
+
+	function PrimaryCurrencyName($params)
+	{
+		$sql = 'SELECT Name FROM '.$this->Application->getUnitOption($this->Prefix, 'TableName').' WHERE IsPrimary = 1';
+		return $this->Application->Phrase( $this->Conn->GetOne($sql) );
+	}
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/currencies/currencies_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/currencies/currencies_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/currencies/currencies_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/currencies/currencies_event_handler.php	(revision 12131)
@@ -0,0 +1,213 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class CurrenciesEventHandler extends kDBEventHandler {
+
+	/**
+	 * Allows to override standart permission mapping
+	 *
+	 */
+	function mapPermissions()
+	{
+		parent::mapPermissions();
+		$permissions = Array(
+								// admin
+								'OnUpdateRate'		=>	Array('self' => 'add|edit'),
+								'OnUpdateRates'		=>	Array('self' => 'advanced:update_rate|add|edit'),
+								'OnDisableUnused'	=>	Array('self' => 'edit'),
+
+								// front
+								'OnChangeCurrency'	=>	Array('self' => true),
+						);
+		$this->permMapping = array_merge($this->permMapping, $permissions);
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnSetPrimary(&$event)
+	{
+		if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
+			return;
+		}
+
+		$object =& $event->getObject();
+		$object->SetDBField('IsPrimary', 1);
+		$object->Update();
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnBeforeItemUpdate(&$event)
+	{
+		$object =& $event->getObject();
+		if($object->GetDBField('IsPrimary') && $object->Validate())
+		{
+			$sql = 'UPDATE '.$this->Application->getUnitOption($this->Prefix, 'TableName').'
+					SET IsPrimary = 0
+					WHERE CurrencyId <> '.$object->GetDBField('CurrencyId');
+			$this->Conn->Query($sql);
+			$object->SetDBField('Status', 1);
+		}
+		$object->SetDBField('Modified_date', adodb_mktime() );
+		$object->SetDBField('Modified_time', adodb_mktime() );
+
+		if($object->GetDBField('Status') == 0)
+		{
+			$sql = 	'DELETE FROM '.$this->Application->getUnitOption('ptc', 'TableName').
+					' WHERE CurrencyId='.$object->GetDBField('CurrencyId');
+			$this->Conn->Query($sql);
+		}
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function SetCustomQuery(&$event)
+	{
+		$object =& $event->getObject();
+
+		$object->addFilter('current_lang', 'phr.LanguageId = '.$this->Application->GetVar('m_lang'));
+
+		if($event->Special == 'active')
+		{
+			$object =& $event->getObject();
+			$object->addFilter('status_filter', '%1$s.Status = 1');
+		}
+
+		if ( !$this->Application->IsAdmin() ) {
+			$object->addFilter('status_filter', $object->TableName.'.Status = 1');
+		}
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnSave(&$event)
+	{
+		$this->Application->StoreVar( 'saved_curr_ids', $this->Application->RecallVar($event->Prefix.'_selected_ids') );
+		parent::OnSave($event);
+	}
+
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnDisableUnused(&$event)
+	{
+		if($unused_ids = $this->Application->GetVar('unused_ids'))
+		{
+			$sql = 'UPDATE '.$this->Application->getUnitOption($event->Prefix, 'TableName').'
+					SET Status = 0
+					WHERE CurrencyId IN('.$unused_ids.') AND IsPrimary <> 1';
+			$this->Conn->Query($sql);
+		}
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnUpdateRate(&$event)
+	{
+		if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
+			return;
+		}
+
+		$event->CallSubEvent('OnPreSave');
+		$rate_source = $this->Application->ConfigValue('Comm_ExchangeRateSource');
+		$rate_source_classes = Array(	2 => 'FRNYCurrencyRates',
+										3 => 'ECBCurrencyRates',
+										1 => 'BankLVCurrencyRates'
+									);
+		$rates_class = $rate_source_classes[$rate_source];
+		$rates =& $this->Application->recallObject($rates_class);
+
+		$rates->GetRatesData();
+		$object =& $event->getObject();
+		$iso = $object->GetDBField('ISO');
+		$rates->StoreRates($iso);
+		if($rates->GetRate($iso, 'PRIMARY'))
+		{
+			$event->status=erSUCCESS;
+		}
+		else
+		{
+			$event->status=erFAIL;
+			$event->redirect=false;
+			$object->FieldErrors['RateToPrimary']['pseudo'] = 'couldnt_retrieve_rate';
+			$object->ErrorMsgs['couldnt_retrieve_rate'] = $this->Application->Phrase('la_couldnt_retrieve_rate');
+		}
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnUpdateRates(&$event)
+	{
+		if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
+			return;
+		}
+
+		$ids = $this->StoreSelectedIDs($event);
+		$event->setEventParam('ids', $ids);
+		$ids = $event->getEventParam('ids');
+
+		$object =& $event->getObject();
+		if(is_array($ids) && $ids[0])
+		{
+			$sql = 'SELECT ISO FROM '.$object->TableName.' WHERE CurrencyId IN ('.implode(',', $ids).')';
+			$iso_list = $this->Conn->GetCol($sql);
+		}
+
+		$rate_source = $this->Application->ConfigValue('Comm_ExchangeRateSource');
+		$rate_source_classes = Array(	2 => 'FRNYCurrencyRates',
+										3 => 'ECBCurrencyRates',
+										1 => 'BankLVCurrencyRates'
+									);
+		$rates_class = $rate_source_classes[$rate_source];
+		$rates =& $this->Application->recallObject($rates_class);
+
+		$rates->GetRatesData();
+
+		if($iso_list)
+		{
+			$rates->StoreRates($iso_list);
+		}
+		else
+		{
+			$rates->StoreRates();
+		}
+	}
+
+	function OnChangeCurrency(&$event)
+	{
+		$this->Application->StoreVar('curr_iso', $this->Application->GetVar('curr_iso'));
+	}
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/currencies/currencies_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.10
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/currencies/currencies_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/currencies/currencies_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/currencies/currencies_config.php	(revision 12131)
@@ -0,0 +1,135 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+$config	=	Array(
+					'Prefix'			=>	'curr',
+					'ItemClass'			=>	Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'CurrenciesEventHandler','file'=>'currencies_event_handler.php','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'CurrenciesTagProcessor','file'=>'currencies_tag_processor.php','build_event'=>'OnBuild'),
+					'RegisterClasses'	=>	Array(
+												Array('pseudo'=>'BankLVCurrencyRates','class'=>'kBankLVCurrencyRates','file'=>'currency_rates.php','build_event'=>''),
+												Array('pseudo'=>'ECBCurrencyRates','class'=>'kECBCurrencyRates','file'=>'currency_rates.php','build_event'=>''),
+												Array('pseudo'=>'FRNYCurrencyRates','class'=>'kFRNYCurrencyRates','file'=>'currency_rates.php','build_event'=>''),
+											),
+					'AutoLoad'			=>	true,
+					'hooks'				=>	Array(),
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'page',
+												3	=>	'event',
+												4	=>	'mode',
+											),
+
+					/*'Hooks'				=>	Array(
+							Array(
+								'Mode' => hBEFORE,
+								'Conditional' => true,
+								'HookToPrefix' => 'tax',
+								'HookToSpecial' => '',
+								'HookToEvent' => Array( 'onEdit' ),
+								'DoPrefix' => '',
+								'DoSpecial' => '',
+								'DoEvent' => 'OnLoadZoneForm',
+							),
+						),*/
+					'IDField' 			=>	'CurrencyId',
+					'StatusField'		=>	Array('Status', 'IsPrimary'),
+					'TitleField'		=>  'ISO',
+					'TitlePresets'		=>	Array(
+												'default'	=>	Array(	'new_status_labels'		=> Array('curr'=>'!la_title_AddingCurrency!'),
+																		'edit_status_labels'	=> Array('curr'=>'!la_title_EditingCurrency!'),
+																		'new_titlefield'		=> Array('curr'=>'!la_title_NewCurrency!'),
+																),
+												'currencies_list'=>Array(	'prefixes'				=> Array('curr_List'),
+																			'format'				=>	"!la_title_Currencies!",
+																),
+												'currencies_edit'=>Array(	'prefixes'				=> Array('curr'),
+																			'new_titlefield'		=> Array('curr'=>'!la_title_NewCurrency!'),
+																			'format'				=> "#curr_status# '#curr_titlefield#' - !la_title_General!",
+																),
+											),
+
+					'PermSection'		=>	Array('main' => 'in-commerce:currencies'),
+
+					'Sections'			=>	Array(
+						'in-commerce:currencies'	=>	Array(
+							'parent'		=>	'in-commerce:setting_folder',
+							'icon'			=>	'currencies',
+							'label'			=>	'la_tab_Currencies',
+							'url'			=>	Array('t' => 'in-commerce/currencies/currencies_list', 'pass' => 'm'),
+							'permissions'	=>	Array('view', 'add', 'edit', 'delete', 'advanced:move_up', 'advanced:move_down', 'advanced:update_rate', 'advanced:set_primary'),
+							'priority'		=>	3,
+							'type'			=>	stTREE,
+						),
+					),
+
+					'TableName'			=>	TABLE_PREFIX.'Currencies',
+					'AutoDelete'	=>	true,
+					'AutoClone'	=> true,
+
+					'SubItems' =>	Array(),
+
+					'ListSQLs'			=>	Array(	''=>	'SELECT %1$s.*,
+															phr.Translation
+															FROM %1$s
+															LEFT JOIN '.TABLE_PREFIX.'Phrase phr ON
+															%1$s.Name = phr.Phrase'),
+																		 // key - special, value - list select sql
+					'ItemSQLs'			=>	Array(	''=>	'SELECT * FROM %s'),
+
+					'CalculatedFields'	=>	Array(
+												''	=>	Array(
+															'Translation'	=>	'phr.Translation',
+														),
+											),
+
+					'ListSortings'	=> 	Array(
+												'' => Array(
+													'ForcedSorting' => Array('IsPrimary' => 'desc', 'Priority' => 'desc', 'Status' => 'desc'),
+													'Sorting' => Array('ISO' => 'asc'),
+												)
+											),
+					'Fields' => Array
+							        (
+							            'CurrencyId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+							            'ISO' => Array('type' => 'string','not_null' => '1','default' => ''),
+							            'Symbol' => Array('type' => 'string','default' => null),
+							            'SymbolPosition' => Array('type' => 'int','default' => null,'formatter' => 'kOptionsFormatter','options' => Array(0 => 'la_Left', 1 => 'la_Right'),'use_phrases' => '1'),
+							            'Name' => Array('type' => 'string','not_null' => '1','default' => ''),
+							            'RateToPrimary' => Array('type' => 'float', 'not_null' => 1, 'min_value_exc' => 0, 'formatter' => 'kFormatter', 'format' => '%0.4f', 'default' => 1),
+							            'Modified' => Array('type' => 'int','not_null' => 1, 'default' => '#NOW#','formatter' => 'kDateFormatter'),
+							            'Status' => Array('type' => 'int','not_null' => 1, 'default' => 0),
+							            'IsPrimary' => Array('type' => 'int','not_null' => 1, 'default' => 0),
+							            'Priority' => Array('type' => 'int','not_null' => 1, 'default' => 0),
+							        ),
+
+					'VirtualFields'	=> 	Array(
+													'Translation' => Array('type'=>'string'),
+											),
+					'Grids'	=> Array(
+								'Default'		=>	Array(
+																	'Icons' => Array('default'=>'icon16_custom.gif','0_0'=>'icon16_currency_disabled.gif','1_0'=>'icon16_currency.gif','1_1'=>'icon16_currency_primary.gif'),
+																	'Fields' => Array(
+																			'CurrencyId' => Array( 'width'=>100, 'title'=>'la_col_Id', 'data_block'=>'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+																			'ISO' => Array( 'width'=>100, 'title'=>'la_col_ISOCode', 'data_block' => 'currency_caption_td', 'filter_block' => 'grid_like_filter'),
+																			'Translation' => Array( 'width'=>100, 'title'=>'la_col_CurrencyName', 'use_phrases' => 1, 'filter_block' => 'grid_like_filter'),
+																			'RateToPrimary' => Array( 'width'=>100, 'title'=>'la_col_RateToPrimary', 'filter_block' => 'grid_float_range_filter'),
+																			'Modified' => Array( 'width'=>100, 'title'=>'la_col_LastUpdated', 'filter_block' => 'grid_date_range_filter'),
+																		),
+
+																),
+													),
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/currencies/currencies_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.15.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/currencies/currency_rates.php
===================================================================
--- branches/5.1.x/in-commerce/units/currencies/currency_rates.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/currencies/currency_rates.php	(revision 12131)
@@ -0,0 +1,270 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class kCurrencyRates extends kBase {
+	
+	var $RateSource;
+	var $ExchangeRates = Array();
+	var $PrimaryCurrency;
+	
+	function kCurrencyRates()
+	{
+		$this->Application =& kApplication::Instance();
+		$this->GetRatesData();
+	}
+	
+	function GetRatesData()
+	{
+		// written :) just check that it's correct
+		$conn =& $this->Application->GetADODBConnection();
+		$table = $this->Application->getUnitOption('curr', 'TableName');
+		$primary = $this->GetPrimaryCurrency();
+		$sql = 'SELECT "'.$primary.'" AS TARGET, ISO AS ID, RateToPrimary As RATE, 1 AS UNITS FROM '.$table.' WHERE 1';
+		$rates = $conn->Query($sql);
+		foreach ($rates as $a_rate) {
+			$this->SetRate($primary, $a_rate['ID'], $a_rate['RATE']);
+		}
+	}
+	
+	function GetRate($source_cur, $target_cur, $units = 1)
+	{
+		$source_cur = ($source_cur == 'PRIMARY') ? $this->GetPrimaryCurrency() : $source_cur;
+		$target_cur = ($target_cur == 'PRIMARY') ? $this->GetPrimaryCurrency() : $target_cur;
+		if($source_cur == $target_cur)
+		{
+			return 1;
+		}
+		
+		if($this->ExchangeRates[$target_cur]['TARGET'] == $source_cur)
+		{
+			$rate = ($this->ExchangeRates[$target_cur]['RATE'] ==  0) ? false : 1 / $this->ExchangeRates[$target_cur]['RATE'];
+		}
+		elseif($this->ExchangeRates[$source_cur]['TARGET'] == $target_cur)
+		{
+			$rate = $this->ExchangeRates[$source_cur]['RATE'];
+		}
+		else 
+		{
+			$rate = ($this->ExchangeRates[$target_cur]['RATE'] == 0) ? false : $this->ExchangeRates[$source_cur]['RATE'] / $this->ExchangeRates[$target_cur]['RATE'];
+		}
+		$rate *= $units;
+		return $rate;
+	}
+	
+	function Convert($amount, $source_cur, $target_cur)
+	{
+		return $amount * $this->GetRate($source_cur, $target_cur);
+	}
+	
+	function SetRate($source_cur, $target_cur, $rate, $units = 1)
+	{
+		$this->ExchangeRates[$target_cur]['TARGET']	= $source_cur;
+		$this->ExchangeRates[$target_cur]['ID']		= $target_cur;
+		$this->ExchangeRates[$target_cur]['RATE']	= $rate;
+		$this->ExchangeRates[$target_cur]['UNITS']	= $units;
+	}
+	
+	function GetPrimaryCurrency()
+	{
+		if(!$this->PrimaryCurrency)
+		{
+			$conn =& $this->Application->GetADODBConnection();
+			$table = $this->Application->getUnitOption('curr', 'TableName');
+			$sql = 'SELECT ISO FROM '.$table.' WHERE IsPrimary = 1';
+			$this->PrimaryCurrency = $conn->GetOne($sql);
+		}
+		return $this->PrimaryCurrency;
+	}
+	
+	function StoreRates($currencies=null)
+	{
+		$curr_object =& $this->Application->recallObject('curr', null, Array ('skip_autoload' => true));
+		/* @var $curr_object kDBItem */
+
+		if ($currencies) {
+			if (!is_array($currencies)) {
+				$currencies = explode(',', $currencies);
+			}
+		}
+		else {
+			$currencies = array_keys($this->ExchangeRates);
+		}
+
+		foreach ($currencies as $id) {
+			$rate = $this->GetRate($id, 'PRIMARY');
+			if ($rate) {
+				$curr_object->Clear();
+				$curr_object->Load($id, 'ISO');
+				$curr_object->SetDBField('RateToPrimary', $rate);
+				$curr_object->SetDBField('Modified_date', adodb_mktime());
+				$curr_object->SetDBField('Modified_time', adodb_mktime());
+				$curr_object->Update();
+			}
+		}
+	}
+}
+
+
+class kBankLVCurrencyRates extends kCurrencyRates  {
+
+	function kBankLVCurrencyRates()
+	{
+		$this->RateSource = 'http://www.bank.lv/ValutuKursi/XML/xml.cfm';
+		parent::kCurrencyRates();
+	}
+	
+	function GetRatesData()
+	{
+		$this->GetPrimaryCurrency();				
+		$xml_parser = xml_parser_create();
+		$xml = file_get_contents($this->RateSource);
+		xml_parse_into_struct($xml_parser, $xml, $struct, $index);
+		$data_res = Array();
+		$currency = '';
+		foreach($struct as $element)
+		{
+			switch($element['tag'])
+			{
+				case 'ID':
+					$currency = $element['value'];
+					$data_res[$currency]['ID'] = $currency;
+					$data_res[$currency]['TARGET'] = 'LVL';
+				break;
+				case 'UNITS':
+					$data_res[$currency]['UNITS'] = $element['value'];
+				break;
+				case 'RATE':
+					$data_res[$currency]['RATE'] = $element['value'];
+				break;
+				default:
+			}			
+		}
+		
+		if(!$data_res['LVL'])
+		{
+			$data_res['LVL']['ID'] = 'LVL';					
+			$data_res['LVL']['UNITS'] = 1;
+			$data_res['LVL']['TARGET'] = 'LVL';
+			$data_res['LVL']['RATE'] = 1;
+		}
+		$this->ExchangeRates = $data_res;
+	}	
+}
+
+
+class kECBCurrencyRates extends kCurrencyRates  {
+
+	function kECBCurrencyRates()
+	{
+		$this->RateSource = 'http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml';
+		parent::kCurrencyRates();
+	}
+	
+	function GetRatesData()
+	{	
+		$this->GetPrimaryCurrency();	
+		$xml_parser = xml_parser_create();
+		$xml = file_get_contents($this->RateSource);
+		xml_parse_into_struct($xml_parser, $xml, $struct, $index);
+		$data_res = Array();
+		foreach($struct as $element)
+		{
+			if(isset($element['attributes']) && isset($element['attributes']['CURRENCY']))
+			{
+				$currency = $element['attributes']['CURRENCY'];
+				$data_res[$currency]['ID'] = $currency;
+				$data_res[$currency]['TARGET'] = 'EUR';
+				$data_res[$currency]['UNITS'] = 1;
+				$data_res[$currency]['RATE'] = ($element['attributes']['RATE'] == 0) ? 0 : 1 / $element['attributes']['RATE'];
+			}
+		}
+		if(!$data_res['EUR'])
+		{
+			$data_res['EUR']['ID'] = 'EUR';					
+			$data_res['EUR']['UNITS'] = 1;
+			$data_res['EUR']['TARGET'] = 'EUR';
+			$data_res['EUR']['RATE'] = 1;
+		}
+		$this->ExchangeRates = $data_res;
+	}
+}
+
+
+class kFRNYCurrencyRates extends kCurrencyRates  {
+
+	function kFRNYCurrencyRates()
+	{
+		$this->RateSource = 'http://www.ny.frb.org/markets/fxrates/FXtoXML.cfm?FEXdate=%s&FEXtime=1200';
+		parent::kCurrencyRates();
+	}
+	
+	function GetRatesData()
+	{
+		$this->GetPrimaryCurrency();		
+		for($i = 0; $i < 10; $i++)
+		{
+			$time = adodb_mktime() - $i * 3600 * 24;
+			$source_file = sprintf($this->RateSource, adodb_date('Y-m-d', $time));
+			$xml = file_get_contents($source_file);
+			$xml_parser = xml_parser_create();
+			xml_parse_into_struct($xml_parser, $xml, $struct, $index);
+			foreach($struct as $element)
+			{
+				if($element['tag'] == 'FRBNY:DATASET')
+				{
+					break;
+				}
+			}
+			if($element['type'] == 'open')
+			{
+				break;
+			}
+		}
+		if($element['type'] != 'open')
+		{
+			return false;
+		}
+		
+		foreach($struct as $element)
+		{
+			switch($element['tag'])
+			{
+				case 'FRBNY:SERIES':
+					$currency = $element['attributes']['UNIT'];
+					if($currency)
+					{
+						$data_res[$currency]['ID'] = $currency;					
+						$data_res[$currency]['UNITS'] = 1;
+					}
+				break;
+				case 'FRBNY:CURR':
+					$data_res[$currency]['TARGET'] = $element['value'];
+				break;
+				case 'FRBNY:OBS_VALUE':
+					$data_res[$currency]['RATE'] = ($element['value'] == 0) ? 0 : 1 / $element['value'];
+				break;
+				default:
+			}			
+		}
+		if(!$data_res['USD'])
+		{
+			$data_res['USD']['ID'] = 'USD';					
+			$data_res['USD']['UNITS'] = 1;
+			$data_res['USD']['TARGET'] = 'USD';
+			$data_res['USD']['RATE'] = 1;
+		}
+		$this->ExchangeRates = $data_res;
+	}	
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/currencies/currency_rates.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3.8.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/action.php
===================================================================
--- branches/5.1.x/in-commerce/units/action.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/action.php	(revision 12131)
@@ -0,0 +1,35 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+if (class_exists('kApplication')) {
+
+	$application =& kApplication::Instance();
+	
+	switch ($Action) {
+		case 'products_paste':
+			$event = new kEvent();
+			$event->Init('p', '');
+			$event->Name = 'onPaste';
+			$application->HandleEvent($event);
+			if ($event->status == erSUCCESS) {
+				if($event->status==erSUCCESS && ($event->redirect === true || strlen($event->redirect) > 0) )
+				{
+					$application->Redirect($event->redirect, $event->redirect_params, null, $event->redirect_script);	
+				}
+			}
+			break;
+	}
+}
+
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/action.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/coupon_items/coupon_items_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/coupon_items/coupon_items_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/coupon_items/coupon_items_config.php	(revision 12131)
@@ -0,0 +1,116 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+$config	=	Array(
+					'Prefix'			=>	'coupi',
+					'ItemClass'			=>	Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'CouponItemsEventHandler','file'=>'coupon_items_event_handler.php','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'CouponItemsTagProcessor','file'=>'coupon_items_tag_processor.php','build_event'=>'OnBuild'),
+					'AutoLoad'			=>	true,
+					'Hooks'	=>	Array(
+												Array(
+													'Mode' => hAFTER,
+													'Conditional' => false,
+													'HookToPrefix' => 'p',
+													'HookToSpecial' => '-item',
+													'HookToEvent' => Array('OnAfterItemDelete'),
+													'DoPrefix' => '',
+													'DoSpecial' => '',
+													'DoEvent' => 'OnDeleteCouponItem',
+												),
+											),
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'page',
+												3	=>	'event',
+											),
+					'IDField'			=>	'CouponItemId',
+					'StatusField'		=>	Array('Status'),
+					'TitleField'		=>	'Name',
+					'TableName'			=>	TABLE_PREFIX.'ProductsCouponItems',
+
+					'CalculatedFields'	=>	Array(
+												''	=>	Array(
+															'ProductId'		=>	'p.ProductId',
+															'ItemName'			=>	'IF(p.Name IS NULL,c.Name,p.l1_Name)',
+															'SKU'			=>	'p.SKU',
+															'Weight'		=>	'p.Weight',
+															'CreatedOn'		=>	'p.CreatedOn',
+															'BackOrderDate'	=>	'p.BackOrderDate',
+															'Status'		=>	'p.Status',
+															'CategoryId'	=>	'c.CategoryId',
+
+														),
+
+											),
+					'ListSQLs'			=>	Array(	''=>'	SELECT %1$s.* %2$s
+															FROM %1$s
+															LEFT JOIN '.TABLE_PREFIX.'Products p ON %1$s.ItemResourceId = p.ResourceId
+															LEFT JOIN '.TABLE_PREFIX.'Category c ON %1$s.ItemResourceId = c.ResourceId',
+																		), // key - special, value - list select sql
+					'ItemSQLs'			=>	Array(	''=>'SELECT * FROM %s',
+																		),
+
+					/*'BelongsTo'			=> Array(
+												Array('prefix' => 'd', 'key' => 'DiscountId', 'ForeignKey' => 'DiscountId'),
+											),*/
+					'ForeignKey'	=>	'CouponId',
+					'ParentTableKey' => 'CouponId',
+					'ParentPrefix' => 'coup',
+					'AutoDelete'	=>	true,
+					'AutoClone'	=> true,
+
+					'ListSortings'	=> 	Array(
+												'' => Array(
+													'Sorting' => Array('ItemName' => 'asc'),
+												)
+											),
+
+					'Fields' => Array (
+						'CouponItemId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
+			            'CouponId' => Array('type' => 'int', 'default' => 0, ),
+			            'ItemResourceId' => Array('type' => 'int', 'default' => 0, ),
+			            'ItemType' => Array('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_Product', 2 => 'la_Category', 0 => 'la_WholeOrder' ), 'default' => 1, ),
+					),
+
+					'VirtualFields'	=> 	Array(
+													'ProductId' => Array(),
+													'ItemName' => Array(),
+													'SKU' => Array(),
+													'Weight' => Array('type'=>'float', 'min_value_exc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f'),
+													'CreatedOn' => Array('formatter' => 'kDateFormatter', 'default'=>'#NOW#' ),
+													'BackOrderDate' => Array('formatter' => 'kDateFormatter'),
+												),
+
+					'Grids'	=> Array(
+								'Default'		=>	Array(
+																	'Icons' => Array('default'=>'icon16_entire_order.gif'),
+																	'Fields' => Array(
+																			'ItemType' => Array( 'title'=>'la_col_ItemType', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_empty_filter'),
+																		),
+
+																),
+								'CouponItems'		=>	Array(
+																	'Icons' => Array('default'=>'icon16_custom.gif',1=>'icon16_product.gif',2=>'icon16_product_pending.gif',0=>'icon16_product_disabled.gif'),
+																	'Fields' => Array(
+																			'ProductId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_item_td', 'filter_block' => 'grid_range_filter'),
+																			'ItemName' => Array( 'title'=>'la_col_ItemName', 'filter_block' => 'grid_like_filter'),
+																			'ItemType' => Array( 'title'=>'la_col_CouponItemType', 'filter_block' => 'grid_options_filter'),
+																		),
+
+																),
+													),
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/coupon_items/coupon_items_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.8.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/coupon_items/coupon_items_tag_processor.php
===================================================================
--- branches/5.1.x/in-commerce/units/coupon_items/coupon_items_tag_processor.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/coupon_items/coupon_items_tag_processor.php	(revision 12131)
@@ -0,0 +1,48 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class CouponItemsTagProcessor extends kDBTagProcessor  {
+
+	function IsEntireOrder($params)
+	{
+		$table_name = $this->Application->getUnitOption($this->Prefix, 'TableName');
+
+		if ($this->Application->IsTempMode($this->Prefix)) {
+			$table_name = $this->Application->GetTempName($table_name, 'prefix:' . $this->Prefix);
+		}
+
+		$sql = 'SELECT COUNT(*)
+				FROM ' . $table_name . '
+				WHERE (ItemType = 0) AND (CouponId = ' . $this->Application->GetVar('coup_id') . ')';
+		return $this->Conn->GetOne($sql);
+	}
+
+	function ItemIcon($params)
+	{
+		$object =& $this->Application->recallObject($this->getPrefixSpecial(),$this->Prefix, $params);
+		if($object->GetDBField('ItemType') == 2)
+		{
+			$cat_object =& $this->Application->recallObject('c');
+			$cat_object->Load( $object->GetDBField('CategoryId') );
+			$cat_tag_processor =& $this->Application->recallObject('c_TagProcessor');
+			return $cat_tag_processor->ItemIcon();
+		}
+		else
+		{
+			return parent::ItemIcon($params);
+		}
+	}
+
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/coupon_items/coupon_items_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3.8.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/coupon_items/coupon_items_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/coupon_items/coupon_items_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/coupon_items/coupon_items_event_handler.php	(revision 12131)
@@ -0,0 +1,89 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class CouponItemsEventHandler extends kDBEventHandler {
+
+	/**
+	 * Allows to override standart permission mapping
+	 *
+	 */
+	function mapPermissions()
+	{
+		parent::mapPermissions();
+		$permissions = Array(
+								'OnEntireOrder'	=>	Array('subitem' => 'add|edit'),
+						);
+		$this->permMapping = array_merge($this->permMapping, $permissions);
+	}
+
+	/**
+	 * Adds products from selected categories and their sub-categories and directly selected products to coupon items with duplicate checking
+	 *
+	 * @param kEvent $event
+	 */
+	function OnProcessSelected(&$event)
+	{
+		// uses another handler event, because does the same stuff but on different table
+		$di_handler =& $this->Application->recallObject('di_EventHandler');
+		$di_handler->OnProcessSelected($event);
+	}
+
+	/**
+	 * Allows to set discount on entire order
+	 *
+	 * @param kEvent $event
+	 * @todo get parent item id through $object->getLinkedInfo()['ParentId']
+	 * @access public
+	 */
+	function OnEntireOrder(&$event)
+	{
+		$object =& $event->GetObject();
+		$sql = 'DELETE FROM '.$object->TableName.' WHERE CouponId='.$this->Application->GetVar('coup_id');
+		$this->Conn->Query($sql);
+
+		$object->SetDBField('CouponId', $this->Application->GetVar('coup_id'));
+		$object->SetDBField('ItemResourceId', -1);
+		$object->SetDBField('ItemType', 0);
+
+		if( $object->Create() )
+		{
+			if( $object->IsTempTable() ) $object->setTempID();
+			$this->customProcessing($event, 'after');
+			$event->status=erSUCCESS;
+			$event->redirect_params = Array('opener' => 's'); //stay!
+		}
+		else
+		{
+			$event->status=erFAIL;
+			$this->Application->SetVar($event->Prefix_Special.'_SaveEvent','OnCreate');
+			$object->setID(0);
+		}
+	}
+
+	/**
+	 * Deletes discount items where hooked item (product) is used
+	 *
+	 * @param kEvent $event
+	 */
+	function OnDeleteCouponItem(&$event)
+	{
+		$main_object =& $event->MasterEvent->getObject();
+		$resource_id = $main_object->GetDBField('ResourceId');
+
+		$table = $this->Application->getUnitOption($event->Prefix,'TableName');
+		$sql = 'DELETE FROM '.$table.' WHERE ItemResourceId = '.$resource_id;
+		$this->Conn->Query($sql);
+	}
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/coupon_items/coupon_items_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.8
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/affiliates/affiliates_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/affiliates/affiliates_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/affiliates/affiliates_config.php	(revision 12131)
@@ -0,0 +1,199 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+$config	=	Array(
+					'Prefix'			=>	'affil',
+					'ItemClass'			=>	Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'AffiliatesEventHandler','file'=>'affiliates_event_handler.php','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'AffiliatesTagProcessor','file'=>'affiliates_tag_processor.php','build_event'=>'OnBuild'),
+					'AutoLoad'			=>	true,
+					'Hooks'	=>	Array(
+												Array(
+													'Mode' => hAFTER,
+													'Conditional' => false,
+													'HookToPrefix' => 'u',
+													'HookToSpecial' => '',
+													'HookToEvent' => Array('OnCreate'),
+													'DoPrefix' => '',
+													'DoSpecial' => '',
+													'DoEvent' => 'OnRegisterAsAffiliate',
+												),
+												Array(
+													'Mode' => hBEFORE,
+													'Conditional' => false,
+													'HookToPrefix' => 'u',
+													'HookToSpecial' => '',
+													'HookToEvent' => Array('OnCreate'),
+													'DoPrefix' => '',
+													'DoSpecial' => '',
+													'DoEvent' => 'OnCheckAffiliateAgreement',
+												),
+											),
+					'AggregateTags' => Array(
+												Array(
+													'AggregateTo' => 'u',
+													'AggregatedTagName' => 'IsAffiliate',
+													'LocalTagName' => 'User_IsAffiliate',
+												),
+												Array(
+													'AggregateTo' => 'u',
+													'AggregatedTagName' => 'AffiliateIsNotActive',
+													'LocalTagName' => 'User_AffiliateIsNotActive',
+												),
+												Array(
+													'AggregateTo' => 'u',
+													'AggregatedTagName' => 'AffiliateField',
+													'LocalTagName' => 'CurrentUserAffiliateField',
+												),
+												Array(
+													'AggregateTo' => 'u',
+													'AggregatedTagName' => 'IsAffiliateOrRegisterAsAffiliateAllowed',
+													'LocalTagName' => 'IsAffiliateOrRegisterAsAffiliateAllowed',
+												),
+												Array(
+													'AggregateTo' => 'm',
+													'AggregatedTagName' => 'RequireAffiliate',
+													'LocalTagName' => 'Main_RequireAffiliate',
+												),
+
+												Array(
+													'AggregateTo' => 'm',
+													'AggregatedTagName' => 'AllowAffiliateRegistration',
+													'LocalTagName' => 'AllowAffiliateRegistration',
+												),
+										),
+
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'Page',
+												3	=>	'event',
+												4 	=>	'mode',
+											),
+
+					'RegularEvents'		=>	Array(
+													'store_affiliate' => Array('EventName' => 'OnStoreAffiliate', 'RunInterval' => 0, 'Type' => reBEFORE),
+													'reset_affiliate_stats' => Array('EventName' => 'OnResetStatistics', 'RunInterval' => 0, 'Type' => reBEFORE),
+											),
+
+					'IDField'			=>	'AffiliateId',
+					'StatusField'		=>	Array('Status'),	// field, that is affected by Approve/Decline events
+
+					'TitleField'		=>	'UserName',
+					'TitlePresets'		=>	Array(
+												'default'	=>	Array(	'new_status_labels'		=> Array('affil'=>'!la_title_Adding_Affiliate!'),
+																		'edit_status_labels'	=> Array('affil'=>'!la_title_Editing_Affiliate!'),
+																		'new_titlefield'		=> Array('affil'=>'!la_title_New_Affiliate!'),
+																),
+
+												'affiliates_list'	=>	Array('prefixes' => Array('affil_List'), 'format' => "!la_title_Affiliates!"),
+												'affiliates_edit' => Array('prefixes' => Array('affil'), 'format' => "#affil_status# '#affil_titlefield#' - !la_title_General!"),
+												'affiliate_payments' => Array('prefixes' => Array('affil', 'apayments_List'), 'format' => "#affil_status# '#affil_titlefield#' - !la_title_Payments!"),
+												'affiliates_payout' => Array('prefixes' => Array('affil','apayments'), 'format' => "!la_title_PayOut_To! '#affil_titlefield#'"),
+											),
+
+					'EditTabPresets' => Array (
+   						'Default' => Array (
+   							'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/affiliate_plans/affiliates_edit', 'priority' => 1),
+							'payments' => Array ('title' => 'la_tab_Payments', 't' => 'in-commerce/affiliate_plans/affiliate_edit_payments', 'priority' => 2),
+   						),
+   					),
+
+					'PermSection'		=>	Array('main' => 'in-commerce:affiliates'),
+
+					'Sections'			=>	Array(
+						'in-commerce:affiliates_folder'	=>	Array(
+							'parent'		=>	'in-commerce',
+							'icon'			=>	'affiliates',
+							'label'			=>	'la_tab_Affiliates',
+							'permissions'	=>	Array(),
+							'priority'		=>	8,
+							'type'			=>	stTREE,
+						),
+
+						'in-commerce:affiliates'	=>	Array(
+							'parent'		=>	'in-commerce:affiliates_folder',
+							'icon'			=>	'affiliates',
+							'label'			=>	'la_tab_Affiliates',
+							'url'			=>	Array('t' => 'in-commerce/affiliate_plans/affiliates_list', 'pass' => 'm'),
+							'permissions'	=>	Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'),
+							'priority'		=>	8.1,
+							'type'			=>	stTAB,
+						),
+					),
+
+					'TableName'			=>	TABLE_PREFIX.'Affiliates',
+
+					'CalculatedFields' => Array(
+								'' => Array (
+										'UserId' => 'u.PortalUserId',
+										'UserName' => 'IF( LENGTH(u.Login), u.Login, \'\')',
+										'PlanName' => 'ap.Name',
+									),
+								),
+
+					'ListSQLs'			=>	Array(	''=>'	SELECT %1$s.* %2$s
+															FROM %1$s
+															LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.PortalUserId = u.PortalUserId
+															LEFT JOIN '.TABLE_PREFIX.'AffiliatePlans ap ON %1$s.AffiliatePlanId = ap.AffiliatePlanId'),
+
+					'ItemSQLs'			=>	Array(	''=>'	SELECT %1$s.* %2$s
+															FROM %1$s
+															LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.PortalUserId = u.PortalUserId
+															LEFT JOIN '.TABLE_PREFIX.'AffiliatePlans ap ON %1$s.AffiliatePlanId = ap.AffiliatePlanId'),
+					'SubItems'	=> Array('apayments'),
+
+					'ListSortings'	=> 	Array(
+												'' => Array(
+															'Sorting' => Array('CreatedOn' => 'desc', 'UserName' => 'asc'),
+														)
+										),
+
+					'Fields' => Array(
+										'AffiliateId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+										'PortalUserId' => Array('type' => 'int',  'unique'=>Array('PortalUserId'), 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!', 'unique' => '!la_affiliate_already_exists!'), 'options' => Array(-1 => 'root', -2 => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'required' => 1, 'not_null' => 1, 'default' => 0, ),
+										'AffiliatePlanId' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options_sql'=>'SELECT Name, AffiliatePlanId FROM '.TABLE_PREFIX.'AffiliatePlans WHERE Enabled = 1 ORDER BY Name', 'option_key_field'=>'AffiliatePlanId', 'option_title_field'=>'Name', 'not_null' => 1, 'default' => 0),
+										'AccumulatedAmount' => Array('type' => 'double', 'formatter'=>'kFormatter', 'format'=>'%.02f', 'not_null' => '1','default' => '0.00'),
+										'AmountToPay' => Array('type' => 'double', 'formatter'=>'kFormatter', 'format'=>'%.02f', 'not_null' => '1','default' => '0.00'),
+										'LastPaymentDate' => Array('type' => 'int', 'formatter'=>'kDateFormatter', 'default' => null),
+										'LastOrderDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null),
+										'Status' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options'=>Array(1=>'la_Active', 2=>'la_Pending', 0=>'la_Disabled'), 'use_phrases'=>1, 'not_null' => '1','default' => 2),
+										'AffiliateCode' => Array('type' => 'string', 'not_null' => '1', 'default' => ''),
+										'ItemsSold' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+										'PaymentTypeId' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options' => Array(0 => ''), 'options_sql'=>'SELECT Name, PaymentTypeId FROM '.TABLE_PREFIX.'AffiliatePaymentTypes WHERE Status = 1 ORDER BY IsPrimary DESC, Priority DESC, Name ASC', 'option_key_field'=>'PaymentTypeId', 'option_title_field'=>'Name', 'not_null' => 1, 'default' => 0),
+										'SSN' => Array('type' => 'string','not_null' => '1','default' => '', 'required' => 1),
+										'Comments' => Array('type' => 'string', 'formatter' => 'kFormatter', 'not_null' => 1, 'using_fck' => 1, 'default' => ''),
+										'CreatedOn' => Array('type' => 'int', 'formatter'=>'kDateFormatter',  'not_null' => '1', 'default' => '#NOW#'),
+								),
+					'VirtualFields'	=> 	Array(
+												'UserName' => Array('type'=>'string', 'default' => ''),
+												'PlanName' => Array('type'=>'string', 'default' => ''),
+											),
+
+					'Grids'	=> Array(
+								'Default'		=>	Array(
+															'Icons' => Array('default'=>'icon16_custom.gif', 0 => 'icon16_affiliate_disabled.gif', 1 => 'icon16_affiliate.gif', 2 => 'icon16_affiliate_pending.gif'),
+															'Fields' => Array(
+																				'AffiliateId'		=> Array( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+																				'UserName'			=> Array( 'title' => 'la_col_UserName', 'data_block' => 'grid_userlink_td', 'filter_block' => 'grid_like_filter'),
+																				'PlanName' 			=> Array( 'title'=>'la_col_PlanName', 'filter_block' => 'grid_like_filter'),
+																				'Status'			=> Array( 'title' => 'la_col_Status', 'filter_block' => 'grid_options_filter'),
+																				'PaymentTypeId'		=> Array( 'title' => 'la_col_PaymentType', 'filter_block' => 'grid_options_filter'),
+																				'CreatedOn'			=> Array( 'title' => 'la_col_RegisteredOn', 'format' => '_regional_DateFormat', 'filter_block' => 'grid_date_range_filter'),
+																		),
+													),
+
+								),
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/affiliates/affiliates_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.27.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/affiliates/affiliates_tag_processor.php
===================================================================
--- branches/5.1.x/in-commerce/units/affiliates/affiliates_tag_processor.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/affiliates/affiliates_tag_processor.php	(revision 12131)
@@ -0,0 +1,145 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	class AffiliatesTagProcessor extends kDBTagProcessor {
+
+		/**
+		 * Returns link to be placed on other sites
+		 *
+		 * @param Array $params
+		 * @return string
+		 */
+		function GetAffiliateLink($params)
+		{
+			$object =& $this->getObject($params);
+			$params['affiliate'] = $object->GetDBField('AffiliateCode');
+			$params['prefix'] = '_FRONT_END_';
+			$params['index_file'] = 'index.php';
+			$params['no_pass'] = 1; // don't work
+			$params['__SSL__'] = 0;
+			$params['__NO_SID__'] = 1; // don't work
+
+			$link = $this->Application->ProcessParsedTag('m', 'Link', $params);
+
+			// remove env manually (because no_pass parameter don't work)
+			return preg_replace('/(.*)\/index.php\?env=(.*)&amp;(.*)/', '\\1/index.php?\\3', $link);
+		}
+
+		/**
+		 * Returns link to be placed on other sites (for current user)
+		 *
+		 * @param Array $params
+		 * @return string
+		 */
+		function GetUserAffiliateLink($params)
+		{
+			$object =& $this->Application->recallObject( $this->getPrefixSpecial(), $this->Prefix, array_merge($params, array('skip_autoload'=>true)) );
+			$object->Load(array('PortalUserId' => $this->Application->RecallVar('user_id')));
+
+//			return $this->GetAffiliateLink($params);
+
+			$params['no_pass'] = 1; // don't work
+			$params['index_file'] = 'index.php';
+			$params['affiliate'] = $object->GetDBField('AffiliateCode');
+			$params['__SSL__'] = 0;
+			$params['__NO_SID__'] = 1; // don't work
+
+			$link = $this->Application->ProcessParsedTag('m', 'Link', $params);
+
+			// remove env manually (because no_pass parameter don't work)
+			return preg_replace('/(.*)\/index.php\?env=(.*)&amp;(.*)/', '\\1/index.php?\\3', $link);
+		}
+
+		/**
+		 * Returns true if user is affiliate
+		 *
+		 * @param Array $params
+		 * @return bool
+		 */
+		function User_IsAffiliate($params)
+		{
+			$object =& $this->Application->recallObject($this->Prefix.'.user', $this->Prefix, Array('skip_autoload'=>true) );
+			$object->Load( $this->Application->RecallVar('user_id'), 'PortalUserId' );
+
+			return $object->isLoaded();
+		}
+
+		function User_AffiliateIsNotActive($params)
+		{
+			$object =& $this->Application->recallObject($this->Prefix.'.user', $this->Prefix, Array('skip_autoload'=>true) );
+			$object->Load( $this->Application->RecallVar('user_id'), 'PortalUserId' );
+
+			return $object->isLoaded() && ($object->GetDBField('Status') != 1);
+		}
+
+		/**
+		 * Returns url for editing user from current record
+		 *
+		 * @param Array $params
+		 * @return string
+		 */
+		function UserLink($params)
+		{
+			$object =& $this->getObject($params);
+			$user_id = $object->GetDBField('PortalUserId');
+
+			if ($user_id) {
+				$url_params =  Array (
+					'm_opener' => 'd',
+					'u_mode' => 't',
+					'u_event' => 'OnEdit',
+					'u_id' => $user_id,
+					'pass' => 'all,u'
+				);
+
+				return $this->Application->HREF($params['edit_template'], '', $url_params);
+			}
+		}
+
+		function CurrentUserAffiliateField($params)
+		{
+			$object =& $this->Application->recallObject( $this->getPrefixSpecial(), $this->Prefix, array_merge($params, Array('skip_autoload' => true)) );
+			$object->Load( Array('PortalUserId'=>$this->Application->RecallVar('user_id')) );
+			return $object->GetField($this->SelectParam($params, 'field,name'));
+		}
+
+		function IsAffiliateOrRegisterAsAffiliateAllowed($params)
+		{
+			$object =& $this->Application->recallObject($this->Prefix.'.user', $this->Prefix, Array('skip_autoload'=>true) );
+			$object->Load( $this->Application->RecallVar('user_id'), 'PortalUserId' );
+
+			return ($this->Application->ConfigValue('Comm_RegisterAsAffiliate') || $object->isLoaded()) ? 1 : 0;
+		}
+
+		/**
+		 * [AGGREGATED TAG] Checks if affilite registration is allowed
+		 *
+		 * @param Array $params
+		 * @return int
+		 */
+		function AllowAffiliateRegistration($params)
+		{
+			return $this->Application->ConfigValue('Comm_RegisterAsAffiliate') ? 1 : 0;
+		}
+
+		function Main_RequireAffiliate($params)
+		{
+			$t = $params['registration_template'];
+			if( !$this->User_IsAffiliate($params) )
+			{
+				$redirect_params = Array( 'next_template' => $this->Application->GetVar('t') );
+				$this->Application->Redirect($t, $redirect_params);
+			}
+		}
+	}
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/affiliates/affiliates_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.12.2.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/affiliates/affiliates_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/affiliates/affiliates_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/affiliates/affiliates_event_handler.php	(revision 12131)
@@ -0,0 +1,534 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	class AffiliatesEventHandler extends kDBEventHandler {
+
+		/**
+		 * Allows to override standart permission mapping
+		 *
+		 */
+		function mapPermissions()
+		{
+			parent::mapPermissions();
+			$permissions = Array(
+				'OnItemBuild' => Array ('self' => true),
+				'OnChangePaymentType' => Array ('self' => true),
+				'OnBecomeAffiliate' => Array ('self' => true),
+			);
+			$this->permMapping = array_merge($this->permMapping, $permissions);
+		}
+
+		/**
+		 * Generate new affiliate code
+		 *
+		 * @param kEvent $event
+		 * @return string
+		 */
+		function generateAffiliateCode(&$event)
+		{
+			// accepts 1 - 36
+			$number_length = 11;
+			$num_chars = Array(	'1'=>'a','2'=>'b','3'=>'c','4'=>'d','5'=>'e','6'=>'f',
+								'7'=>'g','8'=>'h','9'=>'i','10'=>'j','11'=>'k','12'=>'l',
+								'13'=>'m','14'=>'n','15'=>'o','16'=>'p','17'=>'q','18'=>'r',
+								'19'=>'s','20'=>'t','21'=>'u','22'=>'v','23'=>'w','24'=>'x',
+								'25'=>'y','26'=>'z','27'=>'0','28'=>'1','29'=>'2','30'=>'3',
+								'31'=>'4','32'=>'5','33'=>'6','34'=>'7','35'=>'8','36'=>'9');
+
+			$ret = '';
+			for($i=1; $i<=$number_length; $i++)
+			{
+				mt_srand((double)microtime() * 1000000);
+				$num = mt_rand(1,36);
+				$ret .= $num_chars[$num];
+			}
+			$ret = strtoupper($ret);
+
+			$idfield = $this->Application->getUnitOption($event->Prefix, 'IDField');
+			$table = $this->Application->getUnitOption($event->Prefix, 'TableName');
+
+			$sql = 'SELECT %s FROM %s WHERE AffiliateCode = %s';
+			$code_found = $this->Conn->GetOne( sprintf($sql, $idfield, $table, $this->Conn->qstr($ret) ) );
+			if($code_found) return $this->generateAffiliateCode($event);
+
+			return $ret;
+		}
+
+		/**
+		 * Creates new affiliate code when new affiliate is created
+		 *
+		 * @param kEvent $event
+		 */
+		function OnBeforeItemCreate(&$event)
+		{
+			$object =& $event->getObject( Array('skip_autoload'=>true) );
+			$object->SetDBField('AffiliateCode', $this->generateAffiliateCode($event) );
+		}
+
+		/**
+		 * Stores affiliate id using method from Config (session or cookie) if correct code is present in url
+		 *
+		 * @param kEvent $event
+		 * @return bool
+		 */
+		function OnStoreAffiliate(&$event)
+		{
+			$event->Init($event->Prefix, '-item');
+			$object =& $event->getObject( Array('skip_autoload'=>true) );
+
+			$affiliate_storage_method = $this->Application->ConfigValue('Comm_AffiliateStorageMethod');
+
+			$affiliate = $this->Application->GetVar('affiliate');
+			if($affiliate)
+			{
+				$object->Load($affiliate, 'AffiliateCode');
+			}
+			elseif($affiliate_storage_method == 2)
+			{
+				$affiliate_id = $this->Application->GetVar('affiliate_id');
+				$object->Load($affiliate_id);
+			}
+
+			if( $object->isLoaded() && ($object->GetDBField('Status') == 1) )
+			{
+				// user is found with such email
+				$affiliate_user =& $this->Application->recallObject('u.affiliate', null, Array('skip_autoload'=>true) );
+				$affiliate_user->Load( $object->GetDBField('PortalUserId') );
+
+				if($affiliate_user->GetDBField('Status') == 1)
+				{
+					$affiliate_id = $object->GetDBField('AffiliateId');
+					$this->Application->setVisitField('AffiliateId', $affiliate_id);
+
+					if($affiliate_storage_method == 1)
+					{
+						$this->Application->StoreVar('affiliate_id', $affiliate_id); // per session
+					}
+					else
+					{
+						setcookie('affiliate_id', $affiliate_id, $this->getCookieExpiration(), BASE_PATH, '.'.SERVER_NAME); // in cookie
+					}
+				}
+			}
+		}
+
+		/**
+		 * Returns affiliate cookie expiration date
+		 *
+		 * @return int
+		 */
+		function getCookieExpiration()
+		{
+			$expire = $this->Application->ConfigValue('Comm_AffiliateCookieDuration'); // days
+			return adodb_mktime() + $expire * 24 * 60 * 60;
+		}
+
+		/**
+		 * Calculate what amount is earned by affiliate based on it's affiliate plan & store it
+		 *
+		 * @param kEvent $event
+		 * @author Alex
+		 */
+		function OnOrderApprove(&$event)
+		{
+			$order =& $this->Application->recallObject( $event->getEventParam('Order_PrefixSpecial') );
+			$affiliate_id = $order->GetDBField('AffiliateId');
+			if(!$affiliate_id) return false;
+
+			$object =& $event->getObject( Array('ship_autoload' => true) );
+			if( $object->Load($affiliate_id) )
+			{
+				$affiliate_plan =& $this->Application->recallObject('ap', null, Array('skip_autoload'=>true) );
+				$affiliate_plan->Load( $object->GetDBField('AffiliatePlanId') );
+				if( $affiliate_plan->isLoaded() )
+				{
+					$sql = 'SELECT SUM(Quantity) FROM %s WHERE OrderId = %s';
+					$orderitems_table = $this->Application->getUnitOption('orditems', 'TableName');
+					$items_sold = $this->Conn->GetOne( sprintf($sql, $orderitems_table, $order->GetID() ) );
+
+					$object->SetDBField('AccumulatedAmount', $object->GetDBField('AccumulatedAmount') + $order->GetDBField('TotalAmount') );
+					$object->SetDBField('ItemsSold', $object->GetDBField('ItemsSold') + $items_sold);
+
+					switch( $affiliate_plan->GetDBField('PlanType') )
+					{
+						case 1: // by amount
+							$value = $object->GetDBField('AccumulatedAmount');
+							break;
+
+						case 2: // by items sold (count)
+							$value = $object->GetDBField('ItemsSold');
+							break;
+					}
+
+					$apb_table = $this->Application->getUnitOption('apbrackets', 'TableName');
+					$sql = 'SELECT Percent FROM %1$s WHERE (%2$s >= FromAmount) AND ( (%2$s <= ToAmount) OR (ToAmount = -1) ) AND (AffiliatePlanId = %3$s)';
+					$commission_percent = $this->Conn->GetOne( sprintf($sql, $apb_table, $this->Conn->qstr($value), $affiliate_plan->GetID() ) );
+
+					// process only orders of current affiliate from period start to this order date
+					$period_ends = $order->GetDBField('OrderDate');
+					$period_starts = $this->getPeriodStartTS( $period_ends, $affiliate_plan->GetDBField('ResetInterval') );
+					$sql = 'SELECT AffiliateCommission, (SubTotal+ShippingCost+VAT) AS TotalAmount, OrderId FROM '.$order->TableName.' WHERE OrderDate >= %s AND OrderDate <= %s';
+
+					$amount_to_pay_before = 0;
+					$amount_to_pay_after = 0;
+					$order_update_sql = 'UPDATE '.$order->TableName.' SET AffiliateCommission = %s WHERE '.$order->IDField.' = %s';
+					$orders = $this->Conn->Query( sprintf($sql, $period_starts, $period_ends), 'OrderId' );
+					if($orders)
+					{
+						foreach($orders as $order_id => $order_data)
+						{
+							$amount_to_pay_before += $order_data['AffiliateCommission'];
+							$commission = $order_data['TotalAmount'] * ($commission_percent / 100);
+							$this->Conn->Query( sprintf($order_update_sql, $this->Conn->qstr($commission), $order_id) );
+							$amount_to_pay_after += $commission;
+						}
+
+
+					}
+					$object->SetDBField('AmountToPay', $object->GetDBField('AmountToPay') - $amount_to_pay_before + $amount_to_pay_after );
+					$object->SetDBField('LastOrderDate_date', $order->GetDBField('OrderDate_date') );
+					$object->SetDBField('LastOrderDate_time', $order->GetDBField('OrderDate_time') );
+					$object->Update();
+
+					$order->SetDBField('AffiliateCommission', $commission); // set last commission to this order, because ApproveEvent was called for him
+				}
+			}
+		}
+
+		function OnCheckAffiliateAgreement(&$event)
+		{
+			$user_object =& $this->Application->recallObject('u', null, Array('skip_autoload' => true));
+
+			$items_info = $this->Application->GetVar('u');
+			if($items_info)
+			{
+				list($id,$field_values) = each($items_info);
+				$user_object->SetFieldsFromHash($field_values);
+				$user_object->setID($id);
+				$user_object->setLogin();
+			}
+
+			$require_affiliate = ($this->Application->GetVar('RegisterAsAffiliate') == 'on');
+
+			if($require_affiliate && !$this->Application->GetVar('AgreeToAffiliateTerms') )
+			{
+				$this->Application->SetVar('MustAgreeToTerms', 1);
+				$event->MasterEvent->status = erFATAL;
+			}
+
+			if($require_affiliate && !$this->Application->GetVar('SSN') )
+			{
+				$this->Application->SetVar('SSNRequiredError', 1);
+				$event->MasterEvent->status = erFATAL;
+			}
+
+			if( ($event->MasterEvent->status == erFATAL) && $items_info ) $user_object->Validate();
+		}
+
+		/**
+		 * [AFTER HOOK] to u:OnCreate
+		 *
+		 * @param kEvent $event
+		 */
+		function OnRegisterAsAffiliate(&$event)
+		{
+			if($this->Application->GetVar('RegisterAsAffiliate') != 'on' || $event->MasterEvent->status != erSUCCESS)
+			{
+				return;
+			}
+			$object =& $event->getObject( Array('skip_autoload' => true) );
+
+			$sql = 'SELECT AffiliatePlanId FROM '.$this->Application->getUnitOption('ap', 'TableName').'
+					WHERE IsPrimary = 1';
+			$affiliate_plan = $this->Conn->GetOne($sql);
+			$object->SetDBField('PortalUserId', $this->Application->GetVar('u.current_id'));
+			$object->SetDBField('Status', 2);
+			$object->SetDBField('AffiliatePlanId', $affiliate_plan);
+			$object->SetDBField('SSN', $this->Application->GetVar('SSN'));
+			$object->SetDBField('Comments', $this->Application->GetVar('Comments'));
+			$object->SetDBField('PaymentTypeId', $this->Application->GetVar('PaymentTypeId'));
+
+			$object->Create();
+
+			$email_event_user =& $this->Application->EmailEventUser('AFFILIATE.REGISTER', $this->Application->GetVar('u.current_id'));
+			$email_event_admin =& $this->Application->EmailEventAdmin('AFFILIATE.REGISTER');
+		}
+
+		function OnBecomeAffiliate(&$event)
+		{
+			if(!$this->Application->GetVar('AgreeToAffiliateTerms'))
+			{
+				$this->Application->SetVar('MustAgreeToTerms', 1);
+				$event->status = erFATAL;
+			}
+			if(!$this->Application->GetVar('SSN'))
+			{
+				$this->Application->SetVar('SSNRequiredError', 1);
+				$event->status = erFATAL;
+			}
+			if($event->status == erFATAL)
+			{
+				return;
+			}
+			$object =& $event->getObject( Array('skip_autoload' => true) );
+			$sql = 'SELECT AffiliatePlanId FROM '.$this->Application->getUnitOption('ap', 'TableName').'
+					WHERE IsPrimary = 1';
+			$affiliate_plan = $this->Conn->GetOne($sql);
+			$object->SetDBField('PortalUserId', $this->Application->RecallVar('user_id'));
+			$object->SetDBField('Status', 2);
+			$object->SetDBField('AffiliatePlanId', $affiliate_plan);
+			$object->SetDBField('SSN', $this->Application->GetVar('SSN'));
+			$object->SetDBField('Comments', $this->Application->GetVar('Comments'));
+			$object->SetDBField('PaymentTypeId', $this->Application->GetVar('PaymentTypeId'));
+
+			$object->Create();
+			if($next_template = $this->Application->GetVar('next_template'))
+			{
+				$event->redirect = $next_template;
+			}
+
+			$email_event_user =& $this->Application->EmailEventUser('AFFILIATE.REGISTER', $this->Application->RecallVar('user_id'));
+			$email_event_admin =& $this->Application->EmailEventAdmin('AFFILIATE.REGISTER');
+		}
+
+		function OnChangePaymentType(&$event)
+		{
+			$user_id = $this->Application->RecallVar('user_id');
+
+			$object =& $event->getObject( Array('skip_autoload' => true) );
+			$object->Load( Array('PortalUserId' => $user_id) );
+			$object->SetDBField('Comments', $this->Application->GetVar('Comments'));
+			$object->SetDBField('PaymentTypeId', $this->Application->GetVar('PaymentTypeId'));
+			$object->Update();
+
+			$email_event_user =& $this->Application->EmailEventUser('AFFILIATE.PAYMENT.TYPE.CHANGED', $user_id);
+			$email_event_admin =& $this->Application->EmailEventAdmin('AFFILIATE.PAYMENT.TYPE.CHANGED');
+
+			$event->redirect = $this->Application->GetVar('next_template');
+			$event->status = erSUCCESS;
+		}
+
+		/**
+		 * If new payments made, then send email about that
+		 *
+		 * @param kEvent $event
+		 */
+		function OnBeforeDeleteFromLive(&$event)
+		{
+			$payment_object =& $this->Application->recallObject('apayments', 'apayments', Array('skip_autoload' => true) );
+
+			$id = $event->getEventParam('id');
+			$ap_table = $this->Application->getUnitOption('apayments', 'TableName');
+
+			$sql = 'SELECT AffiliatePaymentId FROM '.$ap_table.' WHERE AffiliateId = '.$id;
+			$live_ids = $this->Conn->GetCol($sql);
+
+			$sql = 'SELECT AffiliatePaymentId FROM '.$payment_object->TableName.' WHERE AffiliateId = '.$id;
+			$temp_ids = $this->Conn->GetCol($sql);
+
+			$new_ids = array_diff($temp_ids, $live_ids);
+			foreach($new_ids as $payment_id)
+			{
+				$payment_object->Load($payment_id);
+				$email_event_user =& $this->Application->EmailEventUser('AFFILIATE.PAYMENT', $payment_object->GetDBField('PortalUserId'));
+				$email_event_admin =& $this->Application->EmailEventAdmin('AFFILIATE.PAYMENT');
+			}
+
+			$object =& $event->getObject();
+			$passed_id = $event->getEventParam('id');
+			if( $object->GetID() != $passed_id )
+			{
+				$object->Load($passed_id);
+			}
+			$sql = 'SELECT Status FROM '.$this->Application->getUnitOption( $event->Prefix, 'TableName' ).' WHERE '.$object->IDField.' = '.$object->GetID();
+			$old_status = $this->Conn->GetOne($sql);
+			if( $old_status == 2 && $object->GetDBField('Status') == 1 )
+			{
+				$email_event_user =& $this->Application->EmailEventUser('AFFILIATE.REGISTRATION.APPROVED', $object->GetDBField('PortalUserId'));
+				$email_event_admin =& $this->Application->EmailEventAdmin('AFFILIATE.REGISTRATION.APPROVED');
+			}
+		}
+
+		/**
+		 * Resets statistics (accumulated amount & items sold) for affiliates based on ResetInterval in their plan
+		 *
+		 * @param kEvent $event
+		 * @author Alex
+		 */
+		function OnResetStatistics(&$event)
+		{
+			$intervals = Array(86400 => 'la_day', 604800 => 'la_week', 2628000 => 'la_month', 7884000 => 'la_quartely', 31536000 => 'la_year');
+
+			$affil_table = $this->Application->getUnitOption($event->Prefix, 'TableName');
+			$ap_table = $this->Application->getUnitOption('ap', 'TableName');
+
+			$sql = 'SELECT AffiliateId
+					FROM '.$affil_table.' a
+					LEFT JOIN '.$ap_table.' ap ON a.AffiliatePlanId = ap.AffiliatePlanId';
+
+			$base_time = adodb_mktime();
+			$where_clause = Array();
+			foreach($intervals as $interval_length => $interval_description)
+			{
+				$start_timestamp = $this->getPeriodStartTS($base_time, $interval_length);
+				$where_clause[] = 'ap.ResetInterval = '.$interval_length.' AND LastOrderDate < '.$start_timestamp;
+			}
+			$sql .= ' WHERE ('.implode(') OR (', $where_clause).')';
+
+			$affiliate_ids = $this->Conn->GetCol($sql);
+
+			if( $this->Application->isDebugMode() )
+			{
+				$this->Application->Debugger->appendHTML('Affiliates Pending Totals Reset: ');
+				print_pre($affiliate_ids);
+			}
+
+			$sql = 'UPDATE '.$affil_table.' SET AccumulatedAmount = 0, ItemsSold = 0, LastOrderDate = %s WHERE AffiliateId IN (%s)';
+			if($affiliate_ids) $this->Conn->Query( sprintf($sql, $base_time, implode(',', $affiliate_ids) ) );
+		}
+
+		/**
+		 * Returns calendar period start timestamp based on current timestamp ($base_time) and $period_length
+		 *
+		 * @param int $base_time
+		 * @param int $period_length
+		 * @return int
+		 * @author Alex
+		 */
+		function getPeriodStartTS($base_time, $period_length)
+		{
+			switch($period_length)
+			{
+				case 86400:	// day
+					$start_timestamp = adodb_mktime(0,0,0, adodb_date('m', $base_time), adodb_date('d', $base_time), adodb_date('Y', $base_time) );
+					break;
+
+				case 604800: // week
+					$day_seconds = 86400;
+					$first_week_day = $this->Application->ConfigValue('FirstDayOfWeek');
+					$morning = adodb_mktime(0,0,0, adodb_date('m', $base_time), adodb_date('d', $base_time), adodb_date('Y', $base_time) );
+					$week_day = adodb_date('w', $morning);
+					if($week_day == $first_week_day)
+					{
+						// if it is already first week day, then don't search for previous week day
+						$day_diff = 0;
+					}
+					else
+					{
+						// this way, because sunday is 0, but not 7 as it should be
+						$day_diff = $week_day != 0 ? $week_day - $first_week_day: 7 - $first_week_day;
+					}
+					$start_timestamp = $morning - $day_diff * $day_seconds;
+					break;
+
+				case 2628000: // month
+					$start_timestamp = adodb_mktime(0,0,0, adodb_date('m', $base_time), 1, adodb_date('Y', $base_time) );
+					break;
+
+				case 7884000: // quartal
+					$first_quartal_month = (ceil( adodb_date('m', $base_time) / 3)-1)*3 + 1;
+					$start_timestamp = adodb_mktime(0,0,0, $first_quartal_month, 1, adodb_date('Y', $base_time) );
+					break;
+
+				case 31536000:
+					$start_timestamp = adodb_mktime(0,0,0,1,1, adodb_date('Y', $base_time) );
+					break;
+			}
+			return $start_timestamp;
+		}
+
+		function iterateItems(&$event)
+		{
+			if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
+				return;
+			}
+
+			$object =& $event->getObject( Array('skip_autoload' => true) );
+			$ids = $this->StoreSelectedIDs($event);
+
+			if($ids)
+			{
+				$status_field = array_shift( $this->Application->getUnitOption($event->Prefix,'StatusField') );
+
+				foreach($ids as $id)
+				{
+					$object->Load($id);
+
+					switch ($event->Name)
+					{
+						case 'OnMassApprove':
+							$object->SetDBField($status_field, 1);
+							break;
+
+						case 'OnMassDecline':
+							$object->SetDBField($status_field, 0);
+							break;
+
+						case 'OnMassMoveUp':
+							$object->SetDBField('Priority', $object->GetDBField('Priority') + 1);
+							break;
+
+						case 'OnMassMoveDown':
+							$object->SetDBField('Priority', $object->GetDBField('Priority') - 1);
+							break;
+					}
+
+					if( $object->Update() )
+					{
+						switch ($event->Name)
+						{
+							case 'OnMassApprove':
+								$email_event_user =& $this->Application->EmailEventUser('AFFILIATE.REGISTRATION.APPROVED', $object->GetDBField('PortalUserId'));
+								$email_event_admin =& $this->Application->EmailEventAdmin('AFFILIATE.REGISTRATION.APPROVED');
+								break;
+							case 'OnMassDecline':
+								$email_event_user =& $this->Application->EmailEventUser('AFFILIATE.REGISTRATION.DENIED', $object->GetDBField('PortalUserId'));
+								$email_event_admin =& $this->Application->EmailEventAdmin('AFFILIATE.REGISTRATION.DENIED');
+								break;
+						}
+						$event->status=erSUCCESS;
+						$event->redirect_params = Array('opener' => 's'); //stay!
+					}
+					else
+					{
+						$event->status=erFAIL;
+						$event->redirect=false;
+						break;
+					}
+				}
+			}
+		}
+
+		/**
+		 * Checks that user in affiliate record matches current user
+		 * (non permission-based)
+		 *
+		 * @param kEvent $event
+		 * @return bool
+		 */
+		function checkItemStatus(&$event)
+		{
+			if ($this->Application->IsAdmin()) {
+				return true;
+			}
+
+			$object =& $event->getObject();
+			if (!$object->isLoaded()) {
+				return true;
+			}
+
+			return $object->GetDBField('PortalUserId') == $this->Application->RecallVar('user_id');
+		}
+	}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/affiliates/affiliates_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.40
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/taxesdestinations/taxes_dst_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/taxesdestinations/taxes_dst_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/taxesdestinations/taxes_dst_event_handler.php	(revision 12131)
@@ -0,0 +1,166 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class TaxDstEventHandler extends kDBEventHandler {
+
+	/**
+	 * Saves items
+	 *
+	 * @param kEvent $event
+	 */
+	function OnSaveDestinations(&$event){
+
+		$object =& $event->getObject( Array('skip_autoload' => true) );
+		$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
+
+		$tax_object =& $this->Application->recallObject('tax');
+
+		$std_dest_id=$this->Application->GetVar('StatesCountry');
+
+		if($items_info)
+		{
+			$taxdest =& $this->Application->recallObject($event->getPrefixSpecial(true), null);
+			$parent_info=&$object->GetLinkedInfo();
+
+			$queryDel="DELETE FROM ".$object->TableName." WHERE TaxZoneId=".$parent_info['ParentId'];
+			$this->Conn->Query($queryDel);
+
+			foreach($items_info as $id => $field_values)
+			{
+				if($tax_object->GetDBField('Type') == 3 && (!$field_values['DestValue'] || $field_values['DestValue']=='')){
+					continue;
+				}
+
+				if (!$field_values['StdDestId']){
+					$field_values['StdDestId']=$std_dest_id;
+				}
+
+				$field_values['TaxZoneId']=$parent_info['ParentId'];
+
+				if ($taxdest->Load($field_values['TaxZoneDestId'], "TaxZoneDestId")){
+					$taxdest->SetFieldsFromHash($field_values);
+					$taxdest->Update($field_values['TaxZoneDestId']);
+				}else{
+					$taxdest->SetFieldsFromHash($field_values);
+					$taxdest->Create($field_values['TaxZoneDestId']);
+				}
+
+			}
+
+		}
+
+
+	}
+
+	/**
+	 * Creates item from submit data
+	 *
+	 * @param kEvent $event
+	 */
+
+	function OnCreate(&$event)
+	{
+		$object =& $event->getObject( Array('skip_autoload' => true) );
+
+		$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
+		if($items_info)
+		{
+			foreach($items_info as $id => $field_values)
+			{
+				$object->SetFieldsFromHash($field_values);
+				$this->customProcessing($event,'before');
+
+				if( $object->Create() )
+				{
+					if( $object->IsTempTable() ) $object->setTempID();
+					$this->customProcessing($event,'after');
+					$event->status=erSUCCESS;
+				}
+				else
+				{
+					$event->status=erFAIL;
+					$event->redirect=false;
+					$this->Application->SetVar($event->Prefix_Special.'_SaveEvent','OnCreate');
+					$object->setID(0);
+				}
+			}
+		}
+	}
+
+	function customProcessing(&$event, $type)
+	{
+		switch($type)
+		{
+			case 'before':
+				$object =& $event->getObject();
+				$events = $this->Application->GetVar('events');
+				if($events['tax'] == 'OnUpdate')
+				{
+					$object->SetDBField('TaxZoneId', $this->Application->GetVar('tax_id'));
+				}
+				$tax_object =& $this->Application->recallObject('tax');
+				if($tax_object->GetDBField('Type') == 3)
+				{
+					$tax_object->SetDBField('StdDestId', $this->Application->GetVar('StatesCountry'));
+				}
+				break;
+			default:
+		}
+	}
+
+	 /**
+	 *
+	 *
+	 * @param kEvent $event
+	 */
+	function OnZoneUpdate(&$event) {
+
+		$object = &$event->getObject();
+
+		$zone_object = &$this->Application->recallObject('tax');
+		$zone_id = (int)$this->Application->GetVar('tax_id');
+		$zone_type = $zone_object->GetDBField('Type');
+
+		$delete_zones_sql = 'DELETE FROM '.$object->TableName.' WHERE TaxZoneId = '.$zone_id;
+		$this->Conn->Query($delete_zones_sql);
+
+		$selected_destinations = $this->Application->GetVar('selected_destinations');
+		$selected_destinations_array = explode(',', $selected_destinations);
+		$selected_destinations_array = array_unique($selected_destinations_array);
+
+		foreach ($selected_destinations_array as $key => $dest_id) {
+
+					if ($zone_object->GetDBField('Type') == 3){
+						list ($tax_dest_id, $dest_value) = explode('|', $dest_id);
+						$dest_id = $this->Application->GetVar('CountrySelector');
+					}
+					else {
+						$dest_value = '';
+					}
+
+					if ($dest_id > 0){
+						$object->SetDBField('TaxZoneId', $zone_id);
+						$object->SetDBField('StdDestId', $dest_id);
+						$object->SetDBField('DestValue', $dest_value);
+						$object->Create();
+						$object->setTempID();
+					}
+
+		}
+
+
+	}
+
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/taxesdestinations/taxes_dst_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/taxesdestinations/taxesdestinations_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/taxesdestinations/taxesdestinations_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/taxesdestinations/taxesdestinations_config.php	(revision 12131)
@@ -0,0 +1,88 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+	
+$config	=	Array(
+					'Prefix'			=>	'taxdst',
+					'ItemClass'			=>	Array('class'=>'kDBItem','file'=>'images.php','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'TaxDstEventHandler','file'=>'taxes_dst_event_handler.php','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
+					'AutoLoad'			=>	true,
+					'hooks'				=>	Array(),
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'page',
+												3	=>	'event',
+											),
+											
+					'Hooks'				=>	Array( 
+							/*Array(
+								'Mode' => hAFTER,
+								'Conditional' => true,
+								'HookToPrefix' => 'tax',
+								'HookToSpecial' => '',
+								'HookToEvent' => Array( 'onPreSave', 'onPreSaveAndGo' ),
+								'DoPrefix' => '',
+								'DoSpecial' => '',
+								'DoEvent' => 'OnSaveDestinations',
+							),*/
+							Array(
+								'Mode' => hAFTER,
+								'Conditional' => false,
+								'HookToPrefix' => '#PARENT#',
+								'HookToSpecial' => '',
+								'HookToEvent' => Array( 'OnPreSave', 'OnUpdate'),
+								'DoPrefix' => '',
+								'DoSpecial' => '',
+								'DoEvent' => 'OnZoneUpdate',
+							),							
+						),		
+						
+						//OnAfterItemUpdate
+					'IDField'			=>	'TaxZoneDestId',
+					'TableName'			=>	TABLE_PREFIX.'TaxZonesDestinations',
+					
+					'ParentTableKey'=>	'TaxZoneId',	// linked field in master table
+					'ForeignKey'	=>	'TaxZoneId',	// linked field in subtable
+					'ParentPrefix' => 'tax',
+					'AutoDelete'	=>	true,
+					'AutoClone'		=>	true,
+										
+					'ListSQLs'			=>	Array(	''=>'SELECT * FROM %s',
+																		), // key - special, value - list select sql
+					'ItemSQLs'			=>	Array(	''=>'SELECT * FROM %s',
+																		),
+					
+					'Fields' => Array (
+						'TaxZoneDestId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+						'TaxZoneId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+						'StdDestId' => Array ('type' => 'int', 'default' => 0),
+						'DestValue' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL),
+					),
+					
+					/*'Grids'	=> Array(
+								'Default'		=>	Array(
+																	'Icons' => Array('default'=>'icon17_custom.gif',1=>'icon16_image.gif',0=>'icon16_image_disabled.gif'),
+																	'Fields' => Array(
+																			'Name' => Array( 'title'=>'la_col_ImageName' , 'data_block' => 'grid_checkbox_td'),
+																			'AltName' => Array( 'title'=>'la_col_AltName' ),
+																			'Url' => Array( 'title'=>'la_col_ImageUrl', 'data_block' => 'image_url_td' ),
+																			'Enabled' => Array( 'title'=>'la_col_ImageEnabled' ),
+																			'Preview' => Array( 'title'=>'la_col_Preview', 'data_block' => 'preview' ),
+																		),
+																	
+																),
+													),*/
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/taxesdestinations/taxesdestinations_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.8
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/discounts/discounts_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/discounts/discounts_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/discounts/discounts_event_handler.php	(revision 12131)
@@ -0,0 +1,30 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class DiscountsEventHandler extends kDBEventHandler {
+
+	function OnBeforeItemUpdate(&$event)
+	{
+		$object =& $event->getObject();
+		$object->SetDBField( 'Amount', abs($object->GetDBField('Amount')) );
+	}
+
+	function OnBeforeItemCreate(&$event)
+	{
+		$this->OnBeforeItemUpdate($event);
+	}
+}
+
+
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/discounts/discounts_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/discounts/discounts_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/discounts/discounts_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/discounts/discounts_config.php	(revision 12131)
@@ -0,0 +1,140 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+$config	=	Array(
+					'Prefix'			=>	'd',
+					'ItemClass'			=>	Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class'=>'DiscountsEventHandler','file'=>'discounts_event_handler.php','build_event'=>'OnBuild'),
+					'TagProcessorClass' =>	Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
+					'AutoLoad'			=>	true,
+					'hooks'				=>	Array(),
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'page',
+												3	=>	'event',
+												4 =>	'mode', // 't' for temp '' for normal
+											),
+					'IDField'			=>	'DiscountId',
+					'StatusField'		=>	Array('Status'),
+					'TitleField'		=>	'Name',
+					'TableName'			=>	TABLE_PREFIX.'ProductsDiscounts',
+					'SubItems' => Array('di'),
+
+					'TitlePresets'		=>	Array(
+												'default'	=>	Array(	'new_status_labels'		=> Array('d'=>'!la_title_Adding_Discount!'),
+																		'edit_status_labels'	=> Array('d'=>'!la_title_Editing_Discount!'),
+																		'new_titlefield'		=> Array('d'=>'!la_title_New_Discount!'),
+																),
+
+												'discounts_list'=>Array('prefixes'				=>	Array('d_List'),
+																		'format'				=>	"!la_title_Discounts!",
+																),
+
+												'discount_edit'=>Array(	'prefixes'				=> Array('d'),
+																		'format'				=> "#d_status# '#d_titlefield#' - !la_title_General!",
+																),
+
+												'discount_items'=>Array('prefixes'				=> Array('d','di_List'),
+																		'format'				=> "#d_status# '#d_titlefield#' - !la_title_DiscountItems!",
+																),
+
+													),
+
+					'EditTabPresets' => Array (
+						'Default' => Array (
+							'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/discounts/discount_edit', 'priority' => 1),
+							'items' => Array ('title' => 'la_tab_DiscountItems', 't' => 'in-commerce/discounts/discount_items', 'priority' => 2),
+						),
+					),
+
+					'PermSection'		=>	Array('main' => 'in-commerce:discounts'),
+
+					'Sections'			=>	Array(
+						'in-commerce:discounts_folder'	=>	Array(
+							'parent' => 'in-commerce',
+							'use_parent_header' => 1,
+							'icon'			=>	'discounts',
+							'label'			=>	'la_tab_DiscountsAndCoupons',
+							'permissions'	=>	Array(),
+							'priority'		=>	5,
+							'type'			=>	stTREE,
+						),
+
+						'in-commerce:discounts'	=>	Array(
+							'parent'		=>	'in-commerce:discounts_folder',
+							'icon'			=>	'discounts',
+							'label'			=>	'la_tab_Discounts',
+							'url'			=>	Array('t' => 'in-commerce/discounts/discounts_list', 'pass' => 'm'),
+							'permissions'	=>	Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'),
+							'priority'		=>	2.1, // <parent_priority>.<own_priority>, because this section replaces parent in tree
+							'type'			=>	stTAB,
+						),
+					),
+
+					'FilterMenu'		=>	Array(
+												'Groups' => Array(
+													Array('mode' => 'AND', 'filters' => Array(0,1,2), 'type' => WHERE_FILTER),
+													Array('mode' => 'AND', 'filters' => Array(4,5,6), 'type' => WHERE_FILTER),
+												),
+												'Filters' => Array(
+													0	=>	Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => 'Status != 1' ),
+													1	=>	Array('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => 'Status != 2'  ),
+													2	=>	Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => 'Status != 0'  ),
+													3	=>	Array(),
+													4	=>	Array('label' => 'la_Flat', 'on_sql' => '', 'off_sql' => 'Type != 1'  ),
+													5	=>	Array('label' => 'la_Percent', 'on_sql' => '', 'off_sql' => 'Type != 2'  ),
+													6	=>	Array('label' => 'la_FreeShipping', 'on_sql' => '', 'off_sql' => 'Type != 3'  ),
+												)
+											),
+
+					'ListSQLs'			=>	Array(	''=>'SELECT %1$s.* %2$s FROM %1$s',
+																		), // key - special, value - list select sql
+					'ItemSQLs'			=>	Array(	''=>'SELECT * FROM %1$s',
+																		),
+
+					'ListSortings'	=> 	Array(
+																'' => Array(
+																	'Sorting' => Array('Name' => 'asc'),
+																)
+															),
+					'Fields'			=>	Array(
+											    'DiscountId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+											    'Status' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'default' => 2 ),
+											    'Name' => Array('type'=>'string','required' => 1, 'default' => null, 'max_len'=>255),
+											    'Start' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
+											    'End' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null),
+											    'GroupId' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalGroup WHERE Personal = 0 ORDER BY Name', 'option_key_field'=>'GroupId', 'option_title_field'=>'Name', 'default' => 0),
+											    'Type' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_Flat', 2 => 'la_Percent'/*, 3 => 'la_FreeShipping'  */), 'default' => 1 ),
+											    'Amount' => Array('type'=>'double', 'default' => null),
+
+											),
+
+					'Grids'	=> Array(
+								'Default'		=>	Array(
+															'Icons' => Array('default'=>'icon16_custom.gif',1=>'icon16_discount.gif',2=>'icon16_discount_pending.gif',0=>'icon16_discount_disabled.gif'),
+															'Fields' => Array(
+																			'DiscountId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+																			'Name' => Array( 'title'=>'la_col_Name', 'filter_block' => 'grid_like_filter'),
+																			'Start' => Array( 'title'=>'la_col_Start', 'filter_block' => 'grid_date_range_filter'),
+																			'End' => Array( 'title'=>'la_col_End', 'filter_block' => 'grid_date_range_filter'),
+																			'GroupId' => Array( 'title'=>'la_col_Group', 'filter_block' => 'grid_options_filter'),
+																			'Type' => Array( 'title'=>'la_col_Type', 'filter_block' => 'grid_options_filter'),
+																			'Amount' => Array( 'title'=>'la_col_Amount', 'filter_block' => 'grid_float_range_filter'),
+																		),
+
+													),
+								),
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/discounts/discounts_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.18.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/order_items/order_items_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/order_items/order_items_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/order_items/order_items_event_handler.php	(revision 12131)
@@ -0,0 +1,204 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	class OrderItemsEventHandler extends kDBEventHandler
+	{
+
+
+		/**
+		 * Allows to override standart permission mapping
+		 *
+		 */
+		function mapPermissions()
+		{
+			parent::mapPermissions();
+			$permissions = Array(
+									'OnSaveItems'	=>	Array('subitem' => 'add|edit'),
+							);
+			$this->permMapping = array_merge($this->permMapping, $permissions);
+		}
+
+		/**
+		 * Processes item selection from popup item selector
+		 *
+		 * @param kEvent $event
+		 */
+		function OnProcessSelected(&$event)
+		{
+			$object =& $event->getObject( Array('skip_autoload' => true) );
+
+			$selected_ids = $this->Application->GetVar('selected_ids');
+			$product_ids = $selected_ids['p'];
+
+			if ($product_ids) {
+				//after adding Options Selection during adding products to order in admin, selector is in single mode
+				// = allows selecting one item at a time, but we leave this code just in case :)
+				$product_ids = explode(',', $product_ids);
+
+				$product_object =& $this->Application->recallObject('p.-item', null, array('skip_autoload' => true));
+
+				foreach ($product_ids as $product_id) {
+					$product_object->Load($product_id);
+
+					$sql = 'SELECT COUNT(*)
+							FROM ' . $this->Application->getUnitOption('po', 'TableName') . '
+							WHERE (Required = 1) AND (ProductId = ' . $product_id . ')';
+
+					if ( $this->Conn->GetOne($sql) ) {
+						$url_params = Array (
+							$event->Prefix . '_event' => 'OnNew',
+							'p_id' => $product_id,
+							'm_opener' => 's',
+						);
+
+						$this->Application->EventManager->openerStackPush('in-commerce/orders/order_product_edit', $url_params, 'm,ord,p');
+					}
+					else {
+						$orders_h =& $this->Application->recallObject('ord_EventHandler');
+						/* @var $orders_h OrdersEventHandler */
+
+						// 1 for PacakgeNum - temporary solution to overcome splitting into separate sub-orders
+						// of orders with items added through admin when approving them
+						$orders_h->AddItemToOrder($event, $product_id, null, 1);
+					}
+				}
+			}
+
+			$this->finalizePopup($event);
+		}
+
+		/**
+		 * Updates subtotal field in order record.
+		 * Only for "Items" tab in "Orders -> Order Edit" in Admin
+		 *
+		 * @param kEvent $event
+		 */
+		function OnUpdate(&$event)
+		{
+			parent::OnUpdate($event);
+			if ( ($this->Application->GetVar('t') != 'in-commerce/orders/orders_edit_items') ) {
+				return true;
+			}
+
+			$object =& $event->getObject();
+
+			$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
+			if (!$items_info) {
+				return ;
+			}
+
+			$sub_total = $this->getSubTotal($items_info);
+			$return_total = $this->getReturnTotal($items_info);
+
+			$table_info = $object->getLinkedInfo();
+			$main_object =& $this->Application->recallObject($table_info['ParentPrefix']);
+
+			if ($sub_total !== false) {
+				$main_object->SetDBField('SubTotal', $sub_total);
+			}
+
+			$main_object->SetDBField('ReturnTotal', $return_total);
+			$main_object->Update();
+		}
+
+		/**
+		 * Returns subtotal
+		 *
+		 * @param Array $items_info
+		 * @return float
+		 */
+		function getSubTotal($items_info)
+		{
+			$sub_total = 0;
+			foreach ($items_info as $id => $field_values) {
+				if (!array_key_exists('Price', $field_values)) {
+					return false;
+				}
+				$sub_total += $field_values['Quantity'] * $field_values['Price'];
+			}
+
+			return $sub_total;
+		}
+
+		/**
+		 * Returns total returned amount (refund)
+		 *
+		 * @param Array $items_info
+		 * @return float
+		 */
+		function getReturnTotal($items_info)
+		{
+			$return_total = 0;
+			foreach ($items_info as $id => $field_values) {
+				$return_total += $field_values['ReturnAmount'];
+			}
+
+			return $return_total;
+		}
+
+		/**
+		 * Saves selected items
+		 *
+		 * @param kEvent $event
+		 */
+		function OnSaveItems(&$event)
+		{
+			$event->CallSubEvent('OnUpdate');
+			$event->redirect = false;
+			$event->redirect_params = Array('opener'=>'s','pass'=>'all');
+		}
+
+		/**
+		 * Occures after an item has been cloned
+		 * Id of newly created item is passed as event' 'id' param
+		 *
+		 * @param kEvent $event
+		 */
+		function OnAfterClone(&$event)
+		{
+			$id = $event->getEventParam('id');
+			$table = $this->Application->getUnitOption($event->Prefix,'TableName');
+			$id_field = $this->Application->getUnitOption($event->Prefix,'IDField');
+			$sql = 'UPDATE '.$table.' SET QuantityReserved = NULL WHERE '.$id_field.' = '.$id;
+			$this->Conn->Query($sql);
+		}
+
+		function OnAfterItemLoad(&$event)
+		{
+			$object =& $event->getObject();
+			if( $item_info = $object->GetDBField('ItemData') )
+			{
+				$item_info = unserialize($item_info);
+				$object->SetDBField('DiscountType', getArrayValue($item_info, 'DiscountType'));
+				$object->SetDBField('DiscountId', getArrayValue($item_info, 'DiscountId'));
+			}
+		}
+
+
+		function SetCustomQuery(&$event)
+		{
+			parent::SetCustomQuery($event);
+
+			$object =& $event->getObject();
+
+			$package_num = $event->getEventParam('package_num');
+			if ($package_num) $object->addFilter('package_num', 'PackageNum = '.$package_num);
+
+			$type = $event->getEventParam('product_type');
+			if ($type) {
+				$object->addFilter('product_type', 'p.Type ='.$type);
+			}
+		}
+	}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/order_items/order_items_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.17.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/order_items/order_items_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/order_items/order_items_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/order_items/order_items_config.php	(revision 12131)
@@ -0,0 +1,162 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	$config = Array (
+		'Prefix' => 'orditems',
+		'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+		'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+		'EventHandlerClass' => Array('class' => 'OrderItemsEventHandler', 'file' => 'order_items_event_handler.php', 'build_event' => 'OnBuild'),
+		'TagProcessorClass' => Array('class' => 'OrderItemsTagProcessor', 'file' => 'order_items_tag_processor.php', 'build_event' => 'OnBuild'),
+
+		'AutoLoad' => true,
+
+		'AggregateTags' => Array (
+			Array (
+				'AggregateTo' => '#PARENT#',
+				'AggregatedTagName' => 'ItemFieldEquals',
+				'LocalTagName' => 'FieldEquals',
+			),
+		),
+
+		'Hooks' => Array (
+			Array (
+				'Mode' => hBEFORE,
+				'Conditional' => false,
+				'HookToPrefix' => '#PARENT#',
+				'HookToSpecial' => '',
+				'HookToEvent' => Array('OnPreSave', 'OnRecalculateItems'),
+				'DoPrefix' => '',
+				'DoSpecial' => '',
+				'DoEvent' => 'OnUpdate',
+			),
+		),
+
+		'QueryString' => Array (
+			1 => 'id',
+			2 => 'page',
+			3 => 'event',
+		),
+
+		'IDField' => 'OrderItemId',
+		'TitleField' => 'OrderItemId',
+		'StatusField' => Array ('Status'),
+
+		'TableName' => TABLE_PREFIX.'OrderItems',
+
+		'ParentTableKey' => 'OrderId',
+		'ForeignKey' => 'OrderId',
+		'ParentPrefix' => 'ord',
+		'AutoDelete' => true,
+		'AutoClone' => true,
+
+		'ItemType' => 11,
+
+		'CalculatedFields' => Array (
+			''	=> Array (
+				'ExtendedPrice' => '%1$s.Price * %1$s.Quantity',
+				'ExtendedPriceFlat' => '%1$s.FlatPrice * %1$s.Quantity',
+				'QuantityAvailable' => 'IF( ISNULL(p.QtyInStock) AND ISNULL(p.ProductId),"!la_ProductDeleted!", IF(p.Type = 1, IF(p.InventoryStatus = 2, poc.QtyInStock, p.QtyInStock), "") )',
+				'ItemDiscount' => '(%1$s.FlatPrice - %1$s.Price)',
+				'SKU' => 'IF(p.InventoryStatus = 2 OR NOT ISNULL(poc.CombinationCRC), poc.SKU, p.SKU)', // inventory by options OR combination found
+			),
+		),
+
+		'ListSQLs' => Array (
+			'' => '	SELECT %1$s.*, p.* %2$s
+					FROM %1$s
+					LEFT JOIN '.TABLE_PREFIX.'Products p ON %1$s.ProductId = p.ProductId
+					LEFT JOIN '.TABLE_PREFIX.'ProductOptionCombinations poc ON (%1$s.ProductId = poc.ProductId) AND (%1$s.OptionsSalt = poc.CombinationCRC)',
+		),
+
+		'ItemSQLs' => Array (
+			'' => 'SELECT *, (Quantity*Price) AS ExtendedPrice, 0 AS QuantityAvailable FROM %s',
+		),
+
+		'ListSortings' => Array (
+			'' => Array (
+				'Sorting' => Array ('ProductName' => 'asc', 'BackOrderFlag' => 'asc'),
+			)
+		),
+
+		'Fields' => Array (
+			'OrderItemId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+			'OrderId' => Array('type' => 'int','not_null' => 1, 'default' => 0),
+			'ProductId' => Array('type' => 'int','not_null' => 1, 'default' => 0),
+			'ProductName' => Array('type' => 'string','not_null' => 1, 'default' => ''),
+			'Quantity' => Array('type' => 'int','not_null' => 1, 'default' => 0),
+			'QuantityReserved' => Array('type' => 'int', 'default' => null),
+			'FlatPrice' => Array('type' => 'double','formatter'=>'kFormatter','format'=>'%01.2f','not_null' => '1','default' => '0.0000'),
+			'Price' => Array('type' => 'double','formatter'=>'kFormatter','format'=>'%01.2f','not_null' => '1','default' => '0.0000'),
+			'Cost' => Array('type' => 'double','formatter'=>'kFormatter','format'=>'%01.2f','not_null' => '1','default' => '0.0000'),
+			'BackOrderFlag' => Array('type' => 'int', 'default' => 0),
+			'Weight' => Array ('type' => 'double', 'default' => NULL),
+			'ShippingTypeId' => Array ('type' => 'string', 'default' => NULL),
+			'ItemData' => Array('type' => 'string','default' => null),
+			'OptionsSalt' => Array('type' => 'int', 'default' => 0),
+			'SplitShippingGroup' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
+			'PackageNum' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
+			'ReturnType' => Array (
+				'type' => 'int',
+				'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Refund', 2 => 'la_opt_Exchange', 3 => 'la_opt_Warranty'), 'use_phrases' => 1,
+				'not_null' => 1, 'default' => 0
+			),
+		    'ReturnAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => 0),
+		    'ReturnedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
+		),
+
+		'VirtualFields' => Array (
+			'ExtendedPrice'	=>	Array('type'=>'double','formatter'=>'kFormatter','format'=>'%01.2f','default'=>'0.00'),
+			'ExtendedPriceFlat'	=>	Array('type'=>'double','formatter'=>'kFormatter','format'=>'%01.2f','default'=>'0.00'),
+			'QuantityAvailable'	=>	Array('type'=>'int','default'=>0),
+			'DiscountType'	=>	Array('type'=>'string','default'=>''),
+			'DiscountId'	=>	Array('type'=>'int','default'=>0),
+			'Name'			=>	Array('formatter' => 'kMultiLanguage'),
+			'ItemDiscount'	=>	Array('type'=>'double','formatter'=>'kFormatter','format'=>'%01.2f','default'=>'0.00'),
+			'SKU'				=>	Array('type' => 'string', 'default' => ''),
+			'MinQtyFreeShipping'=> Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
+		),
+
+		'Grids' => Array (
+			'Default' => Array (
+				'Icons' => Array ('default' => 'icon16_product.gif', 1 => 'icon16_product.gif', 2 => 'icon16_product_pending.gif', 0 => 'icon16_product_disabled.gif'),
+				'Fields' => Array (
+					'ProductName' => Array ('title' => 'la_col_ProductNameId', 'data_block' => 'grid_productname_td', 'filter_block' => 'grid_like_filter'),
+					'Quantity' => Array ('title' => 'la_col_Quantity', 'data_block' => 'grid_quantity_td', 'filter_block' => 'grid_range_filter'),
+					'QuantityReserved' => Array ('title' => 'la_col_QuantityReserved', 'filter_block' => 'grid_range_filter'),
+					'QuantityAvailable' => Array ('title' => 'la_col_QuantityAvailable', 'filter_block' => 'grid_range_filter'),
+					'Price' => Array ('title' => 'la_col_Price', 'data_block' => 'grid_price_td', 'filter_block' => 'grid_float_range_filter'),
+					'ExtendedPrice' => Array ('title' => 'la_col_ExtendedPrice', 'data_block' => 'grid_extendedprice_td', 'filter_block' => 'grid_float_range_filter'),
+
+					'ReturnType' => Array ('title' => 'la_col_ReturnType', 'data_block' => 'grid_options_td', 'filter_block' => 'grid_options_filter'),
+					'ReturnAmount' => Array ('title' => 'la_col_ReturnAmount', 'data_block' => 'grid_edit_td', 'filter_block' => 'grid_float_range_filter'),
+					'ReturnedOn' => Array ('title' => 'la_col_ReturnedOn', 'data_block' => 'grid_date_td', 'filter_block' => 'grid_date_range_filter'),
+				),
+			),
+
+			'NotEditable' => Array (
+				'Icons' => Array ('default' => 'icon16_product.gif', 1 => 'icon16_product.gif', 2 => 'icon16_product_pending.gif', 0 => 'icon16_product_disabled.gif'),
+				'Fields' => Array (
+					'ProductName' => Array ('title' => 'la_col_ProductNameId', 'data_block' => 'grid_productname_td'),
+					'Quantity' => Array ('title' => 'la_col_Quantity', 'filter_block' => 'grid_range_filter'),
+					'QuantityReserved' => Array ('title' => 'la_col_QuantityReserved', 'filter_block' => 'grid_range_filter'),
+					'QuantityAvailable' => Array ('title' => 'la_col_QuantityAvailable', 'filter_block' => 'grid_range_filter'),
+					'Price' => Array ('title' => 'la_col_Price', 'filter_block' => 'grid_float_range_filter'),
+					'ExtendedPrice' => Array ('title' => 'la_col_ExtendedPrice', 'filter_block' => 'grid_float_range_filter'),
+
+					'ReturnType' => Array ('title' => 'la_col_ReturnType', 'data_block' => 'grid_options_td', 'filter_block' => 'grid_options_filter'),
+					'ReturnAmount' => Array ('title' => 'la_col_ReturnAmount', 'data_block' => 'grid_edit_td', 'filter_block' => 'grid_float_range_filter'),
+					'ReturnedOn' => Array ('title' => 'la_col_ReturnedOn', 'data_block' => 'grid_date_td', 'filter_block' => 'grid_date_range_filter'),
+				),
+			),
+		),
+	);

Property changes on: branches/5.1.x/in-commerce/units/order_items/order_items_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.22.2.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/order_items/order_items_tag_processor.php
===================================================================
--- branches/5.1.x/in-commerce/units/order_items/order_items_tag_processor.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/order_items/order_items_tag_processor.php	(revision 12131)
@@ -0,0 +1,249 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class OrderItemsTagProcessor extends kDBTagProcessor
+{
+	function PrintGrid($params)
+	{
+
+		$order =& $this->Application->recallObject('ord');
+		if ($order->GetDBField('Status') != ORDER_STATUS_INCOMPLETE) {
+			$params['grid'] = $params['NotEditable'];
+		}
+		else {
+			$params['grid'] = $params['Editable'];
+		}
+
+		return $this->Application->ProcessParsedTag('m', 'ParseBlock', $params);
+	}
+
+	function IsTangible($params){
+		$object =& $this->Application->recallObject( $this->getPrefixSpecial() );
+		if ($object->GetDBField('Type') == 1)
+			return true;
+		else
+			return false;
+	}
+
+	function HasQty($params)
+	{
+		$object =& $this->Application->recallObject( $this->getPrefixSpecial() );
+		$type = $object->GetDBField('Type');
+		return in_array($type, array(1,6));
+	}
+
+	function HasDiscount($params)
+	{
+		$object =& $this->Application->recallObject( $this->getPrefixSpecial() );
+		return (float)$object->GetDBField('ItemDiscount') ? 1 : 0;
+	}
+
+	function HasOptions($params)
+	{
+		$object =& $this->getObject($params);
+		$item_data = @unserialize($object->GetDBField('ItemData'));
+		return isset($item_data['Options']);
+	}
+
+	function PrintOptions($params)
+	{
+		$object =& $this->getObject($params);
+		$item_data = @unserialize($object->GetDBField('ItemData'));
+
+		$render_as = $this->SelectParam($params, 'render_as');
+		$block_params['name'] = $render_as;
+
+		$opt_helper =& $this->Application->recallObject('kProductOptionsHelper');
+
+		$o = '';
+		$options = $item_data['Options'];
+		foreach ($options as $opt => $val) {
+			if (!is_array($val)) {
+				$val = unhtmlentities($val);
+			}
+			$key_data = $opt_helper->ConvertKey($opt, $object->GetDBField('ProductId'));
+
+			$parsed = $opt_helper->ExplodeOptionValues($key_data);
+			if ($parsed) {
+				$values = $parsed['Values'];
+				$prices = $parsed['Prices'];
+				$price_types = $parsed['PriceTypes'];
+			}
+			else {
+				$values = array();
+				$prices = array();
+				$price_types = array();
+			}
+
+			$key = $key_data['Name'];
+			/*if (is_array($val)) {
+				$val = join(',', $val);
+			}*/
+
+			$lang =& $this->Application->recallObject('lang.current');
+
+			if ($render_as) {
+				$block_params['option'] = $key;
+				if (is_array($val)) {
+					$block_params['value'] = $val;
+					$block_params['type'] = $key_data['OptionType'];
+					$block_params['price'] = $prices;
+					$block_params['price_type'] = $price_types;
+				}
+				else {
+					$price_type = array_key_exists($val, $price_types) ? $price_types[$val] : '';
+					$price = array_key_exists($val, $prices) ? $prices[$val] : '';
+
+					if ($price_type == '$') {
+						$iso = $this->GetISO($params['currency']);
+						$value = $this->AddCurrencySymbol($lang->formatNumber($this->ConvertCurrency($price_type, $iso),2), $iso, true); // true to force sign
+						$block_params['price'] = $value;
+						$block_params['price_type'] = '';
+						$block_params['sign'] = ''; // sign is included in the formatted value
+					}
+					else {
+						$block_params['price'] = $price;
+						$block_params['price_type'] = $price_type;
+						$block_params['sign'] = $price >= 0 ? '+' : '-';
+					}
+					$block_params['value'] = htmlspecialchars($val);
+					$block_params['type'] = $key_data['OptionType'];
+				}
+				$o.= $this->Application->ParseBlock($block_params, 1);
+			}
+			else {
+				$o .= $key.': '.$val.'<br>';
+			}
+		}
+		return $o;
+	}
+
+	function ProductsInStock($params)
+	{
+		$object =& $this->getObject($params);
+
+		if (!$object->GetDBField('InventoryStatus')) {
+			// unlimited count available
+			return false;
+		}
+
+		if ($object->GetDBField('InventoryStatus') == 2) {
+			$poc_table = $this->Application->getUnitOption('poc', 'TableName');
+			$sql = 'SELECT QtyInStock
+					FROM '.$poc_table.'
+					WHERE (ProductId = '.$object->GetDBField('ProductId').') AND (Availability = 1) AND (CombinationCRC = '.$object->GetDBField('OptionsSalt').')';
+			$ret = $this->Conn->GetOne($sql);
+		}
+		else {
+			$ret = $object->GetDBField('QtyInStock');
+		}
+
+		return $ret;
+	}
+
+	function PrintOptionValues($params)
+	{
+		$block_params['name'] = $params['render_as'];
+
+		$values = $this->Application->Parser->GetParam('value');
+		$prices = $this->Application->Parser->GetParam('price');
+		$price_types = $this->Application->Parser->GetParam('price_type');
+
+		$o = '';
+		$i = 0;
+		foreach ($values as $val) {
+			$i++;
+			$val = unhtmlentities($val);
+			$block_params['value'] = htmlspecialchars($val);
+			if ($price_types[$val] == '$') {
+				$iso = $this->GetISO($params['currency']);
+				$value = $this->AddCurrencySymbol(sprintf("%.2f", $this->ConvertCurrency($prices[$val], $iso)), $iso, true); // true to force sign
+				$block_params['price'] = $value;
+				$block_params['price_type'] = '';
+				$block_params['sign'] = ''; // sign is included in the formatted value
+			}
+			else {
+				$block_params['price'] = $prices[$val];
+				$block_params['price_type'] = $price_types[$val];
+				$block_params['sign'] = $prices[$val] >= 0 ? '+' : '-';
+			}
+			$block_params['is_last'] = $i == count($values);
+			$o.= $this->Application->ParseBlock($block_params, 1);
+		}
+		return $o;
+	}
+
+	/*function ConvertKey($key, &$object)
+	{
+		static $mapping = null;
+		if (is_null($mapping) || !isset($mapping[$object->GetDBField('ProductId')])) {
+			$table = TABLE_PREFIX.'ProductOptions';
+			$sql = 'SELECT * FROM '.$table.' WHERE ProductId = '.$object->GetDBField('ProductId');
+			$mapping[$object->GetDBField('ProductId')] = $this->Conn->Query($sql, 'ProductOptionId');
+		}
+		return $mapping[$object->GetDBField('ProductId')][$key];
+	}*/
+
+	function PrintList($params)
+	{
+		$list =& $this->GetList($params);
+		$id_field = $this->Application->getUnitOption($this->Prefix, 'IDField');
+
+		$list->Query();
+		$o = '';
+		$list->GoFirst();
+
+		$block_params=$this->prepareTagParams($params);
+		$block_params['name'] = $this->SelectParam($params, 'render_as,block');
+		$block_params['pass_params'] = 'true';
+
+		$product_object =& $this->Application->recallObject('p', 'p', Array('skip_autoload' => true));
+		/* @var $product_object kCatDBItem */
+
+		$product_id = $product_object->GetID();
+
+		while (!$list->EOL()) {
+			// load product used in orderitem
+			$this->Application->SetVar( $this->getPrefixSpecial().'_id', $list->GetDBField($id_field) ); // for edit/delete links using GET
+			$product_object->Load( $list->GetDBField('ProductId') );	// correct product load
+
+			$this->Application->SetVar('m_cat_id', $product_object->GetDBField('CategoryId'));
+
+			$o.= $this->Application->ParseBlock($block_params, 1);
+			$list->GoNext();
+		}
+
+		// restore IDs used in cycle
+		$this->Application->DeleteVar($this->getPrefixSpecial().'_id');
+		$product_object->Load($product_id);
+
+		return $o;
+	}
+
+	function DisplayOptionsPricing($params)
+	{
+		$object =& $this->getObject($params);
+		if ($object->GetDBField('OptionsSelectionMode') == 1) {
+			return false;
+		}
+
+		$item_data = unserialize($object->GetDBField('ItemData'));
+		if (!is_array($item_data)) return false;
+		$options = getArrayValue($item_data, 'Options');
+		$helper =& $this->Application->recallObject('kProductOptionsHelper');
+		$crc = $helper->OptionsSalt($options, true);
+
+		$combs = $this->Conn->GetOne('SELECT COUNT(*) FROM '.TABLE_PREFIX.'ProductOptionCombinations WHERE CombinationCRC = '.$crc.' AND ProductId = '.$object->GetDBField('ProductId').' AND (Price != 0 OR (PriceType = 1 AND Price = 0))');
+		return $combs == 0; // no overriding combinations found
+	}
+}
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/order_items/order_items_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.12.2.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/addresses/addresses_event_handler.php
===================================================================
--- branches/5.1.x/in-commerce/units/addresses/addresses_event_handler.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/addresses/addresses_event_handler.php	(revision 12131)
@@ -0,0 +1,316 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	class AddressesEventHandler extends kDBEventHandler {
+
+		function mapPermissions()
+		{
+			parent::mapPermissions();
+			$permissions = Array(
+				// user can view any form on front-end
+				'OnItemBuild'	=>	Array('subitem' => true),
+				'OnUpdate'	=>	Array('subitem' => true),
+				'OnCreate'	=>	Array('subitem' => true),
+				'OnDelete'	=>	Array('subitem' => true),
+			);
+
+			$this->permMapping = array_merge($this->permMapping, $permissions);
+		}
+
+		/**
+		 * Get's special of main item for linking with subitem
+		 *
+		 * @param kEvent $event
+		 * @return string
+		 */
+		function getMainSpecial(&$event)
+		{
+			return '';
+		}
+
+		/**
+		 * Enter description here...
+		 *
+		 * @param kEvent $event
+		 */
+		function SetCustomQuery(&$event)
+		{
+			if ($this->Application->IsAdmin()) {
+				return ;
+			}
+
+			$object =& $event->getObject();
+			$user_id = $this->Application->RecallVar('user_id');
+			$object->addFilter('myitems_user','%1$s.PortalUserId = '.$user_id);
+		}
+
+		/**
+		 * Makes "use as $type" mark unique among user addresses
+		 *
+		 * @param kDBItem $object
+		 * @param string $type
+		 */
+		function processLastUsed(&$object, $type)
+		{
+			$is_last = $object->GetDBField('LastUsedAs'.$type);
+			if ($is_last) {
+				$fields_hash = Array (
+					'LastUsedAs'.$type => 0,
+				);
+				$this->Conn->doUpdate($fields_hash, $object->TableName, 'PortalUserId = '.$object->GetDBField('PortalUserId'));
+			}
+		}
+
+		/**
+		 * Ensures, that user have only one "use as billing" / "use as shipping" address
+		 *
+		 * @param kEvent $event
+		 */
+		function OnBeforeItemUpdate(&$event)
+		{
+			$object =& $event->getObject();
+			/* @var $object kDBItem */
+
+			$this->processLastUsed($object, 'Shipping');
+			$this->processLastUsed($object, 'Billing');
+		}
+
+		function OnUpdate(&$event)
+		{
+			$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+			/* @var $cs_helper kCountryStatesHelper */
+
+			$cs_helper->CheckStateField($event, 'State', 'Country');
+
+			parent::OnUpdate($event);
+
+			$this->setNextTemplate($event);
+		}
+
+		/**
+		 * Creates new user
+		 *
+		 * @param kEvent $event
+		 */
+		function OnCreate(&$event)
+		{
+			$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+			/* @var $cs_helper kCountryStatesHelper */
+
+			$cs_helper->CheckStateField($event, 'State', 'Country');
+
+			parent::OnCreate($event);
+
+			$this->setNextTemplate($event);
+		}
+
+		/**
+		 * Enter description here...
+		 *
+		 * @param kEvent $event
+		 */
+		function setNextTemplate(&$event)
+		{
+			if($this->Application->IsAdmin()) {
+				return ;
+			}
+
+			$event->SetRedirectParam('opener', 's');
+			$next_template = $this->Application->GetVar('next_template');
+			if ($next_template) {
+				$event->redirect = $next_template;
+			}
+		}
+
+		/**
+		 * [HOOK] Prefill states dropdown with correct values
+		 *
+		 * @param kEvent $event
+		 * @access public
+		 */
+		function OnPrepareStates(&$event)
+		{
+			$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+			$cs_helper->PopulateStates($event, 'State', 'Country');
+
+			$object =& $event->MasterEvent->getObject();
+
+			if( $object->isRequired('Country') && $cs_helper->CountryHasStates( $object->GetDBField('Country') ) ) $object->setRequired('State', true);
+		}
+
+
+		/**
+		 * [HOOK] Update PortalUser table when address marked as ProfileAddress is changed via addr prefix object
+		 *
+		 * @param kEvent $event
+		 */
+		function OnUpdateProfileAddress(&$event)
+		{
+			$user =& $this->Application->recallObject('u.current');
+
+			if ($this->Application->GetVar('billing_address_id') > 0) {
+				$address_id = $this->Application->GetVar('billing_address_id');
+			}
+			elseif ($this->Application->GetVar('shipping_address_id') > 0) {
+				$address_id = $this->Application->GetVar('shipping_address_id');
+			}
+			else {
+				$address_id = false;
+			}
+
+			if (!$address_id) {
+				return true;
+			}
+
+			$address =& $event->getObject(Array('skip_autoload' => true));
+			$address->Load($address_id);
+			if (!$address->GetDBField('IsProfileAddress')) {
+				return true;
+			}
+
+			$field_map = Array(	'Company'		=>	1,
+								'Phone'			=>	1,
+								'Fax'			=>	1,
+								'Email'			=>	1,
+								'Address1'		=>	'Street',
+								'Address2'		=>	'Street2',
+								'City'			=>	1,
+								'State'			=>	1,
+								'Zip'			=>	1,
+								'Country'		=>	1,
+						);
+
+			$user->setName( $address->GetDBField('To') );
+
+			foreach ($field_map as $src_field => $dst_field) {
+				if ($dst_field == 1) $dst_field = $src_field;
+				$user->SetDBField($dst_field, $address->GetDBField($src_field));
+			}
+
+			return $user->Update();
+		}
+
+		/**
+		 * [HOOK] Create user profile address based on PortalUser table data
+		 *
+		 * @param kEvent $event
+		 */
+		function OnUpdateUserProfile(&$event)
+		{
+			$user =& $event->MasterEvent->getObject();
+
+			$load_keys = Array('PortalUserId' => $user->GetID(), 'IsProfileAddress' => 1);
+
+			$address =& $this->Application->recallObject($event->Prefix.'.-item', null, Array('skip_autoload' => true));
+			$address->Load($load_keys);
+
+			$field_map = Array(	'PortalUserId'	=>	1,
+								'Company'		=>	1,
+								'Phone'			=>	1,
+								'Fax'			=>	1,
+								'Email'			=>	1,
+								'Address1'		=>	'Street',
+								'Address2'		=>	'Street2',
+								'City'			=>	1,
+								'State'			=>	1,
+								'Zip'			=>	1,
+								'Country'		=>	1,
+						);
+
+			$full_name = trim($user->GetDBField('FirstName').' '.$user->GetDBField('LastName'));
+			$address->SetDBField('To', $full_name);
+			$address->SetDBField('IsProfileAddress', 1);
+
+			foreach ($field_map as $dst_field => $src_field) {
+				if ($src_field == 1) $src_field = $dst_field;
+				$address->SetDBField($dst_field, $user->GetDBField($src_field));
+			}
+
+			$sql = 'SELECT SUM(IF(LastUsedAsBilling = 1, 1, 0 )) AS HasBilling, SUM(IF(LastUsedAsShipping = 1, 1, 0)) AS HasShipping
+					FROM '.$address->TableName.'
+					WHERE PortalUserId = '.$user->GetID();
+			$address_status = $this->Conn->GetRow($sql);
+
+			if (!$address_status['HasBilling']) {
+				$address->SetDBField('LastUsedAsBilling', 1);
+			}
+
+			if (!$address_status['HasShipping']) {
+				$address->SetDBField('LastUsedAsShipping', 1);
+			}
+
+			return $address->isLoaded() ? $address->Update() : $address->Create();
+		}
+
+		/**
+		 * Checks if user trying to manipulate address that he Owns (exception for Admins)
+		 * (non permission-based)
+		 *
+		 * @param kEvent $event
+		 * @return bool
+		 */
+		function checkItemStatus(&$event)
+		{
+			if ($this->Application->IsAdmin()) {
+				return true;
+			}
+
+			if (!$this->Application->LoggedIn()) {
+				return false;
+			}
+
+			$object =& $event->getObject();
+			if (!$object->isLoaded()) {
+				return true;
+			}
+
+			return $object->GetDBField('PortalUserId') == $this->Application->RecallVar('user_id');
+
+		}
+
+		/**
+		 * Ensures, that user have only one "use as billing" / "use as shipping" address
+		 * Disables Guest ability to create addresses
+		 *
+		 * @param kEvent $event
+		 */
+		function OnBeforeItemCreate(&$event)
+		{
+			if (!$this->Application->LoggedIn()) {
+				$event->status = erPERM_FAIL;
+				return ;
+			}
+
+			$object =& $event->getObject();
+			/* @var $object kDBItem */
+
+			$object->SetDBField('PortalUserId', $this->Application->RecallVar('user_id'));
+
+			$this->processLastUsed($object, 'Shipping');
+			$this->processLastUsed($object, 'Billing');
+		}
+
+		function OnBeforeItemDelete(&$event)
+		{
+			$object =& $event->getObject();
+			/* @var $object kDBItem */
+
+			if (!$object->isLoaded() || !$this->checkItemStatus($event)) {
+				// not trivially loaded object OR not current user address
+				$event->status = erPERM_FAIL;
+				return ;
+			}
+		}
+	}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/addresses/addresses_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.9
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/addresses/addresses_item.php
===================================================================
--- branches/5.1.x/in-commerce/units/addresses/addresses_item.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/addresses/addresses_item.php	(revision 12131)
@@ -0,0 +1,29 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	class AddressesItem extends kDBItem 
+	{
+		function MarkAddress($address_type, $update_record = true)
+		{
+			$user_id = $this->Application->RecallVar('user_id');
+			$sql = 'UPDATE '.$this->TableName.'
+					SET LastUsedAs'.$address_type.' = 0
+					WHERE PortalUserId = '.$user_id;
+			$this->Conn->Query($sql);
+			$this->SetDBField('LastUsedAs'.$address_type, 1);
+			
+			return $update_record ? $this->Update() : true;
+		}
+		
+	}
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/addresses/addresses_item.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.5
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/addresses/addresses_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/addresses/addresses_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/addresses/addresses_config.php	(revision 12131)
@@ -0,0 +1,126 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	$config	=	Array(
+					'Prefix'			=>	'addr',
+					'ItemClass'			=>	Array('class'=>'AddressesItem','file'=>'addresses_item.php','build_event'=>'OnItemBuild'),
+					'ListClass'			=>	Array('class'=>'AddressesList','file'=>'addresses_list.php','build_event'=>'OnListBuild'),
+					'EventHandlerClass'	=>	Array('class' => 'AddressesEventHandler', 'file' => 'addresses_event_handler.php', 'build_event' => 'OnBuild'),
+					'TagProcessorClass' =>	Array('class' => 'AddressesTagProcessor', 'file' => 'addresses_tag_processor.php', 'build_event' => 'OnBuild'),
+					'AutoLoad'			=>	true,
+
+					'Hooks'				=>	Array(
+												Array(
+													'Mode' => hAFTER,
+													'Conditional' => false,
+													'HookToPrefix' => '',
+													'HookToSpecial' => '*',
+													'HookToEvent' => Array('OnAfterItemLoad', 'OnBeforeItemCreate', 'OnBeforeItemUpdate'),
+													'DoPrefix' => '',
+													'DoSpecial' => '*',
+													'DoEvent' => 'OnPrepareStates',
+												),
+
+												// create/update profile addres (in addresses table)
+												Array(
+													'Mode' => hAFTER,
+													'Conditional' => false,
+													'HookToPrefix' => '#PARENT#',
+													'HookToSpecial' => '*',
+													'HookToEvent' => Array('OnAfterItemCreate', 'OnAfterItemUpdate'),
+													'DoPrefix' => '',
+													'DoSpecial' => '*',
+													'DoEvent' => 'OnUpdateUserProfile',
+												),
+
+												Array(
+													'Mode' => hAFTER,
+													'Conditional' => false,
+													'HookToPrefix' => '',
+													'HookToSpecial' => '*',
+													'HookToEvent' => Array('OnAfterItemCreate', 'OnAfterItemUpdate'),
+													'DoPrefix' => '',
+													'DoSpecial' => '*',
+													'DoEvent' => 'OnUpdateProfileAddress',
+												),
+											),
+
+					'QueryString'		=>	Array(
+												1	=>	'id',
+												2	=>	'Page',
+												3	=>	'event',
+												4 	=>	'mode',
+											),
+					'IDField'			=>	'AddressId',
+
+					'TableName'			=>	TABLE_PREFIX.'Addresses',
+
+					'ParentTableKey'=>	'PortalUserId',	// linked field in master table
+					'ForeignKey'	=>	'PortalUserId',	// linked field in subtable
+					'ParentPrefix' 	=>	'u',
+					'AutoDelete'	=>	true,
+					'AutoClone'		=>	true,
+
+					'CalculatedFields'	=>	Array(
+													''	=>	Array(
+																	'ShortAddress'	=>	'CONCAT( TRIM(CONCAT(Address1," ",Address2)),", ",City," ...")',
+															),
+											),
+
+					'ListSQLs'			=>	Array(''	=>	'SELECT %1$s.* %2$s FROM %1$s'), // key - special, value - list select sql
+
+					'ItemSQLs'			=>	Array(	''=>'SELECT * FROM %s'),
+
+					'ListSortings'	=> 	Array(''	=>	Array('Sorting' => Array('IsProfileAddress' => 'desc')) ),
+
+					'Fields'			=>	Array(
+													'AddressId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+													'PortalUserId' => Array('type' => 'int','not_null' => 1, 'default' => 0),
+													'To' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''),
+													'Company' => Array('type' => 'string','not_null' => '1','default' => ''),
+													'Phone' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''),
+													'Fax' => Array('type' => 'string','not_null' => '1','default' => ''),
+													'Email' => Array('type' => 'string','formatter'=>'kFormatter', 'regexp'=>'/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i','not_null' => '1','default' => ''),
+													'Address1' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''),
+													'Address2' => Array('type' => 'string','not_null' => '1','default' => ''),
+													'City' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''),
+													'State'	=>	Array('type' => 'string', 'formatter' => 'kOptionsFormatter',
+							            								'options' => Array(),
+												            			'option_key_field'=>'DestAbbr', 'option_title_field'=>'Translation',
+												            			'not_null' => '1', 'default' => ''),
+
+													'Zip' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''),
+													'Country'	=>	Array('type' => 'string', 'formatter'		=>	'kOptionsFormatter',
+							            									'options_sql'	=>	'	SELECT %1$s
+																									FROM '.TABLE_PREFIX.'StdDestinations
+																									LEFT JOIN '.TABLE_PREFIX.'Phrase
+																										ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
+																									WHERE
+																									DestType = 1 AND LanguageId = %2$s
+																									ORDER BY Translation',
+												            				'option_key_field' => 'DestAbbr', 'option_title_field' => 'Translation',
+												            				'not_null' => '1', 'required' => 1, 'default' => ''),
+
+													'LastUsedAsBilling' => Array('type' => 'int','not_null' => 1, 'default' => 0),
+            										'LastUsedAsShipping' => Array('type' => 'int','not_null' => 1, 'default' => 0),
+            										'IsProfileAddress' => Array('type' => 'int','not_null' => 1, 'default' => 0),
+											),
+
+					'VirtualFields'	=> 	Array(
+												'ShortAddress' => Array('type'=>'string'),
+										),
+
+					'Grids'	=> Array(),
+
+	);
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/addresses/addresses_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.8.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/addresses/addresses_tag_processor.php
===================================================================
--- branches/5.1.x/in-commerce/units/addresses/addresses_tag_processor.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/addresses/addresses_tag_processor.php	(revision 12131)
@@ -0,0 +1,93 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	class AddressesTagProcessor extends kDBTagProcessor {
+
+		function ListAddresses($params) {
+			$ret = $this->PrintList2($params);
+
+			if (!$ret){
+				$block_params = array('name' => $params['empty_myaddresses_render_as']);
+				$ret = $this->Application->ParseBlock($block_params);
+			}
+
+			return $ret;
+		}
+
+		/**
+		 * Print location using only filled in fields
+		 *
+		 * @param Array $params
+		 * @access public
+		 */
+		function PrintLocation($params)
+		{
+			$object =& $this->Application->recallObject($this->getPrefixSpecial(),$this->Prefix, $params);
+
+			$fields = Array('City','State','Zip','Country');
+
+			$ret = '';
+			foreach($fields as $field)
+			{
+				$value = $object->GetField($field);
+				if ($field == 'Country' && $value) {
+					$ret .= '<br/>';
+				}
+				if ($value) {
+					$ret .= $value.', ';
+				}
+			}
+			return rtrim($ret,', ');
+		}
+
+		function EditLink($params)
+		{
+			$tag_processor =& $this->Application->recallTagProcessor('m');
+			$params['pass']	= 'm,addr';
+			return $tag_processor->Link($params);
+		}
+
+		function DeleteLink($params)
+		{
+			$params['addr_event'] = 'OnDelete';
+			return $this->EditLink($params);
+		}
+
+		function NewLink($params)
+		{
+			$params['addr_event'] = 'OnNew';
+			return $this->EditLink($params);
+		}
+
+		function IsProfileAddress($params)
+		{
+			$object =& $this->getObject($params);
+			return $object->GetDBField('IsProfileAddress');
+		}
+
+		function BuildListSpecial($params)
+		{
+			if ($this->Special != '') {
+				return $this->Special;
+			}
+
+			$list_unique_key = $this->getUniqueListKey($params);
+			if ($list_unique_key == '') {
+				return parent::BuildListSpecial($params);
+			}
+
+			return crc32($list_unique_key);
+		}
+	}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/addresses/addresses_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.6.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/addresses/addresses_list.php
===================================================================
--- branches/5.1.x/in-commerce/units/addresses/addresses_list.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/addresses/addresses_list.php	(revision 12131)
@@ -0,0 +1,70 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	class AddressesList extends kDBList 
+	{
+		
+		function CopyAddress($from_address_id, $to_address_type = '')
+		{
+			$address_found = false;
+			$this->GoFirst();
+			while( !$this->EOL() )
+			{
+				if( $this->GetID() == $from_address_id )
+				{
+					$address_found = true;
+					break;
+				}
+				$this->GoNext();
+			}
+			
+			if ($address_found) {
+				$order_fields = Array('To', 'Company', 'Phone', 'Fax', 'Email', 'Address1', 'Address2', 'City', 'State', 'Zip', 'Country');
+				
+				$order =& $this->Application->recallObject('ord');
+				foreach ($order_fields as $order_field) {
+					$order->SetDBField($to_address_type.$order_field, $this->GetDBField($order_field) );
+				}
+			}
+		}
+		
+		/**
+		 * Checks if minimal required fields set is filled in address passed
+		 *
+		 * @param Array $address_data
+		 * @return bool
+		 */
+		function CheckAddress($address_data, $prefix = '')
+		{
+			$required_fields = Array('To','Address1','City','Zip','Country','Phone');
+			$ret = true;
+			foreach($required_fields as $required_field)
+			{
+				if( !$address_data[$prefix.$required_field] )
+				{
+					$ret = false;
+					break;
+				}
+			}
+			return $ret;
+		}
+		
+		/*function getAddressCRC($address_data, $prefix = '')
+		{
+			return crc32( 	$address_data[$prefix.'To'].$address_data[$prefix.'Company'].$address_data[$prefix.'Phone'].$address_data[$prefix.'Fax'].
+							$address_data[$prefix.'Email'].$address_data[$prefix.'Address1'].$address_data[$prefix.'Address2'].$address_data[$prefix.'City'].
+							$address_data[$prefix.'State'].$address_data[$prefix.'Zip'].$address_data[$prefix.'Country'] );
+		}*/
+	}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/addresses/addresses_list.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.4
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gift_certificates/gift_certificates_eh.php
===================================================================
--- branches/5.1.x/in-commerce/units/gift_certificates/gift_certificates_eh.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gift_certificates/gift_certificates_eh.php	(revision 12131)
@@ -0,0 +1,256 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class GiftCertificateEventHandler extends kDBEventHandler {
+
+	/**
+	 * Allows to override standart permission mapping
+	 *
+	 */
+	function mapPermissions()
+	{
+		parent::mapPermissions();
+		$permissions = Array(
+			'OnItemBuild' => Array('self' => true),
+		);
+
+		$this->permMapping = array_merge($this->permMapping, $permissions);
+	}
+
+	function OnApplyClone(&$event)
+	{
+		$item = &$event->getObject();
+		$clone_count = $this->Application->GetVar('clone_items_count');
+		$table = $this->Application->getUnitOption($event->Prefix, 'TableName');
+		if ($clone_count && $clone_count>0){
+			$this->Application->StoreVar('CoupLastCloneCount', $clone_count);
+			for ($i=0; $i<$clone_count; $i++)			{
+				$this->SetNewCode($item);
+
+				$item->SetField('Expiration_date', $this->Application->GetVar('clone_exp_date'));
+				$item->SetField('Expiration_time', $this->Application->GetVar('clone_exp_time'));
+				$item->NameCopy();
+				$validated = $item->Create();
+
+
+			}
+		}
+
+		if ($validated){
+			$this->finalizePopup($event);
+		}else{
+			$event->redirect = false;
+		}
+	}
+
+	function SetNewCode(&$item)
+	{
+		do{
+			$new_code = $this->RandomCouponCode(10);
+			$exists = $this->Conn->GetOne('SELECT COUNT(*) FROM '.TABLE_PREFIX.'ProductsCoupons WHERE Code='.$this->Conn->qstr($new_code));
+			if ($exists){
+				$new_code = false;
+			}
+		} while (!$new_code);
+
+		$item->SetDBField('Code', $new_code);
+	}
+
+	function RandomCouponCode($size)
+	{
+		$rand_code = "";
+		for ($i=0; $i<10; $i++){
+			$is_letter = rand(0,1);
+			if ($is_letter){
+				$rand_char = chr(rand(65,90));
+			}else{
+				$rand_char = rand(0,9);
+			}
+			$rand_code .= $rand_char;
+		}
+		return $rand_code;
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnApplyGiftCertificate(&$event)
+	{
+		$code = $this->Application->GetVar('giftcert_code');
+		if ($code == '') {
+			return ;
+		}
+
+		$object =& $event->getObject(Array('skip_autoload' => true));
+		$object->Load($code, 'Code');
+
+		if (!$object->isLoaded()) {
+			$event->status = erFAIL;
+			$this->Application->SetVar('set_checkout_error', 104);
+			$event->redirect = false; // check!!!
+			return ;
+		}
+
+		$expire_date = $object->GetDBField('Expiration');
+		$debit = $object->GetDBField('Debit');
+		if(	$object->GetDBField('Status') != 1 || ($expire_date && $expire_date < adodb_mktime()) ||
+		($debit <= 0))
+		{
+			$event->status = erFAIL;
+			$this->Application->SetVar('set_checkout_error', 105);
+			$event->redirect->false;
+			return ;
+		}
+
+		$this->Application->setUnitOption('ord', 'AutoLoad', true);
+		$order =& $this->Application->recallObject('ord');
+		$order->SetDBField('GiftCertificateId', $object->GetDBField('GiftCertificateId'));
+		$order->Update();
+
+		$this->Application->SetVar('set_checkout_error', 110);
+	}
+
+	/**
+	 * Enter description here...
+	 *
+	 * @param kEvent $event
+	 */
+	function OnPreCreate(&$event)
+	{
+		parent::OnPreCreate($event);
+
+		$object = &$event->getObject();
+		$exp_date = adodb_mktime();
+
+		$default_duration = $this->Application->ConfigValue('Comm_DefaultCouponDuration');
+
+		if ($default_duration && $default_duration > 0){
+			$exp_date += (int)$default_duration * 86400;
+		}
+		$object->SetDBField('Expiration_date', $exp_date);
+	}
+
+	function OnBeforeItemUpdate(&$event)
+	{
+		$object =& $event->getObject();
+		/* @var $object kDBItem */
+		$amount = abs($object->GetDBField('Amount'));
+		$debit = abs($object->GetDBField('Debit'));
+
+		if ($debit > $amount) {
+			$debit = $amount;
+		}
+		$object->SetDBField('Amount', $amount);
+		$object->SetDBField('Debit', $debit);
+
+		if ($object->GetDBField('SendVia') == 1) {
+			// by postal mail
+			if ($this->Application->GetVar('email_certificate') == 0) {
+				$object->setRequired('RecipientEmail', false);
+			}
+
+			$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
+			/* @var $cs_helper kCountryStatesHelper */
+
+			if (!$cs_helper->CountryHasStates($object->GetDBField('RecipientCountry'))) {
+				$object->setRequired('RecipientState', false);
+			}
+			$cs_helper->CheckStateField($event, 'RecipientState', 'RecipientCountry');
+		} else {
+			$non_required_fields = Array (
+				'RecipientState', 'RecipientCity', 'RecipientCountry',
+				'RecipientZipcode', 'RecipientAddress1', 'RecipientFirstname',
+				'RecipientLastname',
+			);
+
+			foreach ($non_required_fields as $non_required_field) {
+				$object->setRequired($non_required_field, false);
+			}
+		}
+	}
+
+	function OnBeforeItemCreate(&$event)
+	{
+		$this->OnBeforeItemUpdate($event);
+
+		$object =& $event->getObject();
+		/* @var $object kDBItem */
+		$object->SetDBField('Debit', $object->GetDBField('Amount'));
+	}
+
+	/**
+	 * Print current gift certiicate
+	 *
+	 * @param kEvent $event
+	 */
+	function OnSave(&$event)
+	{
+		parent::OnSave($event);
+
+		if ($event->status == erSUCCESS) {
+ 			$object =& $event->getObject();
+ 			/* @var $object kDBItem */
+
+ 			if ($this->Application->GetVar('print_certificate') == 1) {
+				// get object id by unique field Code
+ 				$sql = 'SELECT '.$object->IDField.'
+ 						FROM '.$this->Application->GetLiveName($object->TableName).'
+ 						WHERE Code = '.$this->Conn->qstr($object->GetDBField('Code'));
+ 				$id = $this->Conn->GetOne($sql);
+
+ 				$this->Application->StoreVar('print_certificate_id', $id);
+
+ 			}
+		}
+	}
+
+	/**
+	 * Email selected gift certificate
+	 *
+	 * @param kEvent $event
+	 */
+	function OnEmailGiftCertificate(&$event)
+	{
+		$ids = $this->StoreSelectedIDs($event);
+		if (!$ids) {
+			return ;
+		}
+
+		$object =& $event->getObject( Array ('skip_autoload' => true) );
+		/* @var $object kDBItem */
+
+		foreach ($ids as $id) {
+			$object->Load($id);
+
+			$send_params = Array (
+				'from_email' => $this->Application->ConfigValue('Smtp_AdminMailFrom'),
+				'from_name' => $object->GetDBField('Purchaser'),
+				'to_email' => $object->GetDBField('RecipientEmail'),
+				'to_name' => $object->GetDBField('Recipient'),
+				'message' => $object->GetDBField('Message'),
+				'amount' => $object->GetField('Amount'),
+				'gifcert_id' => $object->GetDBField('Code'),
+			);
+
+			$this->Application->EmailEventUser('USER.GIFTCERTIFICATE', 0, $send_params);
+			$this->Application->EmailEventAdmin('USER.GIFTCERTIFICATE', 0, $send_params);
+		}
+
+		$this->clearSelectedIDs($event);
+	}
+
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gift_certificates/gift_certificates_eh.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.5
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gift_certificates/gift_certificates_tp.php
===================================================================
--- branches/5.1.x/in-commerce/units/gift_certificates/gift_certificates_tp.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gift_certificates/gift_certificates_tp.php	(revision 12131)
@@ -0,0 +1,70 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+class GiftCertificateTagProcessor extends kDBTagProcessor {
+
+	function LastCloneCount($params)
+	{
+		$clone_count = $this->Application->RecallVar('CoupLastCloneCount');
+		if (!$clone_count){
+			$clone_count = 1;
+		}
+		return $clone_count;
+	}
+
+	function DefaultExpDate($params)
+	{
+		$object = &$this->Application->recallObject($this->getPrefixSpecial());
+		$formatter =& $this->Application->makeClass('kDateFormatter');
+		return $formatter->Format( adodb_mktime() + $this->Application->ConfigValue('Comm_DefaultCouponDuration') * 3600 * 24, 'Expiration_date', $object);
+	}
+
+	function DefaultExpTime($params)
+	{
+		$object = &$this->Application->recallObject($this->getPrefixSpecial());
+		$formatter =& $this->Application->makeClass('kDateFormatter');
+		return $formatter->Format( adodb_mktime() + $this->Application->ConfigValue('Comm_DefaultCouponDuration') * 3600 * 24, 'Expiration_time', $object);
+	}
+
+	function HasOrder($params)
+	{
+		if ($this->IsNewItem($params)) {
+			return 0;
+		}
+
+		$object =& $this->getObject($params);
+
+		$sql = 'SELECT COUNT(OrderId)
+				FROM '.TABLE_PREFIX.'Orders
+				WHERE GiftCertificateId = '.$object->GetID();
+		return $this->Conn->GetOne($sql);
+	}
+
+	/**
+	 * Print link for gift certificate (admin only)
+	 *
+	 * @param Array $params
+	 */
+	function PrintLink($params)
+	{
+		$params[$this->getPrefixSpecial().'_id'] = $this->Application->RecallVar('print_certificate_id');
+		$this->Application->RemoveVar('print_certificate_id');
+
+		$main_processor =& $this->Application->recallTagProcessor('m');
+		/* @var $main_processor kMainTagProcessor */
+
+		return $main_processor->Link($params);
+	}
+}
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gift_certificates/gift_certificates_tp.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.4
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/gift_certificates/gift_certificates_config.php
===================================================================
--- branches/5.1.x/in-commerce/units/gift_certificates/gift_certificates_config.php	(nonexistent)
+++ branches/5.1.x/in-commerce/units/gift_certificates/gift_certificates_config.php	(revision 12131)
@@ -0,0 +1,145 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	$config	= Array (
+		'Prefix' => 'gc',
+		'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+		'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+		'EventHandlerClass' => Array ('class' => 'GiftCertificateEventHandler', 'file' => 'gift_certificates_eh.php', 'build_event' => 'OnBuild'),
+		'TagProcessorClass' => Array ('class' => 'GiftCertificateTagProcessor', 'file' => 'gift_certificates_tp.php', 'build_event' => 'OnBuild'),
+		'AutoLoad' => true,
+
+		'Hooks' => Array (
+			Array (
+				'Mode' => hBEFORE,
+				'Conditional' => false,
+				'HookToPrefix' => 'ord',
+				'HookToSpecial' => '',
+				'HookToEvent' => Array( 'OnUpdateCart', 'OnCheckout' ),
+				'DoPrefix' => '',
+				'DoSpecial' => '',
+				'DoEvent' => 'OnApplyGiftCertificate',
+			),
+		),
+
+		'QueryString' => Array (
+			1	=>	'id',
+			2	=>	'page',
+			3	=>	'event',
+			4 =>	'mode',
+		),
+
+		'IDField' => 'GiftCertificateId',
+		'StatusField' => Array('Status'),
+		'TitleField' => 'Recipient',
+		'TableName' => TABLE_PREFIX.'GiftCertificates',
+
+		'TitlePresets' => Array (
+			'default' => Array (
+				'new_status_labels' => Array ('gc' => '!la_title_AddingGiftCertificate!'),
+				'edit_status_labels' => Array ('gc' => '!la_title_EditingGiftCertificate!'),
+				'new_titlefield' => Array ('gc' => '!la_title_NewGiftCertificate!'),
+			),
+
+			'gift_certificates_list' => Array ('prefixes' => Array ('gc_List'), 'format' => "!la_title_GiftCertificates!",),
+			'gift_certificates_edit' => Array ('prefixes' => Array ('gc'), 'format' => "#gc_status# '#gc_titlefield#' - !la_title_General!",),
+		),
+
+		'PermSection' => Array ('main' => 'in-commerce:gift-certificates'),
+
+		'Sections' => Array (
+			'in-commerce:gift-certificates' => Array (
+				'parent'		=>	'in-commerce:discounts_folder',
+				'icon'			=>	'discounts',
+				'label'			=>	'la_tab_GiftCertificates',
+				'url'			=>	Array('t' => 'in-commerce/discounts/gift_certificate_list', 'pass' => 'm'),
+				'permissions'	=>	Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'),
+				'priority'		=>	2.3,
+				'type'			=>	stTAB,
+			),
+		),
+
+		'FilterMenu' => Array (
+			'Groups' => Array(
+				Array ('mode' => 'AND', 'filters' => Array(0,1,2), 'type' => WHERE_FILTER),
+			),
+
+			'Filters' => Array(
+				0	=>	Array('label' =>'la_Enabled', 'on_sql' => '', 'off_sql' => 'Status != 1' ),
+				1	=>	Array('label' => 'la_Used', 'on_sql' => '', 'off_sql' => 'Status != 2'  ),
+				2	=>	Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => 'Status != 0'  ),
+			)
+		),
+
+		'ListSQLs' => Array ('' => 'SELECT %1$s.* %2$s FROM %1$s',),
+		'ItemSQLs' => Array ('' => 'SELECT * FROM %1$s',),
+
+		'ListSortings' => Array (
+			'' => Array(
+				'Sorting' => Array('Recipient' => 'asc'),
+			)
+		),
+
+		'Fields' => Array (
+		    'GiftCertificateId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+		    'OrderId' => Array ('type' => 'int', 'default' => 0),
+		    'Status' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 1 => 'la_Enabled', 2 => 'la_Used', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1 ),
+		    'SendVia' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 0 => 'la_opt_Email', 1 => 'la_opt_PostalMail'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0 ),
+		    'Purchaser' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
+		    'Recipient' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
+	        'RecipientEmail' => Array('type' => 'string', 'formatter'=>'kFormatter', 'regexp'=>'/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', 'sample_value' => 'email@domain.com', 'not_null' => '1', 'required'=>1, 'default' => '', 'error_msgs' => Array('invalid_format'=>'!la_invalid_email!') ),
+		    'RecipientFirstname' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
+		    'RecipientLastname' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
+		    'RecipientAddress1' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
+		    'RecipientAddress2' => Array('type'=>'string', 'default'=>null, 'max_len'=>255),
+		    'RecipientCity' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
+		    'RecipientState' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
+		    'RecipientZipcode' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
+			'RecipientCountry' => Array('type' => 'string', 'formatter'=>'kOptionsFormatter',
+		            				'options_sql'=>'SELECT %1$s
+															FROM '.TABLE_PREFIX.'StdDestinations
+															LEFT JOIN '.TABLE_PREFIX.'Phrase
+																ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
+															WHERE
+																DestType=1
+																AND
+																LanguageId = %2$s
+															ORDER BY Translation',
+							            		'option_key_field'=>'DestAbbr','option_title_field'=>'Translation',
+							           'not_null' => '1','default' => 'USA', 'required'=>1
+			),
+		    'RecipientPhone' => Array('type'=>'string','default'=>null, 'max_len'=>255),
+		    'Message' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
+		    'Code' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255, 'unique'=>Array('Code')),
+		    'AddDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#',),
+		    'Expiration' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null,),
+		    'Amount' => Array('type'=>'double', 'default' => null, 'required' => 1, 'min_value_exc' => 0),
+		    'Debit' => Array('type'=>'double', 'default' => null),
+		),
+
+		'Grids' => Array (
+			'Default' => Array (
+				'Icons' => Array('default' => 'icon16_custom.gif', 1 => 'icon16_discount.gif', 2 => 'icon16_discount_pending.gif', 0 => 'icon16_discount_disabled.gif'),
+				'Fields' => Array (
+					'GiftCertificateId'	=> Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+					'Code' => Array ('title' => 'la_col_Code', 'filter_block' => 'grid_like_filter'),
+					'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter'),
+					'Debit' => Array ('title' => 'la_col_RemainingAmount', 'filter_block' => 'grid_float_range_filter'),
+					'Amount' => Array ('title' => 'la_col_Amount', 'filter_block' => 'grid_float_range_filter'),
+					'Expiration' => Array ('title'=>'la_col_Expiration', 'filter_block' => 'grid_date_range_filter'),
+				),
+			),
+		),
+	);
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/gift_certificates/gift_certificates_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.5
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/units/module_help/orders_incomplete.txt
===================================================================
--- branches/5.1.x/in-commerce/units/module_help/orders_incomplete.txt	(nonexistent)
+++ branches/5.1.x/in-commerce/units/module_help/orders_incomplete.txt	(revision 12131)
@@ -0,0 +1,2 @@
+this is test help<br>
+<b>file</b>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/units/module_help/orders_incomplete.txt
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/5.1.x/in-commerce/constants.php
===================================================================
--- branches/5.1.x/in-commerce/constants.php	(nonexistent)
+++ branches/5.1.x/in-commerce/constants.php	(revision 12131)
@@ -0,0 +1,38 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	// order statuses
+	define('ORDER_STATUS_INCOMPLETE',	0);
+	define('ORDER_STATUS_PENDING',		1);
+	define('ORDER_STATUS_BACKORDERS',	2);
+	define('ORDER_STATUS_TOSHIP',		3);
+	define('ORDER_STATUS_PROCESSED',	4);
+	define('ORDER_STATUS_DENIED',		5);
+	define('ORDER_STATUS_ARCHIVED',		6);
+
+	define('PRODUCT_TYPE_TANGIBLE',		1);
+	define('PRODUCT_TYPE_SUBSCRIPTION',	2);
+	define('PRODUCT_TYPE_SERVICE',		3);
+	define('PRODUCT_TYPE_DOWNLOADABLE',	4);
+	define('PRODUCT_TYPE_PACKAGE',		5);
+
+	// payment gateway processing satuses
+	define('SHIPPING_CONTROL_DIRECT', 3);
+	define('SHIPPING_CONTROL_PREAUTH', 4);
+
+	// gift certificate statuses
+	define('gcENABLED', 1);
+	define('gcUSED', 2);
+	define('gcDISABLED', 0);
+
+	define('USPS_LABEL_FOLDER', WRITEABLE . '/user_files/labels/');
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/constants.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3.2.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/add_to_cart.php
===================================================================
--- branches/5.1.x/in-commerce/add_to_cart.php	(nonexistent)
+++ branches/5.1.x/in-commerce/add_to_cart.php	(revision 12131)
@@ -0,0 +1,22 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+define('FULL_PATH', realpath(dirname(__FILE__)));
+include_once(FULL_PATH.'/core/kernel/startup.php');
+
+$application =& kApplication::Instance();
+$application->Init();
+
+$application->Redirect('in-commerce/checkout/shop_cart', array('pass'=>'p,ord', 'ord_event' => 'OnAddToCart', 'p_id' => $application->GetVar('product')));
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/add_to_cart.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: branches/5.1.x/in-commerce/gw_notify.php
===================================================================
--- branches/5.1.x/in-commerce/gw_notify.php	(nonexistent)
+++ branches/5.1.x/in-commerce/gw_notify.php	(revision 12131)
@@ -0,0 +1,65 @@
+<?php
+/**
+* @version	$Id$
+* @package	In-Commerce
+* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license	Commercial License
+* This software is protected by copyright law and international treaties.
+* Unauthorized reproduction or unlicensed usage of the code of this program,
+* or any portion of it may result in severe civil and criminal penalties,
+* and will be prosecuted to the maximum extent possible under the law
+* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
+*/
+
+	define('FULL_PATH', realpath(dirname(__FILE__).'/..'));
+	define('REL_PATH', 'in-commerce');
+	include_once(FULL_PATH.'/core/kernel/startup.php');
+
+	$application =& kApplication::Instance();
+	$application->Init();
+
+	/*$fh = fopen(FULL_PATH.'/gw.log', 'a');
+	fwrite ($fh, "\n\n".date('d/m/y h:i:s').":\n");
+	foreach ($_REQUEST as $key => $val)
+	{
+		fwrite($fh, "<input type=\"text\" name=\"$key\" value=\"$val\">\n");
+	}
+	fclose($fh);*/
+
+	$db =& $application->GetADODBConnection();
+
+	$application->setUnitOption('ord','AutoLoad',false);
+	$order =& $application->recallObject('ord');
+
+	$order_id = $application->GetVar('order_id');
+	if ($order_id) {
+		$order->Load($order_id);
+	}
+
+	$gw_data = $order->getGatewayData($application->GetVar('payment_type_id'));
+	$application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
+	$gateway_object =& $application->recallObject( $gw_data['ClassName'] );
+
+	$transaction_status = $gateway_object->processNotification($gw_data['gw_params']);
+
+	$sql = 'UPDATE %s SET GWResult1 = %s WHERE %s = %s';
+	$sql = sprintf($sql, $order->TableName, $db->qstr($gateway_object->getGWResponce()), $order->IDField, $order->GetID() );
+	$db->Query($sql);
+	$order->SetDBField('GWResult1', $gateway_object->getGWResponce() );
+
+	$sql = 'UPDATE %s SET TransactionStatus = %s WHERE %s = %s';
+	$db->Query( sprintf($sql, $order->TableName, $transaction_status, $order->IDField, $order->GetID()) );
+	$order->SetDBField('TransactionStatus', $transaction_status);
+
+	if($transaction_status == 1)
+	{
+		$dummy_var = '10';
+		$application->HandleEvent($dummy_var, 'ord:OnCompleteOrder');
+	}
+	else {
+		$application->StoreVar('gw_error', $gateway_object->getErrorMsg());
+	}
+
+	$application->Done();
+
+?>
\ No newline at end of file

Property changes on: branches/5.1.x/in-commerce/gw_notify.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.8
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property