product_template.xml 3.8 KB

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