VTMIN_Cart_Functions

The VarkTech Minimum Purchase for WooCommerce VTMIN Cart Functions class.

Defined (1)

The class is defined in the following location(s).

/core/vtmin-cart-classes.php  
  1. class VTMIN_Cart_Functions{ 
  2.  
  3. public function __construct() { 
  4.  
  5.  
  6.  
  7. public function vtmin_destroy_cart() {  
  8. global $vtmin_cart; 
  9. unset($vtmin_cart); 
  10.  
  11. /** 
  12. Template Function 
  13. In your theme, execute the function 
  14. where you want the amount to show 
  15. */ 
  16. public function vtmin_cart_oldprice() {  
  17. global $vtmin_cart; 
  18. echo '$vtmin_cart->$cart_oldprice'; 
  19.  
  20. /** 
  21. Template Function 
  22. In your theme, execute the function 
  23. where you want the amount to show 
  24. */  
  25. public function vtmin_cart_yousave() {  
  26. global $vtmin_cart; 
  27. echo '$vtmin_cart->$cart_yousave'; 
  28.  
  29. /** 
  30. Template Function 
  31. In your theme, execute the function 
  32. where you want the amount to show 
  33. */ 
  34. public function vtmin_cart_unit_oldprice($product_id) {  
  35. global $vtmin_cart; 
  36. foreach($vtmin_cart->vtmin_cart_items as $key => $vtmin_cart_item) { 
  37. if ($vtmin_cart_item->product_id == $product_id) { 
  38. echo $vtmin_cart->cart_unit_oldprice; 
  39. break; 
  40.  
  41. /** 
  42. Template Function 
  43. In your theme, execute the function 
  44. where you want the amount to show 
  45. */  
  46. public function vtmin_cart_total_oldprice($product_id) {  
  47. global $vtmin_cart; 
  48. foreach($vtmin_cart->vtmin_cart_items as $key => $vtmin_cart_item) { 
  49. if ($vtmin_cart_item->product_id == $product_id) { 
  50. echo $vtmin_cart_item->cart_total_oldprice; 
  51. break; 
  52.  
  53. /** 
  54. Template Function 
  55. In your theme, execute the function 
  56. where you want the amount to show 
  57. */  
  58. public function vtmin_cart_total_yousave($product_id) {  
  59. global $vtmin_cart; 
  60. foreach($vtmin_cart->vtmin_cart_items as $key => $vtmin_cart_item) { 
  61. if ($vtmin_cart_item->product_id == $product_id) { 
  62. echo $vtmin_cart->cart_total_yousave; 
  63. break; 
  64. }  
  65.  
  66. } //end class