The Joomla ecommerce revolution has begun!

Turn your website into a revenue generating asset with the most powerful, affordable and easy-to-use Joomla ecommerce component on the market. Get JHShop for 50% less (promotion ends 23 October 2010). Find out why those who know JHShop, LOVE JHShop. From only $15.95...GET IT NOW!

What our clients are saying about JHShop!

"I want to say this is probably the best shopping cart / store to date. It has some of the best features. The back end administration is 10000000 times better than virtuemart. This app makes Virtuemart look like a joke, like a second rate undeveloped app." JT Lutgen

JH Shop - Wiki - Plugin Sample Code


JHShop has been built to allow easy integration with other software services like affiliates and CRM's, to this effect we have used the power of the Joomla! plugin system within the code: the following methods are available:

* onOrderConfirm($orderid)
This is called when the order is confirmed and passes the order id accross to the plugin.

* onLoadContent(&$content)
This is called for the storefront text, product description text, manufacturers, vendors and categories intro text aswell as on all information pages, Works in the same way as the Joomla content plugins where the key is $content->text

* onAccountCreate(&$customer)
This is called when an account is created from the frontend in the store (whether registration or 1st access by a normal joomla user) and the customer record is passed accross

* onAccountEdit(&$customer, $post)
this is called when a customer edits his/her account, passed accross is the customer object aswell as the post from the form

* onAddressEdit(&$customer,$post,$isnew = false)
this is called when a user adds / edits his address book entries

* onNewsletterEdit(&$customer,$subscribeValue)
this is passed when a user subscribes / unsubscribes from the newsletter

  1.  
  2. <?php
  3. /**
  4. * @version $Id: sample.php 10381 2008-06-01 03:35:53Z pasamio $
  5. * @package Joomla - JHShop
  6. * @copyright Copyright (C) 2008 - 2010 JHShop. All rights reserved.
  7. * @license GNU/GPL, see LICENSE.php
  8. */
  9.  
  10. // no direct access
  11. defined( '_JEXEC' ) or die( 'Restricted access' );
  12.  
  13.  
  14. class plgJhshopPlgjhshoptest extends JPlugin
  15. {
  16.  
  17. /**
  18. * @name onOrderConfirm
  19. * @param $orderid - New order id of order being confirmed!!!!
  20. */
  21. function onOrderConfirm($orderid)
  22. {
  23.  
  24. }
  25.  
  26. /**
  27. * @name onLoadcontent
  28. * @param $content
  29. * @example: $content->text = str_replace("1","2",$content->text);
  30. */
  31. function onLoadContent(&$content)
  32. {
  33.  
  34. }
  35.  
  36. /**
  37. * @name onAccountCreate
  38. * @param $customer object
  39. */
  40. function onAccountCreate(&$customer)
  41. {
  42.  
  43. }
  44.  
  45. /**
  46. * @name onAccountEdit
  47. * @param $customer object
  48. * @param $post array
  49. */
  50. function onAccountEdit(&$customer,&$post)
  51. {
  52.  
  53. }
  54.  
  55. /**
  56. * @name onAddressEdit
  57. * @param $customer object
  58. * @param $post array
  59. * @param $isnew - bool is new address true or false
  60. */
  61. function onAddressEdit(&$customer,&$post,$isnew = false)
  62. {
  63.  
  64. }
  65.  
  66. /**
  67. * @name onNewsletterEdit
  68. * @param $customer object
  69. * @param $subscribeValue bool subscribe = 1
  70. */
  71. function onNewsletterEdit(&$customer,$subscribeValue)
  72. {
  73.  
  74. }
  75. }
  76.  

Version 2 | Created admin - 2010-03-29 13:31 | Files Modified 2010-03-29 13:33 - admin | Hits 551

Join our mailing list

Please fill the form below:
Your Name:
Your Email:
Saglık , Saglık Sitesi , Sağlik Sitesi
Canlimaçkeyfi , Canli Maç İzle
Canli Maç İzle