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 February 6th, 2013, 09:59 AM
eadora eadora is offline
 
Join Date: Jan 2013
Posts: 43
Default Working with dripped wp_posts only

Hi
I have a few questions about working only with the imported/dripped posts/products in Wordpress to benefit the usage of all the WP plugins available.

1. Is there a way to import all the products data to the posts instead of just the "screening code"? Including image(s), description, "Buy button", tags, etc...
2. Is there a way to have dripped/imported posts/products deleted if the merchant removes the products from his store or if i choose to remove the product from my factory list?

Thanks!
  #2  
Old February 6th, 2013, 11:35 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

1. By default, all of the product's information is stored in the Posts' custom fields. So if you need the URL of the image or the price, you can query the Posts' custom field to get whatever you need. Here's more info on Custom Fields: http://codex.wordpress.org/Custom_Fields

2. Currently, that's not possible.

Eric
  #3  
Old February 6th, 2013, 01:17 PM
eadora eadora is offline
 
Join Date: Jan 2013
Posts: 43
Default

Is there a way to change the output names of the custom fields generated by the factory?

As for the second question, will you add this feature later on or can you advice me with a work-around?

Cheers!
  #4  
Old February 6th, 2013, 01:21 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

What do you mean by the output names?

Actually, this feature is already in ur todo list. We just haven't assigned a release version for it.

Eric
  #5  
Old February 6th, 2013, 03:26 PM
eadora eadora is offline
 
Join Date: Jan 2013
Posts: 43
Default

With output names is mean "store_url", store_description" etc.
Maybe a better namne would be custom fields names ;-)

Can you give a hint of when the remove/update feature will be available?
  #6  
Old February 6th, 2013, 03:30 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

The only way to change the name of those fields would be programmatically. Of course you can change them 1 by 1 manually but if you have lots of posts, that will take too long. Those are the field names we chose so as not to conflict with other plugins that add additional fields to posts.

We've added that feature to 3.12. We will be releasing 3.11 this week. Each version take 1-3 months depending on how much we are doing to the version.

Eric
  #7  
Old February 6th, 2013, 03:47 PM
eadora eadora is offline
 
Join Date: Jan 2013
Posts: 43
Default

I will look forward to that update

Look, the reason i asked about changing the custom field name is because i don't know PHP that good. I have a theme called estore from elegenthemes. I can't find a way to show products thumbnails i the category view.

Here is the code for the entry.php. Sorry to ask, but could you provide me with the correct codes to show custom field store_image here:

Code:
<?php
	$i = 1;
	
	if ( is_home() ){
		$args=array(
			'showposts'=> (int) get_option('estore_homepage_posts'),
			'paged'=>$paged,
			'category__not_in' => (array) get_option('estore_exlcats_recent'),
		);
		if (get_option('estore_duplicate') == 'false'){
			global $ids;
			$args['post__not_in'] = $ids;
		}
		query_posts($args);
	}
?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
	<?php $thumb = '';
	$width = 193;
	$height = 130;
	$classtext = '';
	$titletext = get_the_title();

	$thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext,true);
	$thumb = $thumbnail["thumb"]; 
	$custom = get_post_custom($post->ID);
	$price = isset($custom["store_sprice"][0]) ? $custom["store_sprice"][0] : '';
	if ($price <> '') $price = get_option('estore_cur_sign') . $price;
	$et_band =  isset($custom["et_band"][0]) ? $custom["et_band"][0] : ''; ?>

	<div class="product<?php if ($i % 3 == 0) echo(' last'); ?>">
		<div class="product-content clearfix">
			<a href="<?php the_permalink(); ?>" class="image">
				<span class="rounded" style="background: url('<?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext, $width, $height, $classtext, true, true); ?>') no-repeat;"></span>
				<?php if ($price <> '') { ?>
					<span class="tag"><span><?php echo esc_html($price); ?></span></span>
				<?php }; ?>
			</a>
			
			<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
			<p><?php truncate_post(115); ?></p>
			
			<a href="<?php the_permalink(); ?>" class="more"><span><?php esc_html_e('more info','eStore'); ?></span></a>
			
			<?php if ($et_band <> '') { ?>
				<span class="band<?php echo(' '. esc_attr($et_band)); ?>"></span>
			<?php }; ?>
		</div> <!-- .product-content -->
	</div> <!-- .product -->
	
	<?php if ($i % 3 == 0) echo('<div class="clear"></div>'); ?>
	<?php $i++; ?>
<?php endwhile; ?>
	<?php if (($i-1) % 3 <> 0) echo('<div class="clear"></div>'); ?>
	<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
	else { ?>
		 <?php get_template_part('includes/navigation'); ?>
	<?php } ?>	
<?php else : ?>
	<?php get_template_part('includes/no-results'); ?>
<?php endif; if ( is_home() ) wp_reset_query(); ?>
Thanks Eric, your support is premium diamond plus!
  #8  
Old February 6th, 2013, 04:43 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

Well, I'm not sure what get_thumbnail() is supposed to return. It's not a core WP function. I also don't have that theme therefore I'm unable to test this code.

But you could start by doing changing this:
PHP Code:
    $thumb $thumbnail["thumb"]; 
    
$custom get_post_custom($post->ID); 
To this:

PHP Code:
    $thumb $thumbnail["thumb"]; 
    
$custom get_post_custom($post->ID);
    
    if (@empty(
$thumb) || @$thumb == '') {
        
$thumb $custom["store_image"][0]; 
    } 
That will work if $thumb is supposed to be a URL.

If your theme is actually using the featured image feature, this thread might be of more help to you: /showthread.php?t=3800

Here's some code that might help to explain how to use the 2 datafeedr image custom fields though they will need to be modified for your usage: /show...1633#post31633

Eric
  #9  
Old February 6th, 2013, 04:55 PM
eadora eadora is offline
 
Join Date: Jan 2013
Posts: 43
Default

True PHP Guru indeed! It worked.

Thank you so much!!!
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Editing Dripped Posts kowboy Questions 2 April 12th, 2012 03:55 PM
Question on dripped posts dsemmler Upgrading from V1 to V3 2 August 29th, 2011 07:23 PM
Aligning image in dripped post. ubdirect Questions 4 May 10th, 2011 01:19 AM


All times are GMT -5. The time now is 12:54 PM.


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