• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

toolsup
#1 Posted : Tuesday, October 01, 2013 3:10:26 PM(UTC)
toolsup

Rank: Member

Joined: 1/19/2005(UTC)
Posts: 41

Is there a was to keep certain products from going into the product feed?
Thanks Matt
Aaron
#2 Posted : Wednesday, October 02, 2013 11:40:05 AM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,081
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 125 time(s) in 120 post(s)
Originally Posted by: toolsup Go to Quoted Post
Is there a was to keep certain products from going into the product feed?

Enter the power of the feed engine! Do you want to exclude the same products from all product feeds or just certain ones?
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
toolsup
#3 Posted : Wednesday, October 02, 2013 12:31:14 PM(UTC)
toolsup

Rank: Member

Joined: 1/19/2005(UTC)
Posts: 41

Just certain products. All feeds.
Maybe just a "Exclude from Feeds" checkbox on the product edit page, batch edit page and part of the import.
Thanks Matt
Aaron
#4 Posted : Wednesday, October 02, 2013 1:11:09 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,081
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 125 time(s) in 120 post(s)
Create a Multiple Choice type property called something like "Include in Feeds" with values "Yes" and "No". You'll also want to set the default value, presumably "Yes", but highlighting it. Next assign this Type Property each of your Product Types.

Next add the following line of code after line 53 of the /App_Code/FeedEngine/BaseProductFeed.vb file:
Code:
psc.CustomProperties.Add(New Catalog.ProductSearchCriteria.CustomPropertyValue("multiple-choice-type-property-bvin", "Yes"))


Note that you'll need to get the bvin value of the Type Property that you created in the admin. The easy way to do this is to edit the Type Property (after you've saved it) and look at the id value in the query string of the URL. Copy/paste that value into the code and replace "multiple-choice-type-property-bvin". Be sure to retain the quotes around your bvin value or you will get an error.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
sternyy
#5 Posted : Tuesday, October 28, 2014 1:05:02 PM(UTC)
sternyy

Rank: Member

Joined: 1/10/2005(UTC)
Posts: 714

Thanks: 14 times
Was thanked: 1 time(s) in 1 post(s)
Aaron,

Is there a way to add this to the product filter? Can it be added to the search criteria? I need to filter a product type property. If the property is set to yes, then export those products.

I can add and remove that chunk of code every time I want to do this, but it would be easier when other people need to export products.

Even if it just can be added to the product export page under Include Choice Options as a checkbox (I may have asked this before)

Edited by user Tuesday, October 28, 2014 1:08:06 PM(UTC)  | Reason: Not specified

Aaron
#6 Posted : Tuesday, October 28, 2014 2:37:56 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,081
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 125 time(s) in 120 post(s)
This could probably be done with some customization, but it is not currently supported.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
sternyy
#7 Posted : Tuesday, October 28, 2014 3:05:03 PM(UTC)
sternyy

Rank: Member

Joined: 1/10/2005(UTC)
Posts: 714

Thanks: 14 times
Was thanked: 1 time(s) in 1 post(s)
Hmmm actually I can't get this to work with the feed engine.

Edited by user Tuesday, October 28, 2014 5:05:08 PM(UTC)  | Reason: Not specified

sternyy
#8 Posted : Wednesday, October 29, 2014 1:47:50 PM(UTC)
sternyy

Rank: Member

Joined: 1/10/2005(UTC)
Posts: 714

Thanks: 14 times
Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: Aaron Go to Quoted Post
Create a Multiple Choice type property called something like "Include in Feeds" with values "Yes" and "No". You'll also want to set the default value, presumably "Yes", but highlighting it. Next assign this Type Property each of your Product Types.

Next add the following line of code after line 53 of the /App_Code/FeedEngine/BaseProductFeed.vb file:
Code:
psc.CustomProperties.Add(New Catalog.ProductSearchCriteria.CustomPropertyValue("multiple-choice-type-property-bvin", "Yes"))


Note that you'll need to get the bvin value of the Type Property that you created in the admin. The easy way to do this is to edit the Type Property (after you've saved it) and look at the id value in the query string of the URL. Copy/paste that value into the code and replace "multiple-choice-type-property-bvin". Be sure to retain the quotes around your bvin value or you will get an error.


Figured it out... you need the bvin for both the type property and the value. "Yes" will not work.

Aaron
#9 Posted : Wednesday, October 29, 2014 2:25:39 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,081
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 125 time(s) in 120 post(s)
Originally Posted by: sternyy Go to Quoted Post
Figured it out... you need the bvin for both the type property and the value. "Yes" will not work.

Doh! That's what I get for posting untested code. I had a feeling that might be the problem. Good job!
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
Aaron
#10 Posted : Wednesday, October 29, 2014 2:26:49 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,081
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 125 time(s) in 120 post(s)
I think my original code snippet would work with a "Text" Type Property.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
sternyy
#11 Posted : Thursday, December 18, 2014 1:36:39 PM(UTC)
sternyy

Rank: Member

Joined: 1/10/2005(UTC)
Posts: 714

Thanks: 14 times
Was thanked: 1 time(s) in 1 post(s)
Aaron, Does this also affect the sitemap feed? We only want to select products to be excluded from the google shopping feed, not the sitemap feed.
Aaron
#12 Posted : Thursday, December 18, 2014 3:49:35 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,081
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 125 time(s) in 120 post(s)
Originally Posted by: sternyy Go to Quoted Post
Does this also affect the sitemap feed? We only want to select products to be excluded from the google shopping feed, not the sitemap feed.

Yes. To only affect the Google Shopping feed you will need to edit that feed rather than BaseProductFeed.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
 1 user thanked Aaron for this useful post.
sternyy
#13 Posted : Thursday, February 05, 2015 3:00:40 PM(UTC)
sternyy

Rank: Member

Joined: 1/10/2005(UTC)
Posts: 714

Thanks: 14 times
Was thanked: 1 time(s) in 1 post(s)
Got it to work. Thanks!
david875
#14 Posted : Thursday, August 24, 2017 4:57:50 PM(UTC)
david875

Rank: Member

Joined: 8/24/2017(UTC)
Posts: 1
United States
Location: Erie

1. I created a Multiple Choice type property called "Include in Feeds" with values "Yes" and "No". I set the default value, to "Yes", by highlighting it.
2. Next, I assign this Type Property to each of our Product Types.
3. Then I added the following code to the BaseProductFeed.vb (Custom Product Added by .... )

Public Overridable ReadOnly Property Products() As Collection(Of Catalog.Product)
Get
If Me._Products Is Nothing OrElse Me._Products.Count = 0 Then
Me._Products = New Collection(Of Catalog.Product)

Dim psc As New Catalog.ProductSearchCriteria()
'Custom Property Added by ...... 8/22/2017
psc.CustomProperties.Add(New Catalog.ProductSearchCriteria.CustomPropertyValue("1efcbd86-ea70-4c53-90dc-ca93e98487e8", "c102a62a-fac7-48c8-afef-f716c6c5e735"))
'Property_Type_Bvin Include in Feed '1efcbd86-ea70-4c53-90dc-ca93e98487e8'
'Property_Choice_bvin Result (Yes) 'c102a62a-fac7-48c8-afef-f716c6c5e735'
'End Custom Property Added

psc.DisplayInactiveProducts = False
psc.Status = Catalog.ProductStatus.Active
psc.SpecialProductTypeOne = Catalog.SpecialProductTypes.Normal ' excludes kits & gift certificates



However, this does not seem to work. We are going to have Aaron look into doing a custom mod for us. Just so someone doesn't spend a lot of time trying to get this to work... Talk with Aaron first.
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2017 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012