Jump to content
Sign in to follow this  
DDame

Silly silly question re: Google Auto Feeder 1.2

Recommended Posts

From the README.txt for Auto Feeder 1.2:

 

2. Upload googlebase.php to your website root directory.

 

3, Add the following RewriteRule in .htaccess file at the root directory after "RewriteBase /":

#############################

# Begin Google Base File Rewrite Code

RewriteRule your-outfile.txt googlebase.php

# End Google Base File Rewrite Code

#############################

Note: You should replace your-outfile.txt with the file name that set in google base

 

3, At the google base web site, you can create a data feeds(http://base.google.com/base/bulkuploads), at that page, create a schedule upload, and the "scheduled upload" setting panel, set the URL of file to "http://www.yourwebsite.com/your-outfile.txt".

 

 

Uh, I don't want to mess this up as I have over 1,200 products in my store and I'm super-scared I'll ruin it ... step-by-step, how do I accomplish this? (I did step 1., that was easy-ish.) I do already have a Google Base Account but the "your-outfile.txt" bit is confusing.

 

It's no fun when everything looks like hyroglyphics .... so if someone could step me through as if I just turned on a computer for the first time, that would be awesome. Silly, I know.

 

:-)

Share this post


Link to post
Share on other sites

Step 2

 

Upload googlebase.php to your site root, this is where files such as index.php and product_info.php are.

 

Step 3

 

Edit .htaccess file in your root directory (the file may look like it has no name and the extension type will be HTACCESS ) with notepad or other editor and copy/paste the following after RewriteBase /

#############################
# Begin Google Base File Rewrite Code
RewriteRule your-outfile.txt googlebase.php
# End Google Base File Rewrite Code
#############################

 

When you configure Google Base data feed to read information from your store, you set it to look for a certain text file.

 

So if you call that text file feed.txt then you would replace your-outfile.txt in the above code with feed.txt and then make sure in Google Base it is linked to http://www.yoursite.com/feed.txt

 

Hope this helps..

Edited by Jonojamesmac

Share this post


Link to post
Share on other sites
Step 2

 

Upload googlebase.php to your site root, this is where files such as index.php and product_info.php are.

 

Step 3

 

Edit .htaccess file in your root directory (the file may look like it has no name and the extension type will be HTACCESS ) with notepad or other editor and copy/paste the following after RewriteBase /

#############################
# Begin Google Base File Rewrite Code
RewriteRule your-outfile.txt googlebase.php
# End Google Base File Rewrite Code
#############################
Note: You should replace your-outfile.txt with the file name that set in google base

 

When you configure Google Base data feed to read information from your store, you set it to look for a certain text file.

 

So if you call that text file feed.txt then you would replace your-outfile.txt in the above code with feed.txt and then make sure in Google Base it is linked to http://www.yoursite.com/feed.txt

 

Hope this helps..

 

 

Thanks! I'll try it now ... and thanks for the speedy-quick response :-)

Share this post


Link to post
Share on other sites

I don't find "RewriteBase /" in .htaccess. This is what I find when I open .htaccess in the File Manager (its the first file in the list under the folders): I X'd out the first 4 numbers ... in case they were confidential or something ;-P

 

 

 

 

# $Id: .htaccess XXXX 2007-12-20 00:52:16Z hpdl $

#

# This is used with Apache WebServers

#

# For this to work, you must include the parameter 'Options' to

# the AllowOverride configuration

#

# Example:

#

# <Directory "/usr/local/apache/htdocs">

# AllowOverride Options

# </Directory>

#

# 'All' with also work. (This configuration is in the

# apache/conf/httpd.conf file)

# The following makes adjustments to the SSL protocol for Internet

# Explorer browsers

#<IfModule mod_setenvif.c>

# <IfDefine SSL>

# SetEnvIf User-Agent ".*MSIE.*" \

# nokeepalive ssl-unclean-shutdown \

