product_template.xml~ 3.6 KB

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