You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. =======
  2. Signals
  3. =======
  4. Oscar implements a number of custom signals that provide useful hook-points for
  5. adding functionality.
  6. ``product_viewed``
  7. ------------------
  8. .. class:: oscar.apps.catalogue.signals.product_viewed
  9. Raised when a product detail page is viewed.
  10. Arguments sent with this signal:
  11. .. attribute:: product
  12. The product being viewed
  13. .. attribute:: user
  14. The user in question
  15. .. attribute:: request
  16. The request instance
  17. .. attribute:: response
  18. The response instance
  19. ``product_search``
  20. ------------------
  21. .. class:: oscar.apps.catalogue.signals.product_search
  22. Raised when a search is performed.
  23. Arguments sent with this signal:
  24. .. attribute:: query
  25. The search term
  26. .. attribute:: user
  27. The user in question
  28. .. _user_registered_signal:
  29. ``user_registered``
  30. -------------------
  31. .. class:: oscar.apps.customer.signals.user_registered
  32. Raised when a user registers
  33. Arguments sent with this signal:
  34. .. attribute:: request
  35. The request instance
  36. .. attribute:: user
  37. The user in question
  38. .. _basket_addition_signal:
  39. ``basket_addition``
  40. -------------------
  41. .. class:: oscar.apps.basket.signals.basket_addition
  42. Raised when a product is added to a basket
  43. Arguments sent with this signal:
  44. .. attribute:: request
  45. The request instance
  46. .. attribute:: product
  47. The product being added
  48. .. attribute:: user
  49. The user in question
  50. ``voucher_addition``
  51. --------------------
  52. .. class:: oscar.apps.basket.signals.voucher_addition
  53. Raised when a valid voucher is added to a basket
  54. Arguments sent with this signal:
  55. .. attribute:: basket
  56. The basket in question
  57. .. attribute:: voucher
  58. The voucher in question
  59. .. _start_checkout_signal:
  60. ``start_checkout``
  61. ------------------
  62. .. class:: oscar.apps.checkout.signals.start_checkout
  63. Raised when the customer begins the checkout process
  64. Arguments sent with this signal:
  65. .. attribute:: request
  66. The reuqest instance
  67. ``pre_payment``
  68. ---------------
  69. .. class:: oscar.apps.checkout.signals.pre_payment
  70. Raised immediately before attempting to take payment in the checkout.
  71. Arguments sent with this signal:
  72. .. attribute:: view
  73. The view class instance
  74. ``post_payment``
  75. ----------------
  76. .. class:: oscar.apps.checkout.signals.post_payment
  77. Raised immediately after payment has been taken.
  78. Arguments sent with this signal:
  79. .. attribute:: view
  80. The view class instance
  81. ``order_placed``
  82. ----------------
  83. .. class:: oscar.apps.order.signals.order_placed
  84. Raised by the :class:`oscar.apps.order.utils.OrderCreator` class when
  85. creating an order.
  86. Arguments sent with this signal:
  87. .. attribute:: order
  88. The order created
  89. .. attribute:: user
  90. The user creating the order (not necessarily the user linked to the order
  91. instance!)
  92. ``post_checkout``
  93. -----------------
  94. .. class:: oscar.apps.checkout.signals.post_checkout
  95. Raised by the :class:`oscar.apps.checkout.mixins.OrderPlacementMixin` class
  96. when a customer completes the checkout process
  97. .. attribute:: order
  98. The order created
  99. .. attribute:: user
  100. The user who completed the checkout
  101. .. attribute:: request
  102. The request instance
  103. .. attribute:: response
  104. The response instance
  105. ``review_created``
  106. ------------------
  107. .. class:: oscar.apps.catalogue.reviews.signals.review_added
  108. Raised when a review is added.
  109. Arguments sent with this signal:
  110. .. attribute:: review
  111. The review that was created
  112. .. attribute:: user
  113. The user performing the action
  114. .. attribute:: request
  115. The request instance
  116. .. attribute:: response
  117. The response instance