Datafeedr Support Forums

Datafeedr Support Forums (/index.php)
-   Questions (/forumdisplay.php?f=67)
-   -   Drip feed questions (/showthread.php?t=4252)

firstprod March 30th, 2011 10:34 AM

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

Eric March 30th, 2011 10:45 AM

Hi
Quote:

Originally Posted by firstprod (Post 19477)
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 (Post 19477)
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

firstprod March 30th, 2011 11:01 AM

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

Eric March 30th, 2011 11:07 AM

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

firstprod March 30th, 2011 11:11 AM

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

Eric March 30th, 2011 11:17 AM

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.


All times are GMT -5. The time now is 01:09 PM.

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