Author Topic: Using VirtueMart Classes in another component  (Read 1897 times)

abasit

  • Beginner
  • *
  • Posts: 1
Using VirtueMart Classes in another component
« on: September 13, 2010, 04:05:02 am »
I'm new to joomla and virtuemart, so Im not sure if this is the right way to do this. If its not then please suggest a better method.

What I am trying to do is create another component, that uses virtuemart classes (since I dont think it would be a good idea to rewrite all that code). What I want to know is if there is any way that virtuemart provides to do this? Or do I simply include the class file to get it to work?

What I am trying to do is:
1. Create a form that allows users to register and place an order on the same page.
2. Extend existing functionality, like do some stuff whenever an order is placed. I came across this: http://www.vm-expert.com/virtuemart-expert-blog/80-extending-virtuemart-114 (I would probably have to do something similar) but am not sure how it works, and how it would work if I were using the classes in another component.
3. Add product subscriptions to virtuemart. Does virtuemart provide any functionality, or is there any good extension for this?

zanardi

  • Contributing Developer
  • Full Member
  • *
  • Posts: 878
    • GiBiLogic
Re: Using VirtueMart Classes in another component
« Reply #1 on: September 17, 2010, 22:40:43 pm »
1. You should take a look at VirtueMart modules. They show what includes and declarations you need to do to have access to VirtueMart methods and variables.
2. user_class means that you can override some native methods without hacking the core. This has nothing to do with using those classes outside VirtueMart.
3. VirtueMart does not provide this functionality. I seem to recall some extension that offers you this, but i can't remember the name.
--
Francesco (zanardi)
http://extensions.gibilogic.com
@gibilogic on Twitter