Datafeedr Support Forums  

Go Back   Datafeedr Support Forums > Current Version (V3) Forum > Questions
Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Important - The support forums are now in "read-only" mode as we transition to an alternative help desk solution. Feel free to contact us here with any of your questions or search the forums for an existing solution.
 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 30th, 2011, 10:34 AM
firstprod firstprod is offline
 
Join Date: Jul 2009
Posts: 71
Default Drip feed questions

Hi,

I have a couple of questions re the drip feed products:

1) if a product has been used to create a drip page and then gets removed from the product database by the merchant (ie so it no longer appears in the the store), does that drip page still exist in it's original format?

2) if a drip feed has been set up then runs through all products - if new products are added to the db will the drip feed pick up on these and post them to wordpress?

Thanks
  #2  
Old March 30th, 2011, 10:45 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi
Quote:
Originally Posted by firstprod View Post
1) if a product has been used to create a drip page and then gets removed from the product database by the merchant (ie so it no longer appears in the the store), does that drip page still exist in it's original format?
Yes.

Quote:
Originally Posted by firstprod View Post
2) if a drip feed has been set up then runs through all products - if new products are added to the db will the drip feed pick up on these and post them to wordpress?
Yes.

Eric
  #3  
Old March 30th, 2011, 11:01 AM
firstprod firstprod is offline
 
Join Date: Jul 2009
Posts: 71
Default

Thank you...

Which leads me to another question.. if the drip feed page exists but the product is no longer in the database, is there any way to change the price field on the drip page to "Out of Stock" or some other default message?

ie, is there any way to sample whether a product exists in the db (for example by using the product code) remotely from another page?

The sort of thing I mean is (to paraphrase the code):

if product #product.id.that.originated.feed.page exists in db
{ echo product price }
else
{ echo "Out of stock" }

Thanks
  #4  
Old March 30th, 2011, 11:07 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

You would have to query the database from within your template, see if the product exists or not and then display the appropriate message.

Eric
  #5  
Old March 30th, 2011, 11:11 AM
firstprod firstprod is offline
 
Join Date: Jul 2009
Posts: 71
Default

Great!

Is there any documentation / a sample query / a point in the right direction anywhere as to the basics of how I might do this?

Thanks
  #6  
Old March 30th, 2011, 11:17 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

First you will need to get the custom field for the product ID. You can use the Custom Fields API to get that info.

Once you have the $drip_post_id, then you could do something like this:

$product_id = $wpdb->get_var("SELECT id FROM ".$wpdb->prefix."dfr_shop_products WHERE id = ".$drip_post_id);

And then $product_id should equal an ID or false.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:53 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.