# downgrade-1.0 force-response-1.0

# </IfDefine>

#</IfModule>

# If Search Engine Friendly URLs do not work, try enabling the

# following Apache configuration parameter

# AcceptPathInfo On

# Fix certain PHP values

# (commented out by default to prevent errors occuring on certain

# servers)

# php_value session.use_trans_sid 0

# php_value register_globals 1

 

 

 

Am I in the wrong place?

 

Thx :-)

Share this post


Link to post
Share on other sites

First, I added exactly this to the end of the text in the .htaccess file (it IS the one where index.php is, right?) :

 

RewriteBase /
#############################
# Begin Google Base File Rewrite Code
RewriteRule your-outfile.txt googlebase.php
# End Google Base File Rewrite Code
#############################

 

I changed the your-outfile.txt to feed.txt

I scheduled it to automatically upload at the top of the next hour.

It didn't work.

 

 

So I changed it, thinking all those hashtags must not need to be there.

I added this to the end of the text in the same .htaccess file :

 

RewriteBase /
# Begin Google Base File Rewrite Code
RewriteRule feed.txt googlebase.php
# End Google Base File Rewrite Code

 

I changed the your-outfile.txt to feed.txt

I put the same file name in Google base.

I scheduled it to automatically upload at the top of the next hour.

It didn't work again.

 

I suppose I wasn't sure what to do when you said to add RewriteBase / so it looks like I did it wrong.

 

I'd appreciate your help again :-)

Share this post


Link to post
Share on other sites

Yipes, I don't think I'm getting this right. Unless it takes Google hours to upload the catalog ... ??

 

Maybe you can take one more peek and tell me if you see a problem? Here's exactly what is now in my .htaccess file:

 

# $Id: .htaccess 1739 2007-12-20 00:52:16Z hpdl $
#
# This is used with Apache WebServers
#
# For this to work, you must include the parameter 'Options' to
# the AllowOverride configuration
#
# Example:
#
# <Directory "/usr/local/apache/htdocs">
#   AllowOverride Options
# </Directory>
#
# 'All' with also work. (This configuration is in the
# apache/conf/httpd.conf file)
# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers
#<IfModule mod_setenvif.c>
#  <IfDefine SSL>
#	SetEnvIf User-Agent ".*MSIE.*" \
#			 nokeepalive ssl-unclean-shutdown \
#			 downgrade-1.0 force-response-1.0
#  </IfDefine>
#</IfModule>
# If Search Engine Friendly URLs do not work, try enabling the
# following Apache configuration parameter
# AcceptPathInfo On
# Fix certain PHP values
# (commented out by default to prevent errors occuring on certain
# servers)
# php_value session.use_trans_sid 0
# php_value register_globals 1
RewriteBase /
RewriteRule feed.txt googlebase.php

 

Thanks again, really. I am quite inept at all of this. :-P

Share this post


Link to post
Share on other sites
Yipes, I don't think I'm getting this right. Unless it takes Google hours to upload the catalog ... ??

 

Maybe you can take one more peek and tell me if you see a problem? Here's exactly what is now in my .htaccess file:

 

# $Id: .htaccess 1739 2007-12-20 00:52:16Z hpdl $
#
# This is used with Apache WebServers
#
# For this to work, you must include the parameter 'Options' to
# the AllowOverride configuration
#
# Example:
#
# <Directory "/usr/local/apache/htdocs">
#   AllowOverride Options
# </Directory>
#
# 'All' with also work. (This configuration is in the
# apache/conf/httpd.conf file)
# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers
#<IfModule mod_setenvif.c>
#  <IfDefine SSL>
#	SetEnvIf User-Agent ".*MSIE.*" \
#			 nokeepalive ssl-unclean-shutdown \
#			 downgrade-1.0 force-response-1.0
#  </IfDefine>
#</IfModule>
# If Search Engine Friendly URLs do not work, try enabling the
# following Apache configuration parameter
# AcceptPathInfo On
# Fix certain PHP values
# (commented out by default to prevent errors occuring on certain
# servers)
# php_value session.use_trans_sid 0
# php_value register_globals 1
RewriteBase /
RewriteRule feed.txt googlebase.php

 

Thanks again, really. I am quite inept at all of this. :-P

 

Browse to http://www.yoursite.com/feed.txt what do you see? If you see a lines of text, it works.

 

Just point google base to that link and google will pick it up.

Share this post


Link to post
Share on other sites
Browse to http://www.yoursite.com/feed.txt what do you see? If you see a lines of text, it works.

 

Just point google base to that link and google will pick it up.

 

 

I see this:

 

Not Found

 

The requested URL /feed.txt was not found on this server.

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

Does that count? :-)

Hopefully it will work, I have it scheduled but so far nothing. Thanks for all of your help... :-)

Share this post


Link to post
Share on other sites

I get the same result. I've tried with and without the www. also ....

Any suggestions?

 

Thanks :-)

Share this post


Link to post
Share on other sites

Does the file catalog/googlebase.php exist in your store? It looks like you don't even have this installed.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

I uploaded the google.php file to (and it appears in):

/home/XXXXXX/public_html/OSCommerce/

 

I notice there is a .htaccess file in that section, but there is also another file with that same name (.htaccess) in:

/home/XXXXXX/public_html/OSCommerce//admin

Is that the "root directory" I should have uploaded to? Could I have been working in the wrong area all along?

 

 

Much appreciation :-)

Share this post


Link to post
Share on other sites

The first one is correct if that is where your store can be viewed. If that is true, then you should be looking at http://www.yoursite.com/OSCommerce/googlebase.php and http://www.yoursite.com/OSCommerce/feed.txt. Does either of those show the text file?

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

No, I've tried it every which way, and I still get the same error or an Internal Server Error.

 

What do you mean by "if that is where your store can be viewed"? My site is viewed at http://www.my-site.com or just http://my-site.com without all of the OSCommerce/Admin stuff.

 

I guess I just need to know where exactly in File Manager I should be with all of this.

 

I'm so confused :-P

 

Thanks for helping :-)

Share this post


Link to post
Share on other sites
No, I've tried it every which way, and I still get the same error or an Internal Server Error.

 

What do you mean by "if that is where your store can be viewed"? My site is viewed at http://www.my-site.com or just http://my-site.com without all of the OSCommerce/Admin stuff.

 

I guess I just need to know where exactly in File Manager I should be with all of this.

 

I'm so confused :-P

 

Thanks for helping :-)

Not sure if this helps, but when I am in the builder, in Catalog (as if to add another product), the url above starts with http://my-site.com/admin/categories.php

Share this post


Link to post
Share on other sites
No, I've tried it every which way, and I still get the same error or an Internal Server Error.

 

What do you mean by "if that is where your store can be viewed"? My site is viewed at http://www.my-site.com or just http://my-site.com without all of the OSCommerce/Admin stuff.

 

I guess I just need to know where exactly in File Manager I should be with all of this.

 

I'm so confused :-P

 

Thanks for helping :-)

 

 

It sounds like your store is in the root and not the OSCommerce folder you uploaded to. Try uploading googlebase.php to the root folder i.e. the public_html folder

Edited by stevea1234

Share this post


Link to post
Share on other sites
It sounds like your store is in the root and not the OSCommerce folder you uploaded to. Try uploading googlebase.php to the root folder i.e. the public_html folder

 

After determining for certain where my root directory was and getting the permissions changed by my host, it now contains the googlebase.php file. The .htaccess file in the root directory now contains this at the very end:

 

RewriteBase /

#############################

# Begin Google Base File Rewrite Code

RewriteRule feed.txt googlebase.php

# End Google Base File Rewrite Code

#############################

 

