PageRenderTime 52ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/www/wp-content/plugins/ithemes-exchange/api/theme/transaction.php

https://github.com/ArzuA/gitwordpress
PHP | 676 lines | 358 code | 91 blank | 227 comment | 84 complexity | 801f1c05b3922a89b466d5f5629dffea MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1
  1. <?php
  2. /**
  3. * Transaction class for THEME API
  4. *
  5. * @since 0.4.0
  6. */
  7. class IT_Theme_API_Transaction implements IT_Theme_API {
  8. /**
  9. * API context
  10. * @var string $_context
  11. * @since 0.4.0
  12. */
  13. private $_context = 'transaction';
  14. /**
  15. * The current transaction
  16. * @var array
  17. * @since 0.4.0
  18. */
  19. public $_transaction = false;
  20. /**
  21. * Maps api tags to methods
  22. * @var array $_tag_map
  23. * @since 0.4.0
  24. */
  25. public $_tag_map = array(
  26. 'ordernumber' => 'order_number',
  27. 'status' => 'status',
  28. 'date' => 'date',
  29. 'total' => 'total',
  30. 'subtotal' => 'subtotal',
  31. 'savingstotal' => 'savings_total',
  32. 'shippingtotal' => 'shipping_total',
  33. 'instructions' => 'instructions',
  34. 'shippingaddress' => 'shipping_address',
  35. 'billingaddress' => 'billing_address',
  36. 'products' => 'products',
  37. 'productattribute' => 'product_attribute',
  38. 'productdownloads' => 'product_downloads',
  39. 'productdownload' => 'product_download',
  40. 'productdownloadhashes' => 'product_download_hashes',
  41. 'productdownloadhash' => 'product_download_hash',
  42. 'productfeaturedimage' => 'product_featured_image',
  43. 'clearedfordelivery' => 'cleared_for_delivery',
  44. 'featuredimage' => 'featured_image',
  45. 'cartobject' => 'cart_object',
  46. );
  47. /**
  48. * The current transaction product
  49. * @var array $_transaction_product
  50. * @since 0.4.0
  51. */
  52. public $_transaction_product = false;
  53. /**
  54. * The current transaction cart object
  55. * @var array $_transaction_cart_object
  56. * @since 1.4.0
  57. */
  58. public $_transaction_cart_object = false;
  59. /**
  60. * Constructor
  61. *
  62. * @since 0.4.0
  63. *
  64. * @return void
  65. */
  66. function IT_Theme_API_Transaction() {
  67. $this->_transaction = empty( $GLOBALS['it_exchange']['transaction'] ) ? false : $GLOBALS['it_exchange']['transaction'];
  68. $this->_transaction_product = empty( $GLOBALS['it_exchange']['transaction_product'] ) ? false : $GLOBALS['it_exchange']['transaction_product'];
  69. $this->_transaction_product_download = empty( $GLOBALS['it_exchange']['transaction_product_download'] ) ? false : $GLOBALS['it_exchange']['transaction_product_download'];
  70. $this->_transaction_product_download_hash = empty( $GLOBALS['it_exchange']['transaction_product_download_hash'] ) ? false : $GLOBALS['it_exchange']['transaction_product_download_hash'];
  71. }
  72. /**
  73. * Returns the context. Also helps to confirm we are an iThemes Exchange theme API class
  74. *
  75. * @since 0.4.0
  76. *
  77. * @return string
  78. */
  79. function get_api_context() {
  80. return $this->_context;
  81. }
  82. /**
  83. * Returns the transaction order number
  84. *
  85. * @since 1.4.0
  86. *
  87. */
  88. function order_number( $options=array() ) {
  89. // Set options
  90. $defaults = array(
  91. 'before' => '',
  92. 'after' => '',
  93. 'label' => __( 'Order Number: %s', 'it-l10n-ithemes-exchange' ),
  94. );
  95. $options = ITUtility::merge_defaults( $options, $defaults );
  96. return $options['before'] . sprintf( $options['label'], it_exchange_get_transaction_order_number( $this->_transaction ) ) . $options['after'];
  97. }
  98. /**
  99. * Returns the transaction status
  100. *
  101. * @since 0.4.0
  102. *
  103. */
  104. function status( $options=array() ) {
  105. // Set options
  106. $defaults = array(
  107. 'before' => '',
  108. 'after' => '',
  109. 'label' => __( 'Status: <span class="%s">%s</span>', 'it-l10n-ithemes-exchange' ),
  110. );
  111. $options = ITUtility::merge_defaults( $options, $defaults );
  112. return $options['before'] . sprintf( $options['label'], it_exchange_get_transaction_status( $this->_transaction ), it_exchange_get_transaction_status_label( $this->_transaction ) ) . $options['after'];
  113. }
  114. /**
  115. * Returns the transaction instructions
  116. *
  117. * @since 0.4.0
  118. *
  119. */
  120. function instructions( $options=array() ) {
  121. // Set options
  122. $defaults = array(
  123. 'before' => '',
  124. 'after' => '',
  125. );
  126. $options = ITUtility::merge_defaults( $options, $defaults );
  127. return $options['before'] . it_exchange_get_transaction_instructions( $this->_transaction ) . $options['after'];
  128. }
  129. /**
  130. * Returns the transaction date
  131. *
  132. * @since 0.4.0
  133. *
  134. * @param array $options output options
  135. * @return string
  136. */
  137. function date( $options=array() ) {
  138. // Set options
  139. $defaults = array(
  140. 'before' => '',
  141. 'after' => '',
  142. 'format' => get_option('date_format'),
  143. );
  144. $options = ITUtility::merge_defaults( $options, $defaults );
  145. return $options['before'] . it_exchange_get_transaction_date( $this->_transaction, $options['format'] ) . $options['after'];
  146. }
  147. /**
  148. * Returns the transaction total
  149. *
  150. * @since 0.4.0
  151. *
  152. * @param array $options output options
  153. * @return string
  154. */
  155. function total( $options=array() ) {
  156. // Set options
  157. $defaults = array(
  158. 'before' => '',
  159. 'after' => '',
  160. 'format_currency' => true,
  161. );
  162. $options = ITUtility::merge_defaults( $options, $defaults );
  163. return $options['before'] .it_exchange_get_transaction_total( $this->_transaction, $options['format_currency'] ) . $options['after'];
  164. }
  165. /**
  166. * Returns the transaction total
  167. *
  168. * @since 1.4.0
  169. *
  170. * @param array $options output options
  171. * @return string
  172. */
  173. function subtotal( $options=array() ) {
  174. // Set options
  175. $defaults = array(
  176. 'before' => '',
  177. 'after' => '',
  178. 'format_currency' => true,
  179. );
  180. $options = ITUtility::merge_defaults( $options, $defaults );
  181. return $options['before'] . it_exchange_get_transaction_subtotal( $this->_transaction, $options['format_currency'] ) . $options['after'];
  182. }
  183. /**
  184. * Returns the transaction savings
  185. *
  186. * @since 1.4.0
  187. *
  188. * @param array $options output options
  189. * @return string
  190. */
  191. function savings_total( $options=array() ) {
  192. if ( !empty( $options['has'] ) )
  193. return (bool)it_exchange_get_transaction_coupons( $this->_transaction );
  194. // Set options
  195. $defaults = array(
  196. 'before' => '',
  197. 'after' => '',
  198. 'format_currency' => true,
  199. );
  200. $options = ITUtility::merge_defaults( $options, $defaults );
  201. return $options['before'] . it_exchange_get_transaction_coupons_total_discount( $this->_transaction, $options['format_currency'] ) . $options['after'];
  202. }
  203. /**
  204. * Returns the transaction savings
  205. *
  206. * @since 1.4.0
  207. *
  208. * @param array $options output options
  209. * @return string
  210. */
  211. function shipping_total( $options=array() ) {
  212. if ( !empty( $options['has'] ) )
  213. return (bool)it_exchange_get_transaction_shipping_total( $this->_transaction );
  214. // Set options
  215. $defaults = array(
  216. 'before' => '',
  217. 'after' => '',
  218. 'format_currency' => true,
  219. );
  220. $options = ITUtility::merge_defaults( $options, $defaults );
  221. return $options['before'] . it_exchange_get_transaction_shipping_total( $this->_transaction, $options['format_currency'] ) . $options['after'];
  222. }
  223. /**
  224. * Returns the transaction shipping address
  225. *
  226. * @since 1.4.0
  227. *
  228. * @param array $options output options
  229. * @return string
  230. */
  231. function shipping_address( $options=array() ) {
  232. if ( !empty( $options['has'] ) )
  233. return !empty( $this->_transaction->cart_details->shipping_address );
  234. // Set options
  235. $defaults = array(
  236. 'before' => '',
  237. 'after' => '',
  238. 'format_currency' => true,
  239. );
  240. $options = ITUtility::merge_defaults( $options, $defaults );
  241. return $options['before'] . it_exchange_get_formatted_billing_address( $this->_transaction->cart_details->shipping_address ) . $options['after'];
  242. }
  243. /**
  244. * Returns the transaction billing address
  245. *
  246. * @since 1.4.0
  247. *
  248. * @param array $options output options
  249. * @return string
  250. */
  251. function billing_address( $options=array() ) {
  252. if ( !empty( $options['has'] ) )
  253. return !empty( $this->_transaction->cart_details->billing_address );
  254. // Set options
  255. $defaults = array(
  256. 'before' => '',
  257. 'after' => '',
  258. 'format_currency' => true,
  259. );
  260. $options = ITUtility::merge_defaults( $options, $defaults );
  261. return $options['before'] . it_exchange_get_formatted_billing_address( $this->_transaction->cart_details->billing_address ) . $options['after'];
  262. }
  263. /**
  264. * This loops through the transaction_products GLOBAL and updates the transaction_product global.
  265. *
  266. * It return false when it reaches the last product
  267. * If the has flag has been passed, it just returns a boolean
  268. *
  269. * @since 0.4.0
  270. * @return string
  271. */
  272. function products( $options=array() ) {
  273. // Return boolean if has flag was set
  274. if ( $options['has'] )
  275. return count( it_exchange_get_transaction_products( $this->_transaction ) ) > 0 ;
  276. // If we made it here, we're doing a loop of transaction_products for the current query.
  277. // This will init/reset the transaction_products global and loop through them.
  278. if ( empty( $GLOBALS['it_exchange']['transaction_products'] ) ) {
  279. $GLOBALS['it_exchange']['transaction_products'] = it_exchange_get_transaction_products( $this->_transaction );
  280. $GLOBALS['it_exchange']['transaction_product'] = reset( $GLOBALS['it_exchange']['transaction_products'] );
  281. return true;
  282. } else {
  283. if ( next( $GLOBALS['it_exchange']['transaction_products'] ) ) {
  284. $GLOBALS['it_exchange']['transaction_product'] = current( $GLOBALS['it_exchange']['transaction_products'] );
  285. return true;
  286. } else {
  287. $GLOBALS['it_exchange']['transaction_products'] = array();
  288. end( $GLOBALS['it_exchange']['transaction_products'] );
  289. $GLOBALS['it_exchange']['transaction_product'] = false;
  290. return false;
  291. }
  292. }
  293. }
  294. /**
  295. * Returns boolean is the transaction cleared for delivery or not
  296. *
  297. * @since 0.4.10
  298. *
  299. * @param array $options
  300. * @return boolean
  301. */
  302. function cleared_for_delivery( $options=array() ) {
  303. return it_exchange_transaction_is_cleared_for_delivery( $this->_transaction->ID );
  304. }
  305. /**
  306. * Use this to get a transaction product attribute like title, description, price, etc.
  307. *
  308. * See lib/templates/content-downloads/ files for examples
  309. * @since 0.4.0
  310. * @return string
  311. */
  312. function product_attribute( $options=array() ) {
  313. // Set defaults
  314. $defaults = array(
  315. 'wrap' => false,
  316. 'format' => 'html',
  317. 'attribute' => false,
  318. 'format_price' => true,
  319. 'class' => false
  320. );
  321. $options = ITUtility::merge_defaults( $options, $defaults );
  322. // Return empty if attribute was not provided
  323. if ( empty( $options['attribute'] ) )
  324. return '';
  325. // Return empty string if empty
  326. if ( 'description' == $options['attribute'] ) {
  327. $attribute = it_exchange_get_product_feature( $this->_transaction_product['product_id'], 'description' );
  328. if ( empty( $attribute ) )
  329. return '';
  330. } else if ( 'confirmation-url' == $options['attribute'] ) {
  331. $attribute = it_exchange_get_transaction_confirmation_url( $this->_transaction->ID );
  332. } else if ( 'product_subtotal' == $options['attribute'] ) {
  333. $attribute = $this->_transaction_product['product_subtotal'];
  334. } else if ( 'product_base_price' == $options['attribute'] ) {
  335. $attribute = $this->_transaction_product['product_base_price'];
  336. }else if ( 'product_count' == $options['attribute'] ) {
  337. $attribute = $this->_transaction_product['count'];
  338. } else if ( ! $attribute = it_exchange_get_transaction_product_feature( $this->_transaction_product, $options['attribute'] ) ) {
  339. return '';
  340. }
  341. // Format price
  342. if ( (boolean) $options['format_price'] && in_array( $options['attribute'], array( 'product_subtotal', 'product_base_price' ) ) )
  343. $attribute = it_exchange_format_price( $attribute );
  344. $open_wrap = empty( $options['wrap'] ) ? '' : '<' . esc_attr( $options['wrap'] ) . ' class="' . $options['class'] . '">';
  345. $close_wrap = empty( $options['wrap'] ) ? '' : '</' . esc_attr( $options['wrap'] ) . '>';
  346. $result = '';
  347. if ( 'html' == $options['format'] )
  348. $result .= $open_wrap;
  349. $result .= apply_filters( 'it_exchange_api_theme_transaction_product_attribute', $attribute, $options, $this->_transaction, $this->_transaction_product );
  350. if ( 'html' == $options['format'] )
  351. $result .= $close_wrap;
  352. return $result;
  353. }
  354. /**
  355. * The product's featured image
  356. *
  357. * @since 1.4.0
  358. *
  359. * @return string
  360. */
  361. function featured_image( $options=array() ) {
  362. // Get the real product item or return empty
  363. if ( ! $product_id = empty( $this->_transaction_product['product_id'] ) ? false : $this->_transaction_product['product_id'] )
  364. return false;
  365. // Return boolean if has flag was set
  366. if ( $options['supports'] )
  367. return it_exchange_product_supports_feature( $product_id, 'product-images' );
  368. // Return boolean if has flag was set
  369. if ( $options['has'] )
  370. return it_exchange_product_has_feature( $product_id, 'product-images' );
  371. if ( it_exchange_product_supports_feature( $product_id, 'product-images' )
  372. && it_exchange_product_has_feature( $product_id, 'product-images' ) ) {
  373. $defaults = array(
  374. 'size' => 'thumbnail'
  375. );
  376. $options = ITUtility::merge_defaults( $options, $defaults );
  377. $output = array();
  378. $product_images = it_exchange_get_product_feature( $product_id, 'product-images' );
  379. $feature_image = array(
  380. 'id' => $product_images[0],
  381. 'thumb' => wp_get_attachment_thumb_url( $product_images[0] ),
  382. 'large' => wp_get_attachment_url( $product_images[0] )
  383. );
  384. if ( 'thumbnail' === $options['size'] )
  385. $img_src = $feature_image['thumb'];
  386. else
  387. $img_src = $feature_image['large'];
  388. ob_start();
  389. ?>
  390. <div class="it-exchange-feature-image-<?php echo get_the_id(); ?> it-exchange-featured-image">
  391. <div class="featured-image-wrapper">
  392. <img alt="" src="<?php echo $img_src ?>" data-src-large="<?php echo $feature_image['large'] ?>" data-src-thumb="<?php echo $feature_image['thumb'] ?>" />
  393. </div>
  394. </div>
  395. <?php
  396. $output = ob_get_clean();
  397. return $output;
  398. }
  399. return false;
  400. }
  401. /**
  402. * Grabs a list of all downloads for a specific transaction product.
  403. *
  404. * Intended to be used in a while statement.
  405. * If used with the has- prefix, it returns a boolean of true/false
  406. * If it returns true, you may then continue your while loop with the product-download api method
  407. *
  408. * eg: while( it_exchange( 'transaction', 'product-downloads' ) ) { it_exchange( 'transaction', 'product_download', array( 'title' ) ); }
  409. * See lib/templates/content-downloads/ files for examples
  410. *
  411. * @param array $options
  412. * @return boolean
  413. */
  414. function product_downloads( $options=array() ) {
  415. // Return false if we don't have a product id
  416. if ( empty( $this->_transaction_product['product_id'] ) )
  417. return false;
  418. // Return boolean if we'er just checking
  419. if ( ! empty( $options['has'] ) )
  420. return it_exchange_product_has_feature( $this->_transaction_product['product_id'], 'downloads' );
  421. // Set product id
  422. $product_id = $this->_transaction_product['product_id'];
  423. // If we made it here, we're doing a loop of transaction_product_downloads for the current query.
  424. // This will init/reset the transaction_product_downloads global and loop through them.
  425. if ( empty( $GLOBALS['it_exchange']['transaction_product_downloads'][$product_id] ) ) {
  426. $GLOBALS['it_exchange']['transaction_product_downloads'][$product_id] = it_exchange_get_product_feature( $product_id, 'downloads' );
  427. $GLOBALS['it_exchange']['transaction_product_download'] = reset( $GLOBALS['it_exchange']['transaction_product_downloads'][$product_id] );
  428. return true;
  429. } else {
  430. if ( next( $GLOBALS['it_exchange']['transaction_product_downloads'][$product_id] ) ) {
  431. $GLOBALS['it_exchange']['transaction_product_download'] = current( $GLOBALS['it_exchange']['transaction_product_downloads'][$product_id] );
  432. return true;
  433. } else {
  434. $GLOBALS['it_exchange']['transaction_product_downloads'][$product_id] = array();
  435. end( $GLOBALS['it_exchange']['transaction_product_downloads'][$product_id] );
  436. $GLOBALS['it_exchange']['transaction_product_download'] = false;
  437. return false;
  438. }
  439. }
  440. }
  441. /**
  442. * Returns attributes for a download that is a part of a specific transaction
  443. *
  444. * Intended to be used inside a while loop with it_exchange( 'transaction', 'product-downloads' );
  445. * Use the attribute option to indicated what type of download attribute you want. ie: array( 'attribute' => 'title' );
  446. * See lib/templates/content-downloads/ files for examples
  447. *
  448. * @param array $options
  449. * @return string
  450. */
  451. function product_download( $options=array() ) {
  452. if ( ! empty( $options['has'] ) )
  453. return (boolean) $this->_transaction_product_download;
  454. if ( empty( $options['attribute'] ) )
  455. return false;
  456. if ( 'title' == $options['attribute'] || 'name' == $options['attribute'] ) {
  457. $value = get_the_title( $this->_transaction_product_download['id'] );
  458. }
  459. return $value;
  460. }
  461. /**
  462. * Sets up a loop of all the hashes generated for a specific download for a specific transaction.
  463. *
  464. * Intended to be used in a loop. You may loop through it with the product_download_hash method once setup.
  465. * The number of hashes per download will equal the quantity paid for at time of purchase for the transaction
  466. * See lib/templates/content-downloads/ files for examples
  467. *
  468. * @return void
  469. */
  470. function product_download_hashes( $options=array() ) {
  471. // Return false if we don't have a product id
  472. if ( empty( $this->_transaction_product['product_id'] ) || empty( $this->_transaction_product_download ) )
  473. return false;
  474. // Return boolean if we're just checking
  475. if ( ! empty( $options['has'] ) )
  476. return (boolean) it_exchange_get_download_hashes_for_transaction_product( $this->_transaction, $this->_transaction_product, $this->_transaction_product_download['id'] );
  477. // Download ID
  478. $download_id = $this->_transaction_product_download['id'];
  479. // If we made it here, we're doing a loop of transaction_product_download_hashes for the current query.
  480. // This will init/reset the transaction_product_download_hashes global and loop through them.
  481. if ( empty( $GLOBALS['it_exchange']['transaction_product_download_hashes'][$download_id] ) ) {
  482. $GLOBALS['it_exchange']['transaction_product_download_hashes'][$download_id] = it_exchange_get_download_hashes_for_transaction_product( $this->_transaction, $this->_transaction_product, $download_id );
  483. $GLOBALS['it_exchange']['transaction_product_download_hash'] = reset( $GLOBALS['it_exchange']['transaction_product_download_hashes'][$download_id] );
  484. return true;
  485. } else {
  486. if ( next( $GLOBALS['it_exchange']['transaction_product_download_hashes'][$download_id] ) ) {
  487. $GLOBALS['it_exchange']['transaction_product_download_hash'] = current( $GLOBALS['it_exchange']['transaction_product_download_hashes'][$download_id] );
  488. return true;
  489. } else {
  490. $GLOBALS['it_exchange']['transaction_product_download_hashes'][$download_id] = array();
  491. end( $GLOBALS['it_exchange']['transaction_product_download_hashes'][$download_id] );
  492. $GLOBALS['it_exchange']['transaction_product_download_hash'] = false;
  493. return false;
  494. }
  495. }
  496. }
  497. /**
  498. * Prints details about a specific download has (remaining downloads, etc)
  499. * See lib/templates/content-downloads/ files for examples
  500. *
  501. * @return string
  502. */
  503. function product_download_hash( $options=array() ) {
  504. if ( ! empty( $options['has'] ) )
  505. return (boolean) $this->_transaction_product_download_hash;
  506. if ( ! isset( $options['attribute'] ) )
  507. return false;
  508. $defaults = array(
  509. 'date-format' => false,
  510. );
  511. $options = ITUtility::merge_defaults( $options, $defaults );
  512. $hash_data = it_exchange_get_download_data_from_hash( $this->_transaction_product_download_hash );
  513. if ( 'title' == $options['attribute'] || 'name' == $options['attribute'] )
  514. $options['attribute'] = 'hash';
  515. else if ( 'download-limit' == $options['attribute'] )
  516. $options['attribute'] = 'download_limit';
  517. else if ( 'download-count' == $options['attribute'] )
  518. $options['attribute'] = 'downloads';
  519. if ( 'expiration-date' == $options['attribute'] ) {
  520. $date_format = empty( $options['date-format'] ) ? false : $options['date-format'];
  521. $date = it_exchange_get_download_expiration_date( $hash_data, $date_format );
  522. $value = empty( $date ) ? false : $date;
  523. } else if ( 'downloads-remaining' == $options['attribute'] ) {
  524. $limit = empty( $hash_data['download_limit'] ) ? __( 'Unlimited Downloads', 'it-l10n-ithemes-exchange' ) : absint( $hash_data['download_limit'] );
  525. $count = empty( $hash_data['downloads'] ) ? 0 : absint( $hash_data['downloads'] );
  526. $remaining = ( $limit - $count );
  527. $value = ( $remaining < 0 ) ? 0 : $remaining;
  528. } else if ( 'download-url' == $options['attribute'] ) {
  529. $value = add_query_arg( array( 'it-exchange-download' => $hash_data['hash'] ), get_home_url() );
  530. } else {
  531. $value = isset( $hash_data[$options['attribute']] ) ? $hash_data[$options['attribute']] : false;
  532. }
  533. return $value;
  534. }
  535. /**
  536. * The product's featured image
  537. *
  538. * @since 0.4.12
  539. *
  540. * @return string
  541. */
  542. function product_featured_image( $options=array() ) {
  543. // Get the real product item or return empty
  544. if ( ! $product_id = empty( $this->_transaction_product['product_id'] ) ? false : $this->_transaction_product['product_id'] )
  545. return false;
  546. // Return boolean if has flag was set
  547. if ( $options['supports'] )
  548. return it_exchange_product_supports_feature( $product_id, 'product-images' );
  549. // Return boolean if has flag was set
  550. if ( $options['has'] )
  551. return it_exchange_product_has_feature( $product_id, 'product-images' );
  552. if ( it_exchange_product_supports_feature( $product_id, 'product-images' )
  553. && it_exchange_product_has_feature( $product_id, 'product-images' ) ) {
  554. $defaults = array(
  555. 'size' => 'thumb'
  556. );
  557. $options = ITUtility::merge_defaults( $options, $defaults );
  558. $output = array();
  559. $product_images = it_exchange_get_product_feature( $product_id, 'product-images' );
  560. $feature_image = array(
  561. 'id' => $product_images[0],
  562. 'thumb' => wp_get_attachment_thumb_url( $product_images[0] ),
  563. 'large' => wp_get_attachment_url( $product_images[0] ),
  564. );
  565. if ( 'thumbnail' === $options['size'] )
  566. $img_src = $feature_image['thumb'];
  567. else
  568. $img_src = $feature_image['large'];
  569. ob_start();
  570. ?>
  571. <div class="it-exchange-feature-image-<?php echo get_the_id(); ?> it-exchange-featured-image">
  572. <div class="featured-image-wrapper">
  573. <img alt="" src="<?php echo $img_src ?>" data-src-large="<?php echo $feature_image['large'] ?>" data-src-thumb="<?php echo $feature_image['thumb'] ?>" />
  574. </div>
  575. </div>
  576. <?php
  577. $output = ob_get_clean();
  578. return $output;
  579. }
  580. return false;
  581. }
  582. function cart_object() {
  583. ITDebug::print_r( $this->_transaction );
  584. }
  585. }