Hi,
We have a client that's having a hard time working with the eCom Campaigns and would like us to implement From and To dates directly in the products, like News, for example.
What's the best way to develop this? The ProductListTemplateExtender seems too far in the process.
Nuno
Developer forum
E-mail notifications
Products - publication period
Nuno Aguiar
Posted on 26/04/2012 18:43:18
Replies
Morten Bengtson
Posted on 27/04/2012 11:55:21
Hi Nuno,
One way to do this is to add two custom date fields to products and then implement a ProductListCollectionProvider...
I'm not sure if this is the best solution though.
/Morten
One way to do this is to add two custom date fields to products and then implement a ProductListCollectionProvider...
public class PublishedProductsProvider : Dynamicweb.Extensibility.Provider.ProductListCollectionProvider { public override ProductCollection FetchCollection(Renderer renderer, string groups) { // return a collection of products that are "published" (DateTime.Now is between from and to date specified in two custom product fields) } }
/Morten
Nuno Aguiar
Posted on 27/04/2012 13:42:16
Hi Morten,
At least it's a way. thanks
Nuno
At least it's a way. thanks
Nuno
Marco Santos
Posted on 29/05/2012 12:14:24
Hello.
I am looking into a way of getting the product list ordered by whatever is set in the module paragraph. I have tried
but the returned collection is empty when I include the useOrderBy parameter. Any ideias on why and how can I overcome this?
Thanks.
Marco
I am looking into a way of getting the product list ordered by whatever is set in the module paragraph. I have tried
foreach (Product product in Product.getProducts(groups, true)) { //perform some tasks }
but the returned collection is empty when I include the useOrderBy parameter. Any ideias on why and how can I overcome this?
Thanks.
Marco
Nuno Aguiar
Posted on 31/05/2012 10:53:35
Hi Morten,
Unfortunatelly we cannot order the products with this solution. Or is there something wrong we are doing? We need to maintain the order settings in the paragraph.
Nuno
Unfortunatelly we cannot order the products with this solution. Or is there something wrong we are doing? We need to maintain the order settings in the paragraph.
Nuno
You must be logged in to post in the forum