Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
378
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.80 KB | None | 0 0
  1. <?php
  2. /**
  3. * Single Product Share
  4. *
  5. * Sharing plugins can hook into here or you can add your own code directly.
  6. *
  7. * This template can be overridden by copying it to yourtheme/woocommerce/single-product/share.php.
  8. *
  9. * HOWEVER, on occasion WooCommerce will need to update template files and you
  10. * (the theme developer) will need to copy the new files to your theme to
  11. * maintain compatibility. We try to do this as little as possible, but it does
  12. * happen. When this occurs the version of the template file will be bumped and
  13. * the readme will list any important changes.
  14. *
  15. * @see https://docs.woocommerce.com/document/template-structure/
  16. * @package WooCommerce/Templates
  17. * @version 3.5.0
  18. */
  19.  
  20. if ( ! defined( 'ABSPATH' ) ) {
  21. exit; // Exit if accessed directly.
  22. }
  23.  
  24. do_action( 'woocommerce_share' ); // Sharing plugins can hook into here.
  25.  
  26. /* Omit closing PHP tag at the end of PHP files to avoid "headers already sent" issues. */
  27. ?>
  28. <?php
  29.  
  30. echo "
  31. <script src='pdfmake.min.js'></script>
  32. <script src='vfs_fonts.js'></script>
  33. <script type='text/javascript'>
  34. function myFunction()
  35. {
  36.  
  37. var dd = {
  38. pageSize: 'A4',
  39. content: [
  40. /*{
  41. image: '',
  42. width: 120
  43. },*/
  44. {
  45. text: 'Titulo del producto',
  46. style: 'titulo'
  47. },
  48. {
  49. columns: [
  50. {
  51. style: 'marginSuperior',
  52. width: '50%',
  53. aligment: 'justify',
  54. text: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Malit profecta versatur nomine ocurreret multavit, officiis viveremus aeternum superstitio suspicor alia nostram, quando nostros congressus susceperant concederetur leguntur iam, vigiliae democritea tantopere causae, atilii plerumque ipsas potitur pertineant multis rem quaeri pro, legendum didicisse credere ex maluisset per videtis. Cur discordans praetereat aliae ruinae dirigentur orestem eodem, praetermittenda divinum. Collegisti, deteriora malint loquuntur officii cotidie finitas referri doleamus ambigua acute. Adhaesiones ratione beate arbitraretur detractis perdiscere, constituant hostis polyaeno. Diu concederetur.'
  55. },
  56. {
  57. width: '40%',
  58. text: ''
  59. }
  60. ]
  61. },
  62. {
  63. columns: [
  64. {
  65. style: 'subtitulos',
  66. width: '50%',
  67. aligment: 'justify',
  68. text: 'Modo de empleo'},
  69. {
  70. width: '40%',
  71. text: ''
  72. }
  73. ]
  74. },
  75. {
  76. columns: [
  77. {
  78. style: 'textos',
  79. width: '50%',
  80. aligment: 'justify',
  81. text: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Malit profecta versatur nomine ocurreret multavit, legendum didicisse credere ex maluisset per videtis. Cur discordans praetereat aliae ruinae dirigentur orestem eodem, praetermittenda divinum. Collegisti, deteriora malint loquuntur officii cotidie finitas referri doleamus ambigua acute. Adhaesiones ratione beate arbitraretur detractis perdiscere, constituant hostis polyaeno. Diu concederetur.'
  82. }/*,
  83. {
  84.  
  85. width: 260,
  86. image: ''
  87. }*/
  88. ]
  89. },
  90. {
  91. columns: [
  92. {
  93. style: 'subtitulos',
  94. width: '50%',
  95. aligment: 'justify',
  96. text: 'Principios Activos'},
  97. {
  98. width: '40%',
  99. text: ''
  100. }
  101. ]
  102. },
  103. {
  104. columns: [
  105. {
  106. style: 'textos',
  107. width: '50%',
  108. aligment: 'justify',
  109. text: 'quando nostros congressus susceperant concederetur leguntur iam, vigiliae democritea tantopere causae, atilii plerumque ipsas potitur pertineant multis rem quaeri pro, legendum didicisse credere ex maluisset per videtis. Cur discordans praetereat aliae ruinae dirigentur orestem eodem, praetermittenda divinum. Collegisti, deteriora malint loquuntur officii cotidie finitas referri doleamus ambigua acute. Adhaesiones ratione beate arbitraretur detractis perdiscere, constituant hostis polyaeno. Diu concederetur.'
  110. },
  111. {
  112. width: '40%',
  113. text: ''
  114. }
  115. ]
  116. },
  117. {
  118. columns: [
  119. {
  120. style: 'subtitulos',
  121. width: '50%',
  122. aligment: 'justify',
  123. text: 'Ingredientes'},
  124. {
  125. width: '40%',
  126. text: ''
  127. }
  128. ]
  129. },
  130. {
  131. columns: [
  132. {
  133. style: 'textos',
  134. width: '50%',
  135. aligment: 'justify',
  136. text: 'praetermittenda divinum. Collegisti, deteriora malint loquuntur officii cotidie finitas referri doleamus ambigua acute. Adhaesiones ratione beate arbitraretur detractis perdiscere, constituant hostis polyaeno. Diu concederetur.'
  137. },
  138. {
  139. width: '40%',
  140. text: ''
  141. }
  142. ]
  143. },
  144. {
  145. columns: [
  146. {
  147. style: 'subtitulos',
  148. width: '50%',
  149. aligment: 'justify',
  150. text: 'Formato'},
  151. {
  152. width: '40%',
  153. text: ''
  154. }
  155. ]
  156. },
  157. {
  158. columns: [
  159. {
  160. style: 'textos',
  161. width: '50%',
  162. aligment: 'justify',
  163. text: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cur discordans praetereat aliae ruinae dirigentur orestem eodem, praetermittenda divinum. Collegisti, deteriora malint loquuntur officii cotidie finitas referri doleamus ambigua acute. Adhaesiones ratione beate arbitraretur detractis perdiscere, constituant hostis polyaeno. Diu concederetur.'
  164. },
  165. {
  166. width: '40%',
  167. text: ''
  168. }
  169. ]
  170. }
  171.  
  172. ],
  173. styles: {
  174. titulo: {
  175. marginTop: 10,
  176. fontSize: 22,
  177. bold:true
  178. },
  179. marginSuperior: {
  180. marginTop: 20,
  181. fontSize:10
  182. },
  183. subtitulos: {
  184. margin: 10,
  185. bold: true,
  186. fontSize: 12
  187. },
  188. textos: {
  189. fontSize: 10,
  190. }
  191. }
  192. }
  193.  
  194. pdfMake.createPdf(dd).download('Report.pdf');
  195.  
  196. }
  197. </script>";
  198. ?>
  199. <button type="button" onclick="myFunction()">DESCARGAR FICHA TECNICA</button>
  200. </body>
  201. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement