News:

Support the VirtueMart project and become a member

Main Menu

Add product using api

Started by myplace2100, February 27, 2013, 18:05:17 PM

Previous topic - Next topic

myplace2100

I don't want to add product in virtue mart by inserting directly in database. what is the best way to add  custom product by coding in my module using api ?
i can list products by accessing vm model like -

$productModel = VmModel::getModel('Product');
$products = $productModel->getProductListing('random', '10', '1', true, false,'1','1');
but don't know which functions does product adding properly.

Please help.
joomla & wordpress extension developer

Dudebaker

I would need the same info... and for Categories too.
Or do we have to wait till virtuemart integrates the front-end adding function?

PolishedGeek

We've done a lot of custom integration with VM2 and usually have found that it's simplest to write our own API the way we want than to try to leverage the VM2 calls.

Another option would be to get a copy of a VM2 import extension like CSV Improved (http://www.csvimproved.com/) and examine the code they are using to import products and categories. That should jump start you on your way a lot faster than trying to figure it out from scratch.
~ Deb Cinkus, CEO
Polished Geek, LLC   |    www.PolishedGeek.com

Creators of JoomLister - eBay Lister for Joomla!

cerealkiller

#3
i have exactly the same issue, and csvi is not a great help, cause its classes are really messy and complicated, related to his primary function of csv import... myplace2000, did you find a way to do this ?

Maxim Pishnyak

Aren't xml and soap protocols not helpful for such task?
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

AH

Maxim

point me to the documentation please
Regards
A

Joomla 4.4.5
php 8.1