When I browse for http://my-site.com/feed.txt I receive this:

 

Not Found

 

The requested URL /feed.txt was not found on this server.

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

When I browse for http://my-site.com/googlebase.php I receive this:

 

Warning: include_once(includes/classes/seo.class.php) [function.include-once]: failed to open stream: No such file or directory in /home/XXXXXX/public_html/OSCommerce/googlebase.php on line 104

 

Warning: include_once() [function.include]: Failed opening 'includes/classes/seo.class.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/XXXXXX/public_html/OSCommerce/googlebase.php on line 104

 

Fatal error: Class 'SEO_URL' not found in /home/XXXXXX/public_html/OSCommerce/googlebase.php on line 105

 

Any idea of what I might now be doing wrong ? :-P

Share this post


Link to post
Share on other sites

Turn off SEO if you're not using it (Line 20 of googlebase.php.) This will not work if you are using an incompatible SEO addon.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites
Turn off SEO if you're not using it (Line 20 of googlebase.php.) This will not work if you are using an incompatible SEO addon.

 

Regards

Jim

 

Yay!!!! I browsed for http://my-site.com/googlebase.php and there was a TON of text -- my products! :-D

 

THANK YOU SO MUCH, everyone! Really!! Life is so much better with helpful people like you around :-)

 

Take Care

Share this post


Link to post
Share on other sites

Actually I am using the same file and am getting nothing when I attempt to generate the feed.

 

It just shows a completely blank page!

 

This is in .htaccess file

 

################################ Begin Google Base Rewrite ###############
RewriteRule googlefeed1.txt googlebase.php
RewriteRule googlebase.txt googlebase.php
################################ End Google Base Rewrite ###############

and the googlefeed1 and googlebase are correct for feeds I try to generate.

 

and nothing when running

 

http://www.MY WEBSITES NAME.com/googlebase.txt

 

http://www.MY WEBSITES NAME.com/googlefeed1.txt

 

or even

 

http://www.MY WEBSITES NAME.com/googlebase.php

 

Have tried SEO ENABLED as False and as TRUE

 

// START Main Configuration

// CHANGEME - Change to 'false' to disable the use of SEO

define('SEO_ENABLED','true');

 

********************************************************************************

**********************

 

Here is the code from the googlebase.php file!

********************************************************************************

**********************

 

<?php
/*
Title: Google Base Auto Feeder 1.2
This feeder has been revised to work with Ultimate SEO URLs 2.1d (http://www.oscommerce.com/community/contributions,2823)
*/

// ########## BEGIN CONFIGURATION ###################

// START Main Configuration
// CHANGEME - Change to 'false' to disable the use of SEO
 define('SEO_ENABLED','false');

// CHANGEME - Change this to the id of your language.  BY default 1 is english
 $languages_id = 1;   

// CHANGEME - Change this to Pounds or so
 $WeightUnit = "lbs";	
//End Main Configuration

// START Optional Advance Configuration
// Monetary Adjustments for Products in Feed
// default = 0 (e.g. for 17.5% tax use "$taxRate = 17.5;")
$taxRate = 0; 

// Do not edit this
$taxCalc = ($taxRate/100) + 1;  

// default = true
$convertCur = true; 

// Converts Currency to any defined currency (eg. USD, EUR, GBP)
$curType = "USD"; 
//END Optional Advance Configuration

// START Optional Advance Feed Attributes
// (0=False 1=True) (optional_sec must be enabled to use any of the following options)
$optional_sec = 1;

$manufacturer = 1;

$mpn = 1;   //model no. in osC is used here

$payment_accepted = 1;
// CHANGEME - Acceptable values: cash, check, GoogleCheckout, Visa, MasterCard, AMEX, Discover, wiretransfer
$default_payment_methods = "Paypal,Visa,MasterCard,AmericanExpress,WireTransfer"; 

$product_type = 1;

