226 lines
		
	
	
		
			7.8 KiB
		
	
	
	
		
			XML
		
	
	
		
			Executable File
		
	
			
		
		
	
	
			226 lines
		
	
	
		
			7.8 KiB
		
	
	
	
		
			XML
		
	
	
		
			Executable File
		
	
<?xml version="1.0" encoding="utf-8"?>
 | 
						|
<odoo>
 | 
						|
	<!-- Replaced wishlist in header -->
 | 
						|
	<template id="clarico_header_wishlist" inherit_id="website_sale_wishlist.header"
 | 
						|
		name="Clarico Wishlist" priority="21">
 | 
						|
		<xpath expr="//li[@id='my_wish']" position="replace">
 | 
						|
 | 
						|
		</xpath>
 | 
						|
	</template>
 | 
						|
	<!--Wishlist in Header -->
 | 
						|
	<template id="clarico_wishlist_header_view" inherit_id="clarico_layout.clarico_header_main"
 | 
						|
		name="Clarico Wishlist" priority="25">
 | 
						|
		<xpath expr="//li[@id='header-wishlist']"
 | 
						|
			position="inside">
 | 
						|
			<t t-if="request.env.ref('website_sale_wishlist.add_to_wishlist').active">
 | 
						|
				<t t-set='wishcount' t-value="len(request.env['product.wishlist'].current())" />
 | 
						|
				<li id="my_wish" t-att-style="not wishcount and 'display:none;'">
 | 
						|
					<a href="/shop/wishlist">
 | 
						|
						<i class="fa fa-heart" aria-hidden="true"></i>
 | 
						|
						<sup t-attf-class="my_wish_quantity">
 | 
						|
							<t t-esc='wishcount' />
 | 
						|
						</sup>
 | 
						|
					</a>
 | 
						|
				</li>
 | 
						|
			</t>
 | 
						|
		</xpath>
 | 
						|
	</template>
 | 
						|
	<!-- Replaced the shop layout -->
 | 
						|
	<template id="clarico_shop_wishlist_replace" inherit_id="website_sale_wishlist.add_to_wishlist"
 | 
						|
		name="Clarico Shop Wishlist" priority="21">
 | 
						|
		<xpath expr="//a[hasclass('o_add_wishlist')]" position="replace">
 | 
						|
 | 
						|
		</xpath>
 | 
						|
	</template>
 | 
						|
 | 
						|
	<!-- Wishlist link in shoppage for view product in shop page -->
 | 
						|
	<template id="clarico_wishlist_wish_link" inherit_id="clarico_shop.clarico_shop_products">
 | 
						|
		<xpath expr="//div[@class='view-as']/div/div/div" position="inside">
 | 
						|
			<t t-set='wishcount' t-value="len(request.env['product.wishlist'].current())" />
 | 
						|
			<a t-att-style="not wishcount and 'display:none;'" t-if="request.env.user.id != request.website.user_id.id"
 | 
						|
				class="apply-wishlist apply-filter-in-page btn">
 | 
						|
				View Wishlist
 | 
						|
				<span class="wish_no_count">
 | 
						|
					(<span class="my_wish_quantity">0</span>)
 | 
						|
				</span>
 | 
						|
			</a>
 | 
						|
		</xpath>
 | 
						|
	</template>
 | 
						|
 | 
						|
	<!--Wishlist in Shop -->
 | 
						|
	<template id="clarico_shop_wishlist" inherit_id="clarico_shop.clarico_shop_products_item"
 | 
						|
		name="Wishlist" active="true" customize_show="True" priority="24">
 | 
						|
		<xpath expr="//div[@id='wishlist_shop']" position="inside">
 | 
						|
			<t t-if="request.env.user.id != request.website.user_id.id">
 | 
						|
				<t t-set="in_wish"
 | 
						|
					t-value="product.product_variant_ids & request.env['product.wishlist'].current().mapped('product_id')" />
 | 
						|
				<t t-if="product.product_variant_ids">
 | 
						|
	
 | 
						|
					<a class="o_add_wishlist wish_shop_a" t-att-disabled='in_wish or None'
 | 
						|
						title="Add to Wishlist" t-att-data-product-product-id="product.product_variant_ids[0].id"
 | 
						|
						data-action="o_wishlist">
 | 
						|
						<i class="fa fa-heart-o" aria-hidden="true"></i>
 | 
						|
					</a>
 | 
						|
				</t>
 | 
						|
			</t>
 | 
						|
			<t t-if="request.env.user.id == request.website.user_id.id">
 | 
						|
				<t t-set="url" t-value="request.httprequest.full_path" />
 | 
						|
				<a t-attf-href='/web/login?redirect=#{url}'>
 | 
						|
					<i class="fa fa-heart-o" aria-hidden="true"></i>
 | 
						|
				</a>
 | 
						|
			</t>
 | 
						|
		</xpath>
 | 
						|
		<xpath expr="//div[@id='in-wishlist-shop']" position="inside">
 | 
						|
			<t t-set="in_wish"
 | 
						|
				t-value="product.product_variant_ids & request.env['product.wishlist'].current().mapped('product_id')" />
 | 
						|
			<t t-if="product.product_variant_ids">
 | 
						|
				<a class="o_add_wishlist wish_shop_a added-wish-item"
 | 
						|
					t-att-disabled='in_wish or None' t-att-data-product-product-id="product.product_variant_ids[0].id"
 | 
						|
					data-action="o_wishlist">
 | 
						|
					<i class="fa fa-heart-o" aria-hidden="true"></i>
 | 
						|
				</a>
 | 
						|
			</t>
 | 
						|
		</xpath>
 | 
						|
	</template>
 | 
						|
	<!-- Wishlist in My Account -->
 | 
						|
	 <template id="clarico_account_wishlist" inherit_id="clarico_account.clarico_account_clarico_layout">
 | 
						|
		<xpath expr="//li[@id='wishlist_id']" position="inside">
 | 
						|
 | 
						|
			<p class="ul_class_admin_name">
 | 
						|
				<i class="fa fa-heart fa_common_style_header" style="padding-right: 9px;"></i>
 | 
						|
				<a href="/shop/wishlist">My Wishlist</a>
 | 
						|
			</p>
 | 
						|
		</xpath>
 | 
						|
	</template>
 | 
						|
 | 
						|
	<!-- Replaced the Product Page -->
 | 
						|
	<template id="clarico_product_wishlist_replace" inherit_id="website_sale_wishlist.product_add_to_wishlist"
 | 
						|
		name="Clarico Product Wishlist" priority="21">
 | 
						|
		<xpath expr="//a[hasclass('o_add_wishlist_dyn')]" position="replace">
 | 
						|
		</xpath>
 | 
						|
	</template>
 | 
						|
 | 
						|
	<!-- Wishlist in Product Page -->
 | 
						|
	<template id="clarico_product_wishlist" inherit_id="clarico_product.clarico_product_product"
 | 
						|
		name="Clarico Product Wishlist" priority="23">
 | 
						|
		<xpath expr="//div[@class='cart-quantity-div']" position="after">
 | 
						|
			<t t-if="request.env.user.id != request.website.user_id.id">
 | 
						|
			<t t-set="in_wish"
 | 
						|
				t-value="product.product_variant_ids & request.env['product.wishlist'].current().mapped('product_id')" />
 | 
						|
			<a class="o_add_wishlist_dyn" t-att-disabled='in_wish or None'
 | 
						|
				title="Add to Wishlist" t-att-data-product-product-id="product.product_variant_ids[0].id"
 | 
						|
				data-action="o_wishlist">
 | 
						|
				<span class="fa fa-heart"></span>
 | 
						|
			</a>
 | 
						|
			</t>
 | 
						|
			<t t-if="request.env.user.id == request.website.user_id.id">
 | 
						|
				<t t-set="url" t-value="request.httprequest.full_path" />
 | 
						|
				<a t-attf-href='/web/login?redirect=#{url}' class="product_wish_wo_signin">
 | 
						|
					<i class="fa fa-heart-o" aria-hidden="true"></i>
 | 
						|
				</a>
 | 
						|
			</t>
 | 
						|
			
 | 
						|
		</xpath>
 | 
						|
	</template>
 | 
						|
 | 
						|
	
 | 
						|
 | 
						|
	<!--Wishlist View -->
 | 
						|
	<template id="clarico_wishlist" inherit_id="website_sale_wishlist.product_wishlist"
 | 
						|
		name="Clarico Wishlist">
 | 
						|
		<xpath expr="//div[hasclass('oe_website_sale')]" position="before">
 | 
						|
			<div class="main-div-W100 wishlist-main">
 | 
						|
				<section>
 | 
						|
					<img class="wishlist-cover-img" src="/clarico_cart/static/src/img/cart_cover.jpg"></img>
 | 
						|
				</section>
 | 
						|
			</div>
 | 
						|
		</xpath>
 | 
						|
 | 
						|
		<!--Add to cart (checkbox) -->
 | 
						|
		<xpath expr="//div[hasclass('checkbox')]" position="replace">
 | 
						|
			<div class="checkbox wish-add-cart-checkbox">
 | 
						|
				<label class='type-checkbox'>
 | 
						|
					<input class="checkbox-custom" type="checkbox" id='b2b_wish'
 | 
						|
						value="1" />
 | 
						|
					<label class="checkbox-custom-label">Add product to my cart
 | 
						|
						but keep it in my wishlist</label>
 | 
						|
				</label>
 | 
						|
			</div>
 | 
						|
		</xpath>
 | 
						|
 | 
						|
		<!--heading of wishlist -->
 | 
						|
		<xpath expr="//h3" position="attributes">
 | 
						|
			<attribute name="class">chs_heading wishlist_temp_heading
 | 
						|
			</attribute>
 | 
						|
		</xpath>
 | 
						|
		<!--heading of wishlist -->
 | 
						|
		<xpath expr="//h3" position="after">
 | 
						|
			<a class="clear_wishlist" t-if="len(wishes)">( Clear wishlist )</a>
 | 
						|
		</xpath>
 | 
						|
		<!--image -->
 | 
						|
		<xpath expr="//td[hasclass('td-img')]" position="attributes">
 | 
						|
			<attribute name="class">td_clarico_img</attribute>
 | 
						|
		</xpath>
 | 
						|
		<xpath expr="//tr" position="attributes">
 | 
						|
			<attribute name="class">tr_clarico</attribute>
 | 
						|
		</xpath>
 | 
						|
 | 
						|
		<xpath expr="//td[hasclass('text-left')]" position="replace">
 | 
						|
			<td class="td_clarico_text text-left">
 | 
						|
				<a class="a_clarico_wish_text"
 | 
						|
					t-att-href="'/shop/product/%s' % slug(wish.product_id.product_tmpl_id)">
 | 
						|
					<t t-esc="wish.product_id.display_name" />
 | 
						|
				</a>
 | 
						|
			</td>
 | 
						|
		</xpath>
 | 
						|
		<!--replace price div -->
 | 
						|
		<xpath expr="//td[3]" position="attributes">
 | 
						|
			<attribute name="class">price_td</attribute>
 | 
						|
 | 
						|
		</xpath>
 | 
						|
		<xpath expr="//br" position="replace">
 | 
						|
 | 
						|
 | 
						|
		</xpath>
 | 
						|
 | 
						|
		<!--Adding class to table -->
 | 
						|
		<xpath expr="//table[hasclass('table-bordered')]" position="attributes">
 | 
						|
			<attribute name="class">table table-bordered table-striped
 | 
						|
				table-hover text-center mt16 table-comparator clarico_table
 | 
						|
				oe_website_sale</attribute>
 | 
						|
		</xpath>
 | 
						|
		<!--rating in wishlist -->
 | 
						|
		<xpath expr="//td[hasclass('td-wish-btn')]" position="replace">
 | 
						|
			<td id="wish_rating">
 | 
						|
 | 
						|
			</td>
 | 
						|
			<!-- Add to cart -->
 | 
						|
			<td class='text-center td-wish-btn clarico_wish_cart'>
 | 
						|
				<p class="p_wish_cart">
 | 
						|
					<input name="product_id" t-att-value="wish.product_id.id"
 | 
						|
						type="hidden" />
 | 
						|
					<a class="o_wish_add mb4 wish_clarico_add">
 | 
						|
						<i class="fa fa-shopping-cart" aria-hidden="true"></i>
 | 
						|
						Add to Cart
 | 
						|
					</a>
 | 
						|
					<a class="o_wish_rm no-decoration wish_clarico_rm">
 | 
						|
						<small>
 | 
						|
							<i class='fa fa-trash-o'></i>
 | 
						|
							Remove
 | 
						|
						</small>
 | 
						|
					</a>
 | 
						|
				</p>
 | 
						|
			</td>
 | 
						|
		</xpath>
 | 
						|
		<!-- Recently Viewed div -->
 | 
						|
		<xpath expr="//table" position="after">
 | 
						|
			<div class="wish_recent_view">
 | 
						|
 | 
						|
			</div>
 | 
						|
		</xpath>
 | 
						|
	</template>
 | 
						|
 | 
						|
 | 
						|
 | 
						|
</odoo>
 |