Thread: Froogle Google
View Single Post
  #37  
Old 08-05-2003, 01:55 PM
 
successful successful is offline
 

eXpert
  
Join Date: Sep 2002
Location: Brooklyn
Posts: 208
 

Default

Quote:
Originally Posted by davesphoto
I think I got it!
This does not print any extra lines. It also removes any extra tabs created by multiple carrage returns in the description (I am not sure why this happened with the old code but another |strip did the trick). Anyways, this is what I am using now for product_export.tpl:

Code:
{strip} product_url{$delimiter} name{$delimiter} description{$delimiter} price{$delimiter} image_url{$delimiter} category{$delimiter} offer_id{$delimiter} shipping{$line} {section name=prod_num loop=$products} http://www.davesphotoemporium.com/store/customer/product.php?productid={$products[prod_num].productid|replace:"\"":""}&cat={$products[prod_num].categoryid|replace:"\"":""}&partner=froogle{$delimiter} {$products[prod_num].product|replace:"\"":""}{$delimiter} {$products[prod_num].descr|replace:"\r":" "|replace:"\n":" "|replace:"\t":" "|replace:"\"":""|replace:",":","|strip_tags |strip}{$delimiter} {$products[prod_num].price|replace:"\"":""}{$delimiter} http://www.davesphotoemporium.com/store/image.php?productid={$products[prod_num].productid|replace:"\"":""}{$delimiter} {$products[prod_num].category|replace:"/":" > "|replace:"\"":""}{$delimiter} {$products[prod_num].productcode|replace:"\"":""}{$delimiter} 0.00{$line} {/section} {/strip}

Now be carefull! This tpl seems very sensitive to extra spaces or lines in the code, so don't leave any! Also notice I am using the short description, not the full one (I dont use it for display on the website so now it is the "froogle" description).

Also please note: You must define and assign the variable $line as the line delimiter in the export.php.

Put this at the top:
Code:
$line = "\n";

And this right after $smarty->assign("delimiter", $delimiter);:
Code:
$smarty->assign("line", $line);


This should export data ready for upload to froogle without modification (at least it does for me ).

I am not a programmer and do not know all the etiquette so I hope I am not stepping on any toes posting this code seeing as how some of the lines are unchanged from the code posted earlier in the discussion. The idea is quite different though. Anyway, I make no claim to the code; use it for anything you want! Hopefully it helps!


Hmmm.....I tried this and Google responded as follows:

Thank you for submitting your data feed. We have reviewed your feed and
need you to make some changes so that we can successfully process your
feed.

Please remove the first line of "$line = "\n";" from your data feed.
Please also separate the header and each product from other products by
using a line break. For example, after the shipping field for each
product, there should be a line break to separate it from the next
product.

After you have made this change, please upload a new version of your feed
with the same filename as before, and email us so that we can check the
new version.



Any suggestions ?
__________________
Visit us at http://www.Successfulhosting.com
We\'ll make your web site a success!

Register your own domain name for only $14.99 at http://DiscountDomainRegistry.com
Reply With Quote