$currency = 1;
// CHANGEME - Change this to Google Base Currency - USD or so
$default_currency = "USD";  //this is not binary.

$model_number = 1;

$feed_quantity = 1;

$brand = 1; // 31 jan 2007 Added condition due to Google Base making mandatory

$condition = 1; // 31 jan 2007 Added condition due to Google Base making mandatory
// CHANGEME - Change this to Old or so
	$default_condition = "New"; // 31 jan 2007 Added condition due to Google Base making mandatory

$age_range = 1; // 31 jan 2007 Added condition due to Google Base making mandatory
// CHANGEME - Change this to Age Range who could bioew your feeds - 30-60 or so
	$default_age_range = "20-90"; // 31 jan 2007 Added condition due to Google Base making mandatory

$made_in = 1; // 31 jan 2007 Added condition due to Google Base making mandatory
// CHANGEME - Change this to your country - USA or so
	$default_made_in = "USA"; // 31 jan 2007 Added condition due to Google Base making mandatory

$shipping = 0;
$lowestShipping = "";  //this is not binary. Custom Code is required to provide the shipping cost per product.  ###needs to be an array for per product.

$upc = 0;   //Not supported by default osC

$location = 0;
// CHANGEME - Change this to your place if enabled
$default_location = "";

$feed_language = 0;
// CHANGEME - Change this to Google Base Feed Language - FR or so if enabled
$default_feed_language = "EN";  //this is not binary.

$feed_manufacturer_id = 0; //this is for the manufacturer model number, NOT your internal store sku
// END Optional Advance Feed Attributes

// ########## END CONFIGURATION ###################
//Please avoid editing the codes below

$feed_exp_date = date('Y-m-d', time() + 2592000 );

 require_once('includes/configure.php');
 require_once('includes/filenames.php');
 require_once('includes/database_tables.php');

 $home = DB_SERVER;
 $user=DB_SERVER_USERNAME;
 $pass=DB_SERVER_PASSWORD;
 $base=DB_DATABASE;
 $catalogURL = HTTP_SERVER.'/';
 $imageURL = HTTP_SERVER.'/'.DIR_WS_IMAGES;

if(SEO_ENABLED=='true'){
 include_once('includes/classes/seo.class.php');
 $seo_urls = new SEO_URL($languages_id);

 function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
 global $seo_urls;
 return $seo_urls->href_link($page, $parameters, $connection, $add_session_id);
 }
}

if(SEO_ENABLED=='true'){
  $productURL = 'product_info.php'; 
  $productParam = "products_id=";   
}else{
  $productURL = HTTP_SERVER.'/product_info.php/products_id/';
}

$already_sent = array();

if($convertCur)
{
  if(SEO_ENABLED=='true'){
   $productParam="" . $curType . "&products_id=";
  }else{
   $productURL = HTTP_SERVER."/product_info.php?currency=" . $curType . "&products_id=";  //where CURTYPE is your currency type (eg. USD, EUR, GBP)
  }
}


if (!($link=mysql_connect($home,$user,$pass)))
{
echo "Error when connecting itself to the data base";
exit();
}
if (!mysql_select_db( $base , $link ))
{
echo "Error the data base does not exist";
exit();
}

$sql = "
SELECT concat( '" . $productURL . "' ,products.products_id) AS product_url,
products_model AS prodModel, 
products_weight AS weight, 
manufacturers.manufacturers_name AS mfgName,
manufacturers.manufacturers_id,
products.products_id AS id,
products_description.products_name AS name,
products_description.products_description AS description,
products.products_quantity AS quantity,
products.products_status AS prodStatus,
FORMAT( IFNULL(specials.specials_new_products_price, products.products_price) * " . $taxCalc . ",2) AS price,
CONCAT( '" . $imageURL . "' ,products.products_image) AS image_url,
products_to_categories.categories_id AS prodCatID,
categories.parent_id AS catParentID,
categories_description.categories_name AS catName
FROM (categories,
categories_description,
products,
products_description,
products_to_categories)

