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 September 16th, 2011, 08:31 AM
astran astran is offline
 
Join Date: Jun 2011
Posts: 15
Default remove part of product description

Hi Eric,

Some merchant has their name as part of product description, how can I remove them

for example Zappos inserts "Zappos.com is proud to offer the" in the first part of its product description

Thanks
  #2  
Old September 16th, 2011, 09:33 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

You can edit the products manually by clicking the "more info" link for the product in the Factory.
  #3  
Old September 16th, 2011, 12:30 PM
astran astran is offline
 
Join Date: Jun 2011
Posts: 15
Default

Zappos has thousand of products - I can not change the description manually


In "HTML for the <head> element" in "product detail"

we have "<meta name="description" content="[product.description]" />"

How can we modify the "content" to get rid of "Zappos.com is proud to offer the"
  #4  
Old September 16th, 2011, 12:31 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Well, you could use PHP's substr() or str_replace() function to strip out specific text from the $product->description variable. That's really your only choice.
  #5  
Old September 16th, 2011, 02:30 PM
astran astran is offline
 
Join Date: Jun 2011
Posts: 15
Default

I am not a programmer - please show me how to use PHP's substr() function to remove "Zappos.com is proud to offer the" in the $product->description
  #6  
Old September 16th, 2011, 02:38 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

<?php echo str_replace("Zappos.com is proud to offer the", "", $product->description); ?>

More examples and usages here: http://php.net/manual/en/function.str-replace.php
  #7  
Old November 21st, 2011, 05:42 AM
meinehandtasche meinehandtasche is offline
 
Join Date: Jul 2011
Posts: 43
Default

Store ID: 32722
Website URL: www.meinehandtasche.de
URL to page in question:

Hi,

In which file I need to insert this code?
Quote:
<?php echo str_replace("Zappos.com is proud to offer the", "", $product->description); ?>
Best,
Oliver
  #8  
Old November 21st, 2011, 09:50 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

The other user was referring to this section:

The Factory > Your Store > VIEWS > PRODUCT DETAIL > Default > View menu > View <head> Elements in the meta description tag.

Eric
  #9  
Old November 23rd, 2011, 02:57 AM
meinehandtasche meinehandtasche is offline
 
Join Date: Jul 2011
Posts: 43
Default replace string from product titel

Hi,

how can I replace a string like "- bei Yoox.com" from the product title?

I tried to insert it this way in //Views > Product detail > edit template// but didn't work.

Quote:
<?php echo str_replace(" - bei YOOX.COM", "", $category->description); ?>

<!-- Single Product -->
<div class="sp">
<div class="lc">
<div class="thmb">
<a href="[product.url direct='0']" title="[product.name]" target="_blank" rel="nofollow">
<img src="[product.image]" width="250" />
</a>
</div>



</div>
<div class="rc">
<h2><a href="[product.url direct='0']" title="[product.name]" target="_blank" rel="nofollow">[product.name]</a></h2>
<p class="desc">[product.description]</p>
<div>
[product.each_tag]<?php if($nn>1){echo ', ';}?><a href="[tag.link]"><?php echo str_replace("-"," ",$tag->name);?></a>[product.end]
</div>
<div class="prc">[product.currency mode="word"][product.price]</div>
<div class="btns">
<a href="javascript:window.history.go(-1)" class="dfbutton dfsilver dflarge" title="Zurück zur letzten Seite">zurück</a>
<a href="[product.url]" class="dfbutton dforange dflarge" title="Jetzt kaufen" target="_blank" rel="nofollow">Bestellen</a>
</div>
</div>
<div class="clearingdiv"> </div>
</div>
<!-- /Single Product -->

I already asked a similar question but do you have a solution if I want a freelancer to re-write the product description for SEO purpose without providing access to the factory? Like: exporting all products in a csv file and importing it back.
If not might this be worth to be a comming feature?

Thanks,
Oliver
  #10  
Old November 23rd, 2011, 08:19 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

You're almost there. You need this:
PHP Code:
<?php $pname str_replace(" - bei YOOX.COM"""$product->name); ?>
But where the product name appears you need to use <?php echo $pname; ?> instead of [product.name].

Eric
  #11  
Old November 23rd, 2011, 08:35 AM
meinehandtasche meinehandtasche is offline
 
Join Date: Jul 2011
Posts: 43
Default

This worked just fine! :-)
Thank you so much!

Here for others the code how it looks in the end. I just have to do the same on the view category.


here the detail view:

Quote:
<?php $pname = str_replace(" - bei YOOX.COM", "", $product->name); ?>


<!-- Single Product -->
<div class="sp">
<div class="lc">
<div class="thmb">
<a href="[product.url direct='0']" title="<?php echo $pname; ?>" target="_blank" rel="nofollow">
<img src="[product.image]" width="250" />
</a>
</div>



</div>
<div class="rc">
<h2><a href="[product.url direct='0']" title="<?php echo $pname; ?>" target="_blank" rel="nofollow"><?php echo $pname; ?></a></h2>
<p class="desc">[product.description]</p>
<div>
[product.each_tag]<?php if($nn>1){echo ', ';}?><a href="[tag.link]"><?php echo str_replace("-"," ",$tag->name);?></a>[product.end]
</div>
<div class="prc">[product.currency mode="word"][product.price]</div>
<div class="btns">
<a href="javascript:window.history.go(-1)" class="dfbutton dfsilver dflarge" title="Zurück zur letzten Seite">zurück</a>
<a href="[product.url]" class="dfbutton dforange dflarge" title="Jetzt kaufen" target="_blank" rel="nofollow">Bestellen</a>
</div>
</div>
<div class="clearingdiv"> </div>
</div>
<!-- /Single Product -->
  #12  
Old November 23rd, 2011, 08:50 AM
meinehandtasche meinehandtasche is offline
 
Join Date: Jul 2011
Posts: 43
Default

hmmm... for the category view somehow it didn't work that way.
When I change the code this way the headline won't be displayed.

What am I doing wrong again?

What I did:
Inserting this line
Quote:
<?php $pname = str_replace(" - bei YOOX.COM", "", $product->name); ?>
and changing to <?php echo $pname; ?> instead of [product.name]

Quote:
<?php $pname = str_replace(" - bei YOOX.COM", "", $product->name); ?>

<!-- Product List -->
<div class="pl">
[product.each]
<div class="t3 col1">
<div class="bdr">
<div class="lc">
<div class="thmb"><a href="[product.link]" title="<?php echo $pname; ?>">[product.image tag='1']</a></div>
<div class="prc">[product.currency mode='word'] [product.price]</div>
</div>
<div class="rc">
<h2><a href="[product.link]" title="<?php echo $pname; ?>"><?php echo $pname; ?></a></h2>
<p class="desc">[product.description]</p>
<div class="btns">
<a href="[product.link]" title="<?php echo $pname; ?>" class="dfbutton dfblue dflarge">Details</a>
<a href="[product.url direct='0']" title="<?php echo $pname; ?>" class="dfbutton dforange dflarge">bestellen</a>
</div>
</div>
<div class="clearingdiv"> </div>
</div>
</div>
[product.end]
<div class="clearingdiv"> </div>
</div>
<!-- /Product List -->
  #13  
Old November 23rd, 2011, 09:13 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

You should place the first PHP code immediately after the [product.each] tag.

...
[product.each]
<?php $pname = str_replace(" - bei YOOX.COM", "", $product->name); ?>
...

Eric
  #14  
Old November 23rd, 2011, 09:59 AM
meinehandtasche meinehandtasche is offline
 
Join Date: Jul 2011
Posts: 43
Default

This works now as well. Thanks!! :-)

Quote:
<!-- Product List -->
<div class="pl">
[product.each]
<?php $pname = str_replace(" - bei YOOX.COM", "", $product->name); ?>

<div class="t3 col1">
<div class="bdr">
<div class="lc">
<div class="thmb"><a href="[product.link]" title="<?php echo $pname; ?>">[product.image tag='1']</a></div>
<div class="prc">[product.currency mode='word'] [product.price]</div>
</div>
<div class="rc">
<h2><a href="[product.link]" title="<?php echo $pname; ?>"><?php echo $pname; ?></a></h2>
<p class="desc">[product.description]</p>
<div class="btns">
<a href="[product.link]" title="<?php echo $pname; ?>" class="dfbutton dfblue dflarge">Details</a>
<a href="[product.url direct='0']" title="<?php echo $pname; ?>" class="dfbutton dforange dflarge">bestellen</a>
</div>
</div>
<div class="clearingdiv"> </div>
</div>
</div>
[product.end]
<div class="clearingdiv"> </div>
</div>
<!-- /Product List -->
 


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
Remove product description from related products? cashnow Questions 2 March 8th, 2011 10:26 AM


All times are GMT -5. The time now is 03:15 AM.


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