This patch enables the programmatic creation of products for Drupal Commerce as it happens for nodes.

Only create is supported at the moment.

See http://groups.drupal.org/node/173924 on Groups.Drupal for more information.

CommentFileSizeAuthor
#1 commerceservices-1272836-173924.patch9.67 KBziodave

Comments

ziodave’s picture

StatusFileSize
new9.67 KB
kylebrowning’s picture

Status: Active » Closed (won't fix)

You can do this in a contrib module or do it in Drupal Commerce, but services only aims to support for Drupal functionality.

That being said this patch is bad because you've also changed everything about how file_resource works.

ziodave’s picture

Thanks Kyle for your feedback.

A couple of questions:
[1] by making a contrib module, is it possible to make it dependent from the Services module and inject the Product resource? If so, is there a "best practice" or an already existing module using this pattern?
[2] I had some issues with the file_resource, the _file_resource_* methods were not found. Those issues were solved by following the discussion (and the patch) posted here: http://drupal.org/node/1090278. I could roll back to the current file_resource.inc, but how to solve the aforementioned issues?

Thanks for your help,

David

marcingy’s picture

Have a look at http://drupal.org/project/services_menu it will give a good idea of how to integrate with services from a contrib module.

FranciscoLuz’s picture

Hi,

I started out a module called Services Commerce (it is still a sandbox project) which adds Drupal Commerce resources (Customer Profile, Order, Payment Transaction and Product) to Services.

FranciscoLuz’s picture

Issue summary: View changes

Added a link to the original thread on Groups.Drupal.