left join manufacturers on ( manufacturers.manufacturers_id = products.manufacturers_id )
left join specials on ( specials.products_id = products.products_id AND ( ( (specials.expires_date > CURRENT_DATE) OR (specials.expires_date = 0) ) AND ( specials.status = 1 ) ) )

WHERE products.products_id=products_description.products_id
AND products.products_id=products_to_categories.products_id
AND products_to_categories.categories_id=categories.categories_id
AND categories.categories_id=categories_description.categories_id
ORDER BY
products.products_id ASC
";


$catInfo = "
SELECT
categories.categories_id AS curCatID,
categories.parent_id AS parentCatID,
categories_description.categories_name AS catName
FROM
categories,
categories_description
WHERE categories.categories_id = categories_description.categories_id
";

function findCat($curID, $catTempPar, $catTempDes, $catIndex)
{
if( (isset($catTempPar[$curID])) && ($catTempPar[$curID] != 0) )
{
	if(isset($catIndex[$catTempPar[$curID]]))
	{
		$temp=$catIndex[$catTempPar[$curID]];
	}
	else
	{
		$catIndex = findCat($catTempPar[$curID], $catTempPar, $catTempDes, $catIndex);
		$temp = $catIndex[$catTempPar[$curID]];
	}
}
if( (isset($catTempPar[$curID])) && (isset($catTempDes[$curID])) && ($catTempPar[$curID] == 0) )
{
	$catIndex[$curID] = $catTempDes[$curID];
}
else
{
	$catIndex[$curID] = $temp . ", " . $catTempDes[$curID];
}
return $catIndex;

}

$catIndex = array();
$catTempDes = array();
$catTempPar = array();
$processCat = mysql_query( $catInfo )or die( $FunctionName . ": SQL error " . mysql_error() . "| catInfo = " . htmlentities($catInfo) );
while ( $catRow = mysql_fetch_object( $processCat ) )
{
$catKey = $catRow->curCatID;
$catName = $catRow->catName;
$catParID = $catRow->parentCatID;
if($catName != "")
{
	$catTempDes[$catKey]=$catName;
	$catTempPar[$catKey]=$catParID;
}
}

foreach($catTempDes as $curID=>$des)  //don't need the $des
{
$catIndex = findCat($curID, $catTempPar, $catTempDes, $catIndex);
}

$_strip_search = array(
"![\t ]+$|^[\t ]+!m", // remove leading/trailing space chars
'%[\r\n]+%m'); // remove CRs and newlines
$_strip_replace = array(
'',
' ');
$_cleaner_array = array(">" => "> ", "®" => "", "®" => "", "™" => "", "™" => "", "\t" => "", "	" => "");

