Author Topic: Product items  (Read 424 times)

Offline Joowls

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Product items
« on: 08/February/2011, 09:31:26 PM »
Hi,

I'm struggling to find which file does the write to the table command for the products.

I want to at the point of creating a new product to be able to also add the product details into another table, please could you point me in the direction of the correct php file I would need to edit?

Many thanks

Julian

Offline netshine

  • Administrator
  • Hero Member
  • *****
  • Posts: 4,952
    • View Profile
Re: Product items
« Reply #1 on: 09/February/2011, 11:29:35 AM »
You can add your own PHP script file into the product_created event folder (/administrator/components/com_nbill/events/product_created). You would need to load the product details from the jos_nbill_product and jos_nbill_product_price tables and insert them in your other database.

I'm not entirely sure that's what you really meant though (as only administrators can create products) - perhaps you mean when someone places an order? If so, the same principle applies, but you would use the order_created event folder instead.

Offline Joowls

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: Product items
« Reply #2 on: 09/February/2011, 12:01:05 PM »
Thanks for that, it was what I meant.

I want to be able to use products that are created in nbill by the administrator, to appear in a point of sale application, what I was trying to avoid was having to input the products twice.


Offline Joowls

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: Product items
« Reply #3 on: 23/February/2011, 09:52:01 AM »
Hi,

You wouldn't have a sample script for this would you?

I'm really struggling to get any data back from this.

Thanks in advance

Julian

Offline Joowls

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: Product items
« Reply #4 on: 23/February/2011, 10:26:08 AM »
Scrub that!

I've finally managed to crack it  :D

 

anything