product_template.xml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <!-- Add css/js for multiple image feature -->
  5. <template id="add_css_js" inherit_id="website.layout">
  6. <xpath expr="//html/body" position="inside">
  7. <script type="text/javascript" src="/kingfisher/static/src/js/owl.carousel.min.js"></script>
  8. <script type="text/javascript" src="/kingfisher/static/src/js/website_multiple_product_image.js"></script>
  9. </xpath>
  10. <xpath expr="//html/head" position="inside">
  11. <link href="/kingfisher/static/src/css/owl.carousel.css" rel="stylesheet"/>
  12. <link href="/kingfisher/static/src/css/font-awesome.min.css" rel="stylesheet"/>
  13. <link href="/kingfisher/static/src/css/product-zoom.css" rel="stylesheet"/>
  14. </xpath>
  15. </template>
  16. <template id="add_common" inherit_id="web.assets_common">
  17. <xpath expr="." position="inside">
  18. <script type="text/javascript" src="/kingfisher/static/src/js/view_list.js"></script>
  19. </xpath>
  20. </template>
  21. <!-- Inherit template for Add multiple images in product details page & zooming featue -->
  22. <template id="website_multiple_image_product_slider" inherit_id="kingfisher.product_details" name="Website Multi-Image Product" customize_show="True">
  23. <xpath expr="//section[@id='product_detail']//span[@itemprop='image']" position="replace">
  24. <span itemprop="image">
  25. <t t-if="website and not website.is_zoom_feature">
  26. <script src='/kingfisher/static/src/js/jquery-1.8.3.min.js'></script>
  27. <script src='/kingfisher/static/src/js/jquery.elevateZoom-2.1.0.min.js'></script>
  28. <script type="text/javascript" src="/kingfisher/static/src/js/product_zoom.js"></script>
  29. <div class="product-zoom-image">
  30. <img id="zoom_01" t-att-src="website.image_url(product, 'image')" t-att-data-zoom-image="website.image_url(product, 'image')" class="product_detail_img custom-zoom-view"/>
  31. </div>
  32. <style type="text/css">
  33. #product_detail .col-sm-7 {position: inherit;}
  34. .custom-zoom-view{max-width:350px;}
  35. </style>
  36. </t>
  37. <t t-if="website and website.is_zoom_feature">
  38. <div class="product-image">
  39. <img id="thumb" t-att-src="website.image_url(product, 'image')" class="img img-responsive product_detail_img" t-att-alt="product.name" t-att-title="product.name"/>
  40. </div>
  41. </t>
  42. <t t-if="website.get_multiple_images(product.id) and product.multi_image">
  43. <div class="owl-carousel" id="thumb-slider">
  44. <div class="item">
  45. <span itemprop="image">
  46. <img t-att-src="website.image_url(product, 'image')" class="product_main_multi_img" t-att-alt="product.name" t-att-title="product.name"/>
  47. </span>
  48. </div>
  49. <t t-foreach="website.get_multiple_images(product.id)" t-as="im">
  50. <div class="item">
  51. <span itemprop="image" >
  52. <img t-att-src="website.image_url(im, 'image')" class="product_multi_img" t-att-alt="im.name" t-att-title="im.name"/>
  53. </span>
  54. </div>
  55. </t>
  56. </div>
  57. </t>
  58. </span>
  59. </xpath>
  60. </template>
  61. </data>
  62. </openerp>