$output = "link\ttitle\tdescription\texpiration_date\tprice\timage_link\tgenre\tid\tweight";
//create optional section
if($optional_sec == 1)
{
if($shipping == 1)
	$output .= "\tshipping";
if($manufacturer == 1)
	$output .= "\tmanufacturer";
   if($model_number==1)
			$output .= "\tmodel_number";
if($upc == 1)
	$output .= "\tupc";
if($mpn == 1)
	$output .= "\tmpn";
if($payment_accepted == 1)
	$output .= "\tpayment_accepted";
if($product_type == 1)
	$output .= "\tproduct_type";
if($currency == 1)
	$output .= "\tcurrency";
	if($location == 1)
			$output .= "\tlocation";
if($feed_language == 1)
	$output .= "\tlanguage";
if($feed_manufacturer_id == 1)
	$output .= "\tmanufacturer_id";
if($feed_quantity == 1)
	$output .= "\tquantity";
if($brand == 1)  // 31 jan 2007 Added condition due to Google Base making mandatory
	$output .= "\tbrand"; // 31 jan 2007 Added condition due to Google Base making mandatory
if($condition == 1) // 31 jan 2007 Added condition due to Google Base making mandatory
	$output .= "\tcondition"; // 31 jan 2007 Added condition due to Google Base making mandatory
if($age_range == 1)  // 31 jan 2007 Added condition due to Google Base making mandatory
	$output .= "\tage_range"; // 31 jan 2007 Added condition due to Google Base making mandatory
if($made_in == 1) // 31 jan 2007 Added condition due to Google Base making mandatory
	$output .= "\tmade_in"; // 31 jan 2007 Added condition due to Google Base making mandatory
}
$output .= "\n";
$result=mysql_query( $sql )or die( $FunctionName . ": SQL error " . mysql_error() . "| sql = " . htmlentities($sql) );
//Currency Information
if($convertCur)
{
$sql3 = "
SELECT
currencies.value AS curUSD
FROM
currencies
WHERE currencies.code = '$curType'
";

$result3=mysql_query( $sql3 )or die( $FunctionName . ": SQL error " . mysql_error() . "| sql3 = " . htmlentities($sql3) );
$row3 = mysql_fetch_object( $result3 );
}

while( $row = mysql_fetch_object( $result ) )
{
if (isset($already_sent[$row->id])) continue; // if we've sent this one, skip the rest of the while loop

if( $row->prodStatus == 1 || ($optional_sec == 1 && $quantity == 1) )
{

	if($convertCur)
	{
		$row->price = ereg_replace("[^.0-9]", "", $row->price);
		$row->price = $row->price *  $row3->curUSD;
		$row->price = number_format($row->price, 2, '.', ',');
	}

	if(SEO_ENABLED=='true'){
			$output .= tep_href_link($productURL,$productParam . $row->id) . "\t" .
			preg_replace($_strip_search, $_strip_replace, strip_tags( strtr($row->name, $_cleaner_array) ) ) . "\t" .
			preg_replace($_strip_search, $_strip_replace, strip_tags( strtr($row->description, $_cleaner_array) ) ) . "\t" .
			$feed_exp_date . "\t" .
			$row->price . "\t" .
			$row->image_url . "\t" .
			$catIndex[$row->prodCatID] . "\t" .
			$row->id . "\t" .
	$row->weight . $WeightUnit;
	}else{
	$output .= $row->product_url . "\t" .
	preg_replace($_strip_search, $_strip_replace, strip_tags( strtr($row->name, $_cleaner_array) ) ) . "\t" .
	preg_replace($_strip_search, $_strip_replace, strip_tags( strtr($row->description, $_cleaner_array) ) ) . "\t" .
	$feed_exp_date . "\t" .
	$row->price . "\t" .
	$row->image_url . "\t" .
	$catIndex[$row->prodCatID] . "\t" .
	$row->id . "\t" .
	$row->weight . $WeightUnit;
	}

//optional values section
if($optional_sec == 1)
{
	if($shipping == 1)
		$output .= "\t" . $lowestShipping;
	if($manufacturer == 1)
		$output .= "\t" . $row->mfgName;
			if($model_number==1)
		$output .= "\t" . $row->prodModel;
	if($upc == 1)
		$output .= "\t" . $row->prodModel;
	if($mpn == 1)
		$output .= "\t" . $row->prodModel;
	if($payment_accepted == 1)
		$output .= "\t" . $default_payment_methods;
	if($product_type == 1)
	{
		$catNameTemp = strtolower($catName);
		$output .= "\t" . $row->catName;
	}
	if($currency == 1)
		$output .= "\t" . $default_currency;
			if($location==1)
					$output .= "\t" . $default_location;
	if($feed_language == 1)
		$output .= "\t" . $default_feed_language;
	if($feed_manufacturer_id == 1)
		$output .= "\t" . $row->prodModel;
	if($feed_quantity == 1)
		$output .= "\t" . $row->quantity;
	if($brand==1)
					$output .= "\t" . $row->mfgName;
	if($condition == 1)	 // 31 jan 2007 Added condition due to Google Base making mandatory
		$output .= "\t" . $default_condition; // 31 jan 2007 Added condition due to Google Base making mandatory
	if($age_range == 1)	// 31 jan 2007 Added condition due to Google Base making mandatory
		$output .= "\t" . $default_age_range; // 31 jan 2007 Added condition due to Google Base making mandatory
	if($made_in == 1)	 // 31 jan 2007 Added condition due to Google Base making mandatory
		$output .= "\t" . $default_made_in; // 31 jan 2007 Added condition due to Google Base making mandatory
}
$output .= "\n";
}
$already_sent[$row->id] = 1;
}
echo $output;
?>

