Is something like Product.OnNew += SetDefaultValues() possible with uCommerce?
specifically 2.0 ?
I guess it's clear what I need to do is set default values when a product is created, specifically the category (I need to select 2 levels of category, not just the parent level)
OnNew Product event?
Is something like Product.OnNew += SetDefaultValues() possible with uCommerce?
specifically 2.0 ?
I guess it's clear what I need to do is set default values when a product is created, specifically the category (I need to select 2 levels of category, not just the parent level)
Cheers.
Murray.
Hello Murray,
From uCommerce 3 and later, one option is to hook into the SaveProduct pipeline.
Then based upon the data, set the appropriate values.
For uCommerce 2 and earlier: Sorry! No luck. :-S
Kind regards,
Jesper
Hi Murray
Im haven't tried this myself, but this was how people solved the problem before the SaveProduct-pipelines was introduced: http://our.umbraco.org/projects/website-utilities/ucommerce/ucommerce-support/32656-uCommerce-hooking-into-Product-Save-event
Murray, together with the link Nickolaj suggests,
this article describes how to achieve more specifically:
http://docs.ucommerce.net/ucommerce/v6/extending-ucommerce/override-default-behavior-in-the-api.html
You need to register your own version of EditProductPresenter. The default registration is this one:
You then need to create a class that derrives from: UCommerce.Presentation.Presenters.Catalog.EditProductPresenter
Hope this helps :)
A colleague has looked at this and has a question:
I tried this as per the comments/links above and can't get past this exception:
"No component for supporting the service UCommerce.Presentation.Presenters.Catalog.EditProductPresenter was found"
any ideas? thanks
(I've cross posted the question from: http://our.umbraco.org/projects/website-utilities/ucommerce/ucommerce-support/32656-uCommerce-hooking-into-Product-Save-event )
is working on a reply...