Edited by drm1963

Share this post


Link to post
Share on other sites
Yay!!!! I browsed for http://my-site.com/googlebase.php and there was a TON of text -- my products! :-D

 

THANK YOU SO MUCH, everyone! Really!! Life is so much better with helpful people like you around :-)

 

Take Care

 

I think I am actually only half-way there ... the http://my-site.com/googlebase.php is working, but still not the http://my-site.com/feed.txt part (still getting a 404 error), so Google Base isn't uploading my catalog. Here is what is in my .htaccess file in the Root Directory, if this helps you find anything I need to change?:

 

# $Id: .htaccess 1739 2007-12-20 00:52:16Z hpdl $
#
# This is used with Apache WebServers
#
# For this to work, you must include the parameter 'Options' to
# the AllowOverride configuration
#
# Example:
#
# <Directory "/usr/local/apache/htdocs">
#   AllowOverride Options
# </Directory>
#
# 'All' with also work. (This configuration is in the
# apache/conf/httpd.conf file)
# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers
#<IfModule mod_setenvif.c>
#  <IfDefine SSL>
#	SetEnvIf User-Agent ".*MSIE.*" \
#			 nokeepalive ssl-unclean-shutdown \
#			 downgrade-1.0 force-response-1.0
#  </IfDefine>
#</IfModule>
# If Search Engine Friendly URLs do not work, try enabling the
# following Apache configuration parameter
# AcceptPathInfo On
# Fix certain PHP values
# (commented out by default to prevent errors occuring on certain
# servers)
# php_value session.use_trans_sid 0
# php_value register_globals 1
RewriteBase /
#############################
# Begin Google Base File Rewrite Code
RewriteRule feed.txt googlebase.php
# End Google Base File Rewrite Code
#############################

Share this post


Link to post
Share on other sites

We have got to be close and several of us seem to have same problem (described in threads since 16Jun09), which is probably related to having our catalog in a subdirectory of the root. Thanks again to all of you for getting us this close. We're all going to thump our heads when we see how simple this was, but right now it's just getting past us.

 

My store is is found at www.mysite.com/catalog/index.php, but there's a statement in .htaccess in the root directory to:

Redirect /index.html http://www.mystore.com/catalog/index.php

 

I've added googlebase.php to the folder at www.mystore.com/catalog/ and can see thousands of lines of text if I browse www.mystore.com/catalog/googlebase.php. We have 3,200 products on the site.

 

I've added the following statements to .htaccess in www. mystore.com/catalog/.htaccess

RewriteBase /

RewriteRule feeds.txt googlebase.php

 

BUT, when I try to access www.mystore.com/catalog/feeds.txt I get the following error:

The requested URL /catalog/feeds.txt was not found on this server.

 

Ditto if I try for www.mystore.com/feeds.txt with the error:

The requested URL /feeds.txt was not found on this server.

 

Thanks again,

 

John

Share this post


Link to post
Share on other sites

Add this code to your .htaccess above your rewrite rules:

Options +FollowSymLinks
RewriteEngine on

If your store is in a subdirectory, you need to modify googlebase.php. The code is up a bit in